• R/O
  • HTTP
  • SSH
  • HTTPS

BrynKernel-AOSP: 提交

https://bryn-lab.my.id/kernel.html


Commit MetaInfo

修订版09424dab92413d8f10e880107aef5faaa5e547ef (tree)
时间2020-11-19 02:26:32
作者Eric Biggers <ebiggers@goog...>
CommiterGreg Kroah-Hartman

Log Message

ext4: fix leaking sysfs kobject after failed mount

commit cb8d53d2c97369029cc638c9274ac7be0a316c75 upstream.

ext4_unregister_sysfs() only deletes the kobject. The reference to it
needs to be put separately, like ext4_put_super() does.

This addresses the syzbot report
"memory leak in kobject_set_name_vargs (3)"
(https://syzkaller.appspot.com/bug?extid=9f864abad79fae7c17e1).

Reported-by: syzbot+9f864abad79fae7c17e1@syzkaller.appspotmail.com
Fixes: 72ba74508b28 ("ext4: release sysfs kobject when failing to enable quotas on mount")
Cc: stable@vger.kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20200922162456.93657-1-ebiggers@kernel.org
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
[sudip: adjust context]
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

更改概述

差异

--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4336,6 +4336,7 @@ cantfind_ext4:
43364336 #ifdef CONFIG_QUOTA
43374337 failed_mount8:
43384338 ext4_unregister_sysfs(sb);
4339+ kobject_put(&sbi->s_kobj);
43394340 #endif
43404341 failed_mount7:
43414342 ext4_unregister_li_request(sb);
Show on old repository browser