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>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220317013930.124432-1-jiapeng.chong@linux.alibaba.com>
Date:   Thu, 17 Mar 2022 09:39:30 +0800
From:   Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To:     djwong@...nel.org
Cc:     linux-xfs@...r.kernel.org, linux-kernel@...r.kernel.org,
        Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>,
        Abaci Robot <abaci@...ux.alibaba.com>
Subject: [PATCH] xfs: Fix missing error code in xfs_reflink_end_cow_extent()

The error code is missing in this code scenario, add the error code
'-EINVAL' to the return value 'error'.

Eliminate the follow smatch warning:

fs/xfs/xfs_reflink.c:634 xfs_reflink_end_cow_extent() warn: missing
error code 'error'.

Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
---
 fs/xfs/xfs_reflink.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c
index 54e68e5693fd..7265f8850f65 100644
--- a/fs/xfs/xfs_reflink.c
+++ b/fs/xfs/xfs_reflink.c
@@ -631,6 +631,7 @@ xfs_reflink_end_cow_extent(
 	if (!xfs_iext_lookup_extent_before(ip, ifp, end_fsb, &icur, &got) ||
 	    got.br_startoff + got.br_blockcount <= offset_fsb) {
 		*end_fsb = offset_fsb;
+		error = -EINVAL;
 		goto out_cancel;
 	}
 
-- 
2.20.1.7.g153144c

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ