From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
Kate Stewart <kstewart@linuxfoundation.org>,
Enrico Weigelt <info@metux.net>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] fs/adfs: bigdir: Fix an error code in adfs_fplus_read()
Date: Sat, 25 Jan 2020 09:29:30 +0000 [thread overview]
Message-ID: <20200125092930.GQ25745@shell.armlinux.org.uk> (raw)
In-Reply-To: <20200124101537.z6n242eovocfbdha@kili.mountain>
On Fri, Jan 24, 2020 at 01:15:37PM +0300, Dan Carpenter wrote:
> This code accidentally returns success, but it should return the
> -EIO error code from adfs_fplus_validate_header().
>
> Fixes: d79288b4f61b ("fs/adfs: bigdir: calculate and validate directory checkbyte")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Good catch.
Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
Al, please apply, thanks.
> ---
> fs/adfs/dir_fplus.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/adfs/dir_fplus.c b/fs/adfs/dir_fplus.c
> index 48ea299b6ece..4a15924014da 100644
> --- a/fs/adfs/dir_fplus.c
> +++ b/fs/adfs/dir_fplus.c
> @@ -114,7 +114,8 @@ static int adfs_fplus_read(struct super_block *sb, u32 indaddr,
> return ret;
>
> dir->bighead = h = (void *)dir->bhs[0]->b_data;
> - if (adfs_fplus_validate_header(h)) {
> + ret = adfs_fplus_validate_header(h);
> + if (ret) {
> adfs_error(sb, "dir %06x has malformed header", indaddr);
> goto out;
> }
> --
> 2.11.0
>
>
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
next prev parent reply other threads:[~2020-01-25 9:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-24 10:15 [PATCH] fs/adfs: bigdir: Fix an error code in adfs_fplus_read() Dan Carpenter
2020-01-24 10:15 ` Dan Carpenter
2020-01-25 9:29 ` Russell King - ARM Linux admin [this message]
2020-01-25 16:32 ` Al Viro
2021-05-19 10:18 Yang Li
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=20200125092930.GQ25745@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=dan.carpenter@oracle.com \
--cc=info@metux.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=kstewart@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.