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]
Message-Id: <20230818091423.97536-1-mengferry@linux.alibaba.com>
Date:   Fri, 18 Aug 2023 17:14:23 +0800
From:   Ferry Meng <mengferry@...ux.alibaba.com>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Ferry Meng <mengferry@...ux.alibaba.com>
Subject: [PATCH] freevxfs: fix potential double brelse

Fix smatch warning:

fs/freevxfs/vxfs_bmap.c:170 vxfs_bmap_indir() warn: passing freed memory
'bp'

Signed-off-by: Ferry Meng <mengferry@...ux.alibaba.com>

diff --git a/fs/freevxfs/vxfs_bmap.c b/fs/freevxfs/vxfs_bmap.c
index de2a5bccb930..e2e143f182e1 100644
--- a/fs/freevxfs/vxfs_bmap.c
+++ b/fs/freevxfs/vxfs_bmap.c
@@ -126,6 +126,7 @@ vxfs_bmap_indir(struct inode *ip, long indir, int size, long block)
 
 		if (block < off) {
 			brelse(bp);
+			bp = NULL;
 			continue;
 		}
 
@@ -162,6 +163,7 @@ vxfs_bmap_indir(struct inode *ip, long indir, int size, long block)
 			BUG();
 		}
 		brelse(bp);
+		bp = NULL;
 	}
 
 fail:
-- 
2.19.1.6.gb485710b

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ