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: <20180326181823.5536-1-mkelly@xevo.com>
Date:   Mon, 26 Mar 2018 11:18:23 -0700
From:   Martin Kelly <mkelly@...o.com>
To:     linux-kernel@...r.kernel.org
Cc:     Stefani Seibold <stefani@...bold.net>,
        Andrew Morton <akpm@...ux-foundation.org>, trivial@...nel.org,
        Martin Kelly <mkelly@...o.com>
Subject: [PATCH] kfifo: fix inaccurate comment

The comment in __kfifo_alloc says we round down, but we actually round
up, so correct it.

Signed-off-by: Martin Kelly <mkelly@...o.com>
---
 lib/kfifo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/kfifo.c b/lib/kfifo.c
index 90ba1eb1df06..b0f757bf7213 100644
--- a/lib/kfifo.c
+++ b/lib/kfifo.c
@@ -39,7 +39,7 @@ int __kfifo_alloc(struct __kfifo *fifo, unsigned int size,
 		size_t esize, gfp_t gfp_mask)
 {
 	/*
-	 * round down to the next power of 2, since our 'let the indices
+	 * round up to the next power of 2, since our 'let the indices
 	 * wrap' technique works only in this case.
 	 */
 	size = roundup_pow_of_two(size);
-- 
2.11.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ