[PATCH] fs: erofs: remember if kobject_init_and_add was done

Gao Xiang hsiangkao at linux.alibaba.com
Tue Mar 15 19:33:20 AEDT 2022


On Tue, Mar 15, 2022 at 03:51:52PM +0800, Dongliang Mu wrote:
> From: Dongliang Mu <mudongliangabcd at gmail.com>
> 
> Syzkaller hit 'WARNING: kobject bug in erofs_unregister_sysfs'. This bug
> is triggered by injecting fault in kobject_init_and_add of
> erofs_unregister_sysfs.
> 
> Fix this by remembering if kobject_init_and_add is successful.
> 
> Note that I've tested the patch and the crash does not occur any more.
> 
> Reported-by: syzkaller <syzkaller at googlegroups.com>
> Signed-off-by: Dongliang Mu <mudongliangabcd at gmail.com>

Thanks for the effort!

Fixes: 168e9a76200c ("erofs: add sysfs interface")
Reviewed-by: Gao Xiang <hsiangkao at linux.alibaba.com>

Thanks,
Gao Xiang


More information about the Linux-erofs mailing list