* [folded-merged] lib-string_helpersc-fix-infinite-loop-in-string_get_size-v3.patch removed from -mm tree
@ 2015-09-17 22:59 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2015-09-17 22:59 UTC (permalink / raw)
To: vkuznets, JBottomley, andriy.shevchenko, kys, linux, mm-commits
The patch titled
Subject: lib-string_helpersc-fix-infinite-loop-in-string_get_size-v3
has been removed from the -mm tree. Its filename was
lib-string_helpersc-fix-infinite-loop-in-string_get_size-v3.patch
This patch was dropped because it was folded into lib-string_helpersc-fix-infinite-loop-in-string_get_size.patch
------------------------------------------------------
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Subject: lib-string_helpersc-fix-infinite-loop-in-string_get_size-v3
Add a couple of simple tests for string_get_size(). The last one will
hang the kernel without the 'lib/string_helpers.c: fix infinite loop in
string_get_size()' fix.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Acked-by: James Bottomley <JBottomley@Odin.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
lib/string_helpers.c | 4 ++++
1 file changed, 4 insertions(+)
diff -puN lib/string_helpers.c~lib-string_helpersc-fix-infinite-loop-in-string_get_size-v3 lib/string_helpers.c
--- a/lib/string_helpers.c~lib-string_helpersc-fix-infinite-loop-in-string_get_size-v3
+++ a/lib/string_helpers.c
@@ -59,6 +59,10 @@ void string_get_size(u64 size, u64 blk_s
}
exp = divisor[units] / (u32)blk_size;
+ /*
+ * size must be strictly greater than exp here to ensure that remainder
+ * is greater than divisor[units] coming out of the if below.
+ */
if (size > exp) {
remainder = do_div(size, divisor[units]);
remainder *= blk_size;
_
Patches currently in -mm which might be from vkuznets@redhat.com are
lib-string_helpersc-fix-infinite-loop-in-string_get_size.patch
lib-test-string_helpersc-add-string_get_size-tests.patch
lib-test-string_helpersc-add-string_get_size-tests-v5.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-09-17 22:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-17 22:59 [folded-merged] lib-string_helpersc-fix-infinite-loop-in-string_get_size-v3.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.