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:   Tue, 24 Aug 2021 23:29:14 -0700
From:   CGEL <cgel.zte@...il.com>
To:     Anton Altaparmakov <anton@...era.com>
Cc:     linux-ntfs-dev@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
        Jing Yangyang <jing.yangyang@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] fs/ntfs/mft.c: fix bugon.cocci warnings

From: Jing Yangyang <jing.yangyang@....com.cn>

Use BUG_ON instead of a if condition followed by BUG.

Generated by: scripts/coccinelle/misc/bugon.cocci

Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Jing Yangyang <jing.yangyang@....com.cn>
---
 fs/ntfs/mft.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/ntfs/mft.c b/fs/ntfs/mft.c
index 0d62cd5..588407a 100644
--- a/fs/ntfs/mft.c
+++ b/fs/ntfs/mft.c
@@ -577,8 +577,7 @@ int ntfs_sync_mft_mirror(ntfs_volume *vol, const unsigned long mft_no,
 		for (i_bhs = 0; i_bhs < nr_bhs; i_bhs++) {
 			struct buffer_head *tbh = bhs[i_bhs];
 
-			if (!trylock_buffer(tbh))
-				BUG();
+			BUG_ON(!trylock_buffer(tbh));
 			BUG_ON(!buffer_uptodate(tbh));
 			clear_buffer_dirty(tbh);
 			get_bh(tbh);
-- 
1.8.3.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ