[kernel] r18259 - in dists/trunk/linux-2.6/debian: . patches/bugfix/all patches/series
Ben Hutchings
benh at alioth.debian.org
Sun Nov 13 16:59:21 UTC 2011
Author: benh
Date: Sun Nov 13 16:59:19 2011
New Revision: 18259
Log:
vmscan: fix shrinker callback bug in fs/super.c
Added:
dists/trunk/linux-2.6/debian/patches/bugfix/all/vmscan-fix-shrinker-callback-bug-in-fs-super.c.patch
Modified:
dists/trunk/linux-2.6/debian/changelog
dists/trunk/linux-2.6/debian/patches/series/base
Modified: dists/trunk/linux-2.6/debian/changelog
==============================================================================
--- dists/trunk/linux-2.6/debian/changelog Sun Nov 13 16:51:57 2011 (r18258)
+++ dists/trunk/linux-2.6/debian/changelog Sun Nov 13 16:59:19 2011 (r18259)
@@ -19,6 +19,7 @@
* DFSG: Remove drivers/staging/ft1000/ft1000-*/*.img, non-free
firmware for drivers we don't build
* hfs: fix hfs_find_init() sb->ext_tree NULL ptr oops (CVE-2011-2203)
+ * vmscan: fix shrinker callback bug in fs/super.c
-- Ben Hutchings <ben at decadent.org.uk> Fri, 04 Nov 2011 15:05:47 +0000
Added: dists/trunk/linux-2.6/debian/patches/bugfix/all/vmscan-fix-shrinker-callback-bug-in-fs-super.c.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/trunk/linux-2.6/debian/patches/bugfix/all/vmscan-fix-shrinker-callback-bug-in-fs-super.c.patch Sun Nov 13 16:59:19 2011 (r18259)
@@ -0,0 +1,46 @@
+From: Mikulas Patocka <mpatocka at redhat.com>
+Date: Mon, 31 Oct 2011 17:08:57 -0700
+Subject: [PATCH] vmscan: fix shrinker callback bug in fs/super.c
+
+commit 09f363c7363eb10cfb4b82094bd7064e5608258b upstream.
+
+The callback must not return -1 when nr_to_scan is zero. Fix the bug in
+fs/super.c and add this requirement to the callback specification.
+
+Signed-off-by: Mikulas Patocka <mpatocka at redhat.com>
+Cc: Dave Chinner <david at fromorbit.com>
+Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
+---
+ fs/super.c | 2 +-
+ include/linux/shrinker.h | 1 +
+ 2 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/fs/super.c b/fs/super.c
+index 3f56a26..32a81f3 100644
+--- a/fs/super.c
++++ b/fs/super.c
+@@ -61,7 +61,7 @@ static int prune_super(struct shrinker *shrink, struct shrink_control *sc)
+ return -1;
+
+ if (!grab_super_passive(sb))
+- return -1;
++ return !sc->nr_to_scan ? 0 : -1;
+
+ if (sb->s_op && sb->s_op->nr_cached_objects)
+ fs_objects = sb->s_op->nr_cached_objects(sb);
+diff --git a/include/linux/shrinker.h b/include/linux/shrinker.h
+index 790651b..a83833a 100644
+--- a/include/linux/shrinker.h
++++ b/include/linux/shrinker.h
+@@ -20,6 +20,7 @@ struct shrink_control {
+ * 'nr_to_scan' entries and attempt to free them up. It should return
+ * the number of objects which remain in the cache. If it returns -1, it means
+ * it cannot do any scanning at this time (eg. there is a risk of deadlock).
++ * The callback must not return -1 if nr_to_scan is zero.
+ *
+ * The 'gfpmask' refers to the allocation we are currently trying to
+ * fulfil.
+--
+1.7.7.2
+
Modified: dists/trunk/linux-2.6/debian/patches/series/base
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/series/base Sun Nov 13 16:51:57 2011 (r18258)
+++ dists/trunk/linux-2.6/debian/patches/series/base Sun Nov 13 16:59:19 2011 (r18259)
@@ -56,3 +56,4 @@
+ bugfix/all/Fix-build-break-when-freezer-not-configured.patch
+ bugfix/all/PM-Freezer-Reimplement-wait_event_freezekillable-usi.patch
+ bugfix/all/hfs-fix-hfs_find_init-sb-ext_tree-NULL-ptr-oops.patch
++ bugfix/all/vmscan-fix-shrinker-callback-bug-in-fs-super.c.patch
More information about the Kernel-svn-changes
mailing list