Linux-ext4 Archive on
 help / color / Atom feed
From: Eric Biggers <>
To:, Theodore Ts'o <>
Subject: [PATCH] ext4: fix leaking sysfs kobject after failed mount
Date: Tue, 22 Sep 2020 09:24:56 -0700
Message-ID: <> (raw)
In-Reply-To: <>

From: Eric Biggers <>

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)"

Fixes: 72ba74508b28 ("ext4: release sysfs kobject when failing to enable quotas on mount")
Signed-off-by: Eric Biggers <>
 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)
+	kobject_put(&sbi->s_kobj);

base-commit: ba4f184e126b751d1bffad5897f263108befc780

  reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-21 10:02 memory leak in kobject_set_name_vargs (3) syzbot
2020-09-22 16:24 ` Eric Biggers [this message]
2020-09-24  9:08   ` [PATCH] ext4: fix leaking sysfs kobject after failed mount Jan Kara
2020-10-03  4:56     ` Theodore Y. Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-ext4 Archive on

Archives are clonable:
	git clone --mirror linux-ext4/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-ext4 linux-ext4/ \
	public-inbox-index linux-ext4

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone