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-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun,  2 Jun 2024 20:32:59 -0400
From: Kent Overstreet <kent.overstreet@...ux.dev>
To: linux-fsdevel@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>,
	Kent Overstreet <kent.overstreet@...ux.dev>,
	brauner@...nel.org,
	viro@...iv.linux.org.uk,
	Bernd Schubert <bernd.schubert@...tmail.fm>,
	linux-mm@...ck.org,
	Josef Bacik <josef@...icpanda.com>
Subject: [PATCH 2/5] darray: Fix darray_for_each_reverse() when darray is empty

Signed-off-by: Kent Overstreet <kent.overstreet@...ux.dev>
---
 include/linux/darray.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/darray.h b/include/linux/darray.h
index ff167eb795f2..603d6762c29a 100644
--- a/include/linux/darray.h
+++ b/include/linux/darray.h
@@ -108,7 +108,7 @@ do {									\
 	for (typeof(&(_d).data[0]) _i = (_d).data; _i < (_d).data + (_d).nr; _i++)
 
 #define darray_for_each_reverse(_d, _i)					\
-	for (typeof(&(_d).data[0]) _i = (_d).data + (_d).nr - 1; _i >= (_d).data; --_i)
+	for (typeof(&(_d).data[0]) _i = (_d).data + (_d).nr - 1; (_d).data && _i >= (_d).data; --_i)
 
 #define darray_init(_d)							\
 do {									\
-- 
2.45.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ