linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: syzbot <syzbot+1c6756baf4b16b94d2a6@syzkaller.appspotmail.com>,
	deepa.kernel@gmail.com, jack@suse.cz, jeffm@suse.com,
	jlayton@kernel.org, linux-kernel@vger.kernel.org,
	reiserfs-devel@vger.kernel.org, syzkaller-bugs@googlegroups.com,
	viro@zeniv.linux.org.uk
Subject: Re: [PATCH] Re: memory leak in reiserfs_fill_super
Date: Mon, 16 Dec 2019 12:57:42 +0100	[thread overview]
Message-ID: <20191216115741.GE22157@quack2.suse.cz> (raw)
In-Reply-To: <dbad2a8f-5a58-ecb5-eec7-1d6ef90abaed@infradead.org>

On Sat 14-12-19 15:12:57, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
> 
> fill_super() conditionally allocates a jdev string if "jdev=x"
> is specified.  put_super() should free that memory.
> 
> Reported-by: syzbot+1c6756baf4b16b94d2a6@syzkaller.appspotmail.com
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>

Thanks Randy but I've already sent a similar (and more complete) fix to this
bug as part of [1].

								Honza

[1] https://lore.kernel.org/linux-fsdevel/20191212105018.910-1-jack@suse.cz/

> ---
>  fs/reiserfs/super.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> --- linux-next-20191213.orig/fs/reiserfs/super.c
> +++ linux-next-20191213/fs/reiserfs/super.c
> @@ -629,6 +629,7 @@ static void reiserfs_put_super(struct su
>  	reiserfs_write_unlock(s);
>  	mutex_destroy(&REISERFS_SB(s)->lock);
>  	destroy_workqueue(REISERFS_SB(s)->commit_wq);
> +	kfree(REISERFS_SB(s)->s_jdev);
>  	kfree(s->s_fs_info);
>  	s->s_fs_info = NULL;
>  }
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

      reply	other threads:[~2019-12-16 11:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-12  1:25 memory leak in reiserfs_fill_super syzbot
2019-12-14 23:12 ` [PATCH] " Randy Dunlap
2019-12-16 11:57   ` Jan Kara [this message]

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20191216115741.GE22157@quack2.suse.cz \
    --to=jack@suse.cz \
    --cc=deepa.kernel@gmail.com \
    --cc=jeffm@suse.com \
    --cc=jlayton@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=reiserfs-devel@vger.kernel.org \
    --cc=syzbot+1c6756baf4b16b94d2a6@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).