* [PATCH] fs/adfs: bigdir: Fix another error code in adfs_fplus_read()
@ 2020-12-14 11:52 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2020-12-14 11:52 UTC (permalink / raw)
To: Russell King; +Cc: Russell King, linux-kernel, kernel-janitors
This should return -EINVAL if the checkbyte is wrong instead of success.
Fixes: d79288b4f61b ("fs/adfs: bigdir: calculate and validate directory checkbyte")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Sorry for not catching this one last time. :/
fs/adfs/dir_fplus.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/adfs/dir_fplus.c b/fs/adfs/dir_fplus.c
index 4a15924014da..a5e47c94a5b9 100644
--- a/fs/adfs/dir_fplus.c
+++ b/fs/adfs/dir_fplus.c
@@ -143,6 +143,7 @@ static int adfs_fplus_read(struct super_block *sb, u32 indaddr,
if (adfs_fplus_checkbyte(dir) != t->bigdircheckbyte) {
adfs_error(sb, "dir %06x checkbyte mismatch\n", indaddr);
+ ret = -EINVAL;
goto out;
}
--
2.29.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-14 11:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-14 11:52 [PATCH] fs/adfs: bigdir: Fix another error code in adfs_fplus_read() Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox