diff options
| author | Guangshuo Li <lgs201920130244@gmail.com> | 2026-04-10 20:47:26 +0800 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2026-04-13 22:53:17 +0000 |
| commit | b635f2ecdb5ad34f9c967cabb704d6bed9382fd0 (patch) | |
| tree | da849c7ed49fc5fe00820127439e5fb819cecfb6 /include/linux/tc_act/git@git.tavy.me:linux-stable.git | |
| parent | 5909bedbed38c558bee7cb6758ceedf9bc3a9194 (diff) | |
f2fs: fix uninitialized kobject put in f2fs_init_sysfs()
In f2fs_init_sysfs(), all failure paths after kset_register() jump to
put_kobject, which unconditionally releases both f2fs_tune and
f2fs_feat.
If kobject_init_and_add(&f2fs_feat, ...) fails, f2fs_tune has not been
initialized yet, so calling kobject_put(&f2fs_tune) is invalid.
Fix this by splitting the unwind path so each error path only releases
objects that were successfully initialized.
Fixes: a907f3a68ee26ba4 ("f2fs: add a sysfs entry to reclaim POSIX_FADV_NOREUSE pages")
Cc: stable@vger.kernel.org
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'include/linux/tc_act/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
