lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon, 16 May 2016 23:02:23 -0700
From:	Heloise <os@...as.ac.cn>
To:	akpm@...ux-foundation.org, hannes@...xchg.org, firogm@...il.com,
	vdavydov@...tuozzo.com, viro@...iv.linux.org.uk
Cc:	linux-kernel@...r.kernel.org, os@...as.ac.cn
Subject: [PATCH] fs:efs:fix return value

When the function sb_bread() fails, the return value should
be -EIO, fix it.

Signed-off-by: Heloise <os@...as.ac.cn>
---
 fs/efs/super.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/efs/super.c b/fs/efs/super.c
index cb68dac..368f7dd 100644
--- a/fs/efs/super.c
+++ b/fs/efs/super.c
@@ -275,7 +275,7 @@ static int efs_fill_super(struct super_block *s, void *d, int silent)
 
 	if (!bh) {
 		pr_err("cannot read volume header\n");
-		return -EINVAL;
+		return -EIO;
 	}
 
 	/*
@@ -293,7 +293,7 @@ static int efs_fill_super(struct super_block *s, void *d, int silent)
 	bh = sb_bread(s, sb->fs_start + EFS_SUPER);
 	if (!bh) {
 		pr_err("cannot read superblock\n");
-		return -EINVAL;
+		return -EIO;
 	}
 		
 	if (efs_validate_super(sb, (struct efs_super *) bh->b_data)) {
-- 
2.1.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ