The patch titled
     Subject: lib/flex_proportions.c: fix corruption of denominator in flexible 
proportions
has been removed from the -mm tree.  Its filename was
     
lib-flex_proportionsc-fix-corruption-of-denominator-in-flexible-proportions.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Jan Kara <j...@suse.cz>
Subject: lib/flex_proportions.c: fix corruption of denominator in flexible 
proportions

When racing with CPU hotplug, percpu_counter_sum() can return negative
values for the number of observed events.  This confuses
fprop_new_period(), which uses unsigned type and as a result number of
events is set to big *positive* number.  From that moment on, things go
pear shaped and can result e.g.  in division by zero as denominator is
later truncated to 32-bits.

This bug causes a divide-by-zero oops in bdi_dirty_limit() in Borislav's
3.6.0-rc6 based kernel.

Fix the issue by using a signed type in fprop_new_period().  That makes us
bail out from the function without doing anything (mistakenly) thinking
there are no events to age.  That makes aging somewhat inaccurate but
getting accurate data would be rather hard.

Signed-off-by: Jan Kara <j...@suse.cz>
Reported-by: Borislav Petkov <b...@amd64.org>
Reported-by: Srivatsa S. Bhat <srivatsa.b...@linux.vnet.ibm.com>
Cc: Wu Fengguang <fengguang...@intel.com>
Cc: Peter Zijlstra <a.p.zijls...@chello.nl>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <a...@linux-foundation.org>
---

 lib/flex_proportions.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN 
lib/flex_proportions.c~lib-flex_proportionsc-fix-corruption-of-denominator-in-flexible-proportions
 lib/flex_proportions.c
--- 
a/lib/flex_proportions.c~lib-flex_proportionsc-fix-corruption-of-denominator-in-flexible-proportions
+++ a/lib/flex_proportions.c
@@ -62,7 +62,7 @@ void fprop_global_destroy(struct fprop_g
  */
 bool fprop_new_period(struct fprop_global *p, int periods)
 {
-       u64 events;
+       s64 events;
        unsigned long flags;
 
        local_irq_save(flags);
_

Patches currently in -mm which might be from j...@suse.cz are

origin.patch
linux-next.patch
fs-change-return-values-from-eacces-to-eperm.patch
hfsplus-add-on-disk-layout-declarations-related-to-attributes-tree.patch
hfsplus-add-functionality-of-manipulating-by-records-in-attributes-tree.patch
hfsplus-rework-functionality-of-getting-setting-and-deleting-of-extended-attributes.patch
hfsplus-add-support-of-manipulation-by-attributes-file.patch

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to