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: <20220801190311.65703-1-sherry.yang@oracle.com>
Date:   Mon,  1 Aug 2022 12:03:11 -0700
From:   Sherry Yang <sherry.yang@...cle.com>
To:     djwong@...nel.org, dchinner@...hat.com,
        allison.henderson@...cle.com, chandanrlinux@...il.com,
        bfoster@...hat.com
Cc:     linux-xfs@...r.kernel.org, linux-kernel@...r.kernel.org,
        sherry.yang@...cle.com
Subject: [PATCH v1] xfs: initialize error in xfs_defer_finish_one

Path through non-void function 'xfs_defer_finish_one' may return error
uninitialized if no iteration of 'list_for_each_safe' occurs. Fix this
by initializing error.

Fixes: bb47d79750f1 ("xfs: refactor xfs_defer_finish_noroll")
Cc: stable@...r.kernel.org
Signed-off-by: Sherry Yang <sherry.yang@...cle.com>
---
 fs/xfs/libxfs/xfs_defer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/libxfs/xfs_defer.c b/fs/xfs/libxfs/xfs_defer.c
index 5a321b783398..3188712ff34e 100644
--- a/fs/xfs/libxfs/xfs_defer.c
+++ b/fs/xfs/libxfs/xfs_defer.c
@@ -468,7 +468,7 @@ xfs_defer_finish_one(
 	const struct xfs_defer_op_type	*ops = defer_op_types[dfp->dfp_type];
 	struct xfs_btree_cur		*state = NULL;
 	struct list_head		*li, *n;
-	int				error;
+	int				error = 0;
 
 	trace_xfs_defer_pending_finish(tp->t_mountp, dfp);
 
-- 
2.31.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ