From: Jan Kara <jack@suse.cz>
To: Pan Bian <bianpan2016@163.com>
Cc: Jan Kara <jack@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] isofs: release buffer head before return
Date: Mon, 18 Jan 2021 15:41:23 +0100 [thread overview]
Message-ID: <20210118144123.GC19606@quack2.suse.cz> (raw)
In-Reply-To: <20210118120455.118955-1-bianpan2016@163.com>
On Mon 18-01-21 04:04:55, Pan Bian wrote:
> Release the buffer header before returning error code.
>
> Fixes: 2deb1acc653c ("isofs: fix access to unallocated memory when reading corrupted filesystem")
> Signed-off-by: Pan Bian <bianpan2016@163.com>
OK, good spotting. But the other hunk in commit 2deb1acc653c seems to have
the same problem so we might fix it as well when we are at it?
Honza
> ---
> fs/isofs/dir.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/isofs/dir.c b/fs/isofs/dir.c
> index f0fe641893a5..b9e6a7ec78be 100644
> --- a/fs/isofs/dir.c
> +++ b/fs/isofs/dir.c
> @@ -152,6 +152,7 @@ static int do_isofs_readdir(struct inode *inode, struct file *file,
> printk(KERN_NOTICE "iso9660: Corrupted directory entry"
> " in block %lu of inode %lu\n", block,
> inode->i_ino);
> + brelse(bh);
> return -EIO;
> }
>
> --
> 2.17.1
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2021-01-18 14:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-18 12:04 Pan Bian
2021-01-18 14:41 ` Jan Kara [this message]
2021-01-25 16:58 ` Jan Kara
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=20210118144123.GC19606@quack2.suse.cz \
--to=jack@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=bianpan2016@163.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®