[merged mm-nonmm-stable] lib-string-fix-memchr_inv-for-large-ranges.patch removed from -mm tree

Andrew Morton <[email protected]> Mon, 03 Aug 2026 21:04:45 -0700
Newsgroups org.kernel.vger.mm-commits
Message-ID <[email protected]>
The quilt patch titled
     Subject: lib/string: fix memchr_inv() for large ranges
has been removed from the -mm tree.  Its filename was
     lib-string-fix-memchr_inv-for-large-ranges.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Bradley Morgan <[email protected]>
Subject: lib/string: fix memchr_inv() for large ranges
Date: Sun, 21 Jun 2026 12:11:33 +0000

memchr_inv() takes a size_t length but counts 8 byte words in an unsigned
int.  At 32GiB that count wraps, so the scan can quietly miss most of the
range.

Use size_t for the word count.

Link: https://lore.kernel.org/[email protected]
Fixes: 798248206b59 ("lib/string.c: introduce memchr_inv()")
Signed-off-by: Bradley Morgan <[email protected]>
Cc: Akinbou Mita <[email protected]>
Cc: Andy Shevchenko <[email protected]>
Cc: Christoph Lameer <[email protected]>
Cc: Joern Engel <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Pekka Enberg <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

 lib/string.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/lib/string.c~lib-string-fix-memchr_inv-for-large-ranges
+++ a/lib/string.c
@@ -821,7 +821,8 @@ void *memchr_inv(const void *start, int
 {
 	u8 value = c;
 	u64 value64;
-	unsigned int words, prefix;
+	size_t words;
+	unsigned int prefix;
 
 	if (bytes <= 16)
 		return check_bytes8(start, value, bytes);
_

Patches currently in -mm which might be from [email protected] are

taskstats-drop-the-dead-null-attribute-check-in-parse.patch
taskstats-fold-the-two-cpumask-handlers-into-one.patch