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:	Fri, 20 Mar 2015 17:47:24 -0400
From:	Taesoo Kim <tsgatesv@...il.com>
To:	dushistov@...l.ru, linux-kernel@...r.kernel.org
Cc:	taesoo@...ech.edu, changwoo@...ech.edu, sanidhya@...ech.edu,
	blee@...ech.edu, csong84@...ech.edu,
	Taesoo Kim <tsgatesv@...il.com>
Subject: [PATCH 1/1] ufs: return correct errno for write_inode()

Instead of -1, properly return -EIO upon write_inode()
error, similar/consistant to the rest of filesystems.

Signed-off-by: Taesoo Kim <tsgatesv@...il.com>
---
 fs/ufs/inode.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c
index be7d42c..9f910d8 100644
--- a/fs/ufs/inode.c
+++ b/fs/ufs/inode.c
@@ -836,13 +836,13 @@ static int ufs_update_inode(struct inode * inode, int do_sync)
 	if (inode->i_ino < UFS_ROOTINO ||
 	    inode->i_ino > (uspi->s_ncg * uspi->s_ipg)) {
 		ufs_warning (sb, "ufs_read_inode", "bad inode number (%lu)\n", inode->i_ino);
-		return -1;
+		return -EIO;
 	}
 
 	bh = sb_bread(sb, ufs_inotofsba(inode->i_ino));
 	if (!bh) {
 		ufs_warning (sb, "ufs_read_inode", "unable to read inode %lu\n", inode->i_ino);
-		return -1;
+		return -EIO;
 	}
 	if (uspi->fs_magic == UFS2_MAGIC) {
 		struct ufs2_inode *ufs2_inode = (struct ufs2_inode *)bh->b_data;
-- 
2.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ