* [PATCH] ext4: fix leaking sysfs kobject after failed mount [not found] <000000000000443d8a05afcff2b5@google.com> @ 2020-09-22 16:24 ` Eric Biggers 2020-09-24 9:08 ` Jan Kara 0 siblings, 1 reply; 3+ messages in thread From: Eric Biggers @ 2020-09-22 16:24 UTC (permalink / raw) To: linux-ext4, Theodore Ts'o Cc: syzkaller-bugs, linux-kernel, stable, syzbot+9f864abad79fae7c17e1 From: Eric Biggers <ebiggers@google.com> 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> --- fs/ext4/super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index ea425b49b345..41953b86ffe3 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -4872,6 +4872,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) failed_mount8: ext4_unregister_sysfs(sb); + kobject_put(&sbi->s_kobj); failed_mount7: ext4_unregister_li_request(sb); failed_mount6: base-commit: ba4f184e126b751d1bffad5897f263108befc780 -- 2.28.0 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ext4: fix leaking sysfs kobject after failed mount 2020-09-22 16:24 ` [PATCH] ext4: fix leaking sysfs kobject after failed mount Eric Biggers @ 2020-09-24 9:08 ` Jan Kara 2020-10-03 4:56 ` Theodore Y. Ts'o 0 siblings, 1 reply; 3+ messages in thread From: Jan Kara @ 2020-09-24 9:08 UTC (permalink / raw) To: Eric Biggers Cc: linux-ext4, Theodore Ts'o, syzkaller-bugs, linux-kernel, stable, syzbot+9f864abad79fae7c17e1 On Tue 22-09-20 09:24:56, Eric Biggers wrote: > From: Eric Biggers <ebiggers@google.com> > > 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> Looks good. You can add: Reviewed-by: Jan Kara <jack@suse.cz> Honza > --- > fs/ext4/super.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fs/ext4/super.c b/fs/ext4/super.c > index ea425b49b345..41953b86ffe3 100644 > --- a/fs/ext4/super.c > +++ b/fs/ext4/super.c > @@ -4872,6 +4872,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) > > failed_mount8: > ext4_unregister_sysfs(sb); > + kobject_put(&sbi->s_kobj); > failed_mount7: > ext4_unregister_li_request(sb); > failed_mount6: > > base-commit: ba4f184e126b751d1bffad5897f263108befc780 > -- > 2.28.0 > -- Jan Kara <jack@suse.com> SUSE Labs, CR ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ext4: fix leaking sysfs kobject after failed mount 2020-09-24 9:08 ` Jan Kara @ 2020-10-03 4:56 ` Theodore Y. Ts'o 0 siblings, 0 replies; 3+ messages in thread From: Theodore Y. Ts'o @ 2020-10-03 4:56 UTC (permalink / raw) To: Jan Kara Cc: Eric Biggers, linux-ext4, syzkaller-bugs, linux-kernel, stable, syzbot+9f864abad79fae7c17e1 On Thu, Sep 24, 2020 at 11:08:59AM +0200, Jan Kara wrote: > On Tue 22-09-20 09:24:56, Eric Biggers wrote: > > From: Eric Biggers <ebiggers@google.com> > > > > 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> > > Looks good. You can add: > > Reviewed-by: Jan Kara <jack@suse.cz> Thanks, applied. - Ted ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-10-03 4:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <000000000000443d8a05afcff2b5@google.com>
2020-09-22 16:24 ` [PATCH] ext4: fix leaking sysfs kobject after failed mount Eric Biggers
2020-09-24 9:08 ` Jan Kara
2020-10-03 4:56 ` Theodore Y. Ts'o
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).