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: <a135a18c-b332-33aa-9d79-da3395502e3f@omp.ru>
Date:   Sat, 26 Feb 2022 23:53:35 +0300
From:   Sergey Shtylyov <s.shtylyov@....ru>
To:     Stefani Seibold <stefani@...bold.net>,
        <linux-kernel@...r.kernel.org>
Subject: [PATCH] kfifo: make '__n' local variables *unsigned int*

The '__n' local variables in kfifo_{in|out|out_peek}() are declared as
*unsigned long* for some strange reason -- the underlying __kfifo_*()
functions take *unsigned int* for the corresponding 'len' parameters.
Fix those declarations to *unsigned int*...

Signed-off-by: Sergey Shtylyov <s.shtylyov@....ru>

---
This patch is against Linus Torvalds' 'linux.git' repo.

 include/linux/kfifo.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Index: usb/include/linux/kfifo.h
===================================================================
--- usb.orig/include/linux/kfifo.h
+++ usb/include/linux/kfifo.h
@@ -520,7 +520,7 @@ __kfifo_uint_must_check_helper( \
 ({ \
 	typeof((fifo) + 1) __tmp = (fifo); \
 	typeof(__tmp->ptr_const) __buf = (buf); \
-	unsigned long __n = (n); \
+	unsigned int __n = (n); \
 	const size_t __recsize = sizeof(*__tmp->rectype); \
 	struct __kfifo *__kfifo = &__tmp->kfifo; \
 	(__recsize) ?\
@@ -589,7 +589,7 @@ __kfifo_uint_must_check_helper( \
 ({ \
 	typeof((fifo) + 1) __tmp = (fifo); \
 	typeof(__tmp->ptr) __buf = (buf); \
-	unsigned long __n = (n); \
+	unsigned int __n = (n); \
 	const size_t __recsize = sizeof(*__tmp->rectype); \
 	struct __kfifo *__kfifo = &__tmp->kfifo; \
 	(__recsize) ?\
@@ -819,7 +819,7 @@ __kfifo_uint_must_check_helper( \
 ({ \
 	typeof((fifo) + 1) __tmp = (fifo); \
 	typeof(__tmp->ptr) __buf = (buf); \
-	unsigned long __n = (n); \
+	unsigned int __n = (n); \
 	const size_t __recsize = sizeof(*__tmp->rectype); \
 	struct __kfifo *__kfifo = &__tmp->kfifo; \
 	(__recsize) ? \

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ