[kernel] r19174 - in dists/trunk/linux/debian: . patches patches/bugfix/x86
Ben Hutchings
benh at alioth.debian.org
Wed Jun 20 01:36:06 UTC 2012
Author: benh
Date: Wed Jun 20 01:36:04 2012
New Revision: 19174
Log:
[x86] staging: zsmalloc: Finish conversion to a separate module (Closes: #677273)
Added:
dists/trunk/linux/debian/patches/bugfix/x86/zsmalloc-Finish-conversion-to-a-separate-module.patch
Modified:
dists/trunk/linux/debian/changelog
dists/trunk/linux/debian/patches/series
Modified: dists/trunk/linux/debian/changelog
==============================================================================
--- dists/trunk/linux/debian/changelog Wed Jun 20 00:57:10 2012 (r19173)
+++ dists/trunk/linux/debian/changelog Wed Jun 20 01:36:04 2012 (r19174)
@@ -11,6 +11,8 @@
* [rt] Update to 3.4.2-rt10 (no functional change)
* [x32] Build a linux-libc-dev package
* input: Enable MOUSE_SYNAPTICS_USB (Closes: #678071)
+ * [x86] staging: zsmalloc: Finish conversion to a separate module
+ (Closes: #677273)
-- Ben Hutchings <ben at decadent.org.uk> Thu, 07 Jun 2012 04:45:03 +0100
Added: dists/trunk/linux/debian/patches/bugfix/x86/zsmalloc-Finish-conversion-to-a-separate-module.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/trunk/linux/debian/patches/bugfix/x86/zsmalloc-Finish-conversion-to-a-separate-module.patch Wed Jun 20 01:36:04 2012 (r19174)
@@ -0,0 +1,87 @@
+From: Ben Hutchings <ben at decadent.org.uk>
+Date: Wed, 20 Jun 2012 02:19:23 +0100
+Subject: staging: zsmalloc: Finish conversion to a separate module
+Bug-Debian: http://bugs.debian.org/677273
+
+ZSMALLOC is tristate, but the code has no MODULE_LICENSE and since it
+depends on GPL-only symbols it cannot be loaded as a module. This in
+turn breaks zram which now depends on it. I assume it's meant to be
+Dual BSD/GPL like the other z-stuff.
+
+There is also no module_exit, which makes it impossible to unload.
+Add the appropriate module_init and module_exit declarations suggested
+by comments.
+
+Reported-by: Christian Ohm <chr.ohm at gmx.net>
+References: http://bugs.debian.org/677273
+Cc: stable at vger.kernel.org # v3.4
+Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
+---
+ drivers/staging/zsmalloc/zsmalloc-main.c | 33 +++++++-----------------------
+ 1 file changed, 7 insertions(+), 26 deletions(-)
+
+diff --git a/drivers/staging/zsmalloc/zsmalloc-main.c b/drivers/staging/zsmalloc/zsmalloc-main.c
+index 4496737..8ded9a0 100644
+--- a/drivers/staging/zsmalloc/zsmalloc-main.c
++++ b/drivers/staging/zsmalloc/zsmalloc-main.c
+@@ -425,12 +425,6 @@ static struct page *find_get_zspage(struct size_class *class)
+ }
+
+
+-/*
+- * If this becomes a separate module, register zs_init() with
+- * module_init(), zs_exit with module_exit(), and remove zs_initialized
+-*/
+-static int zs_initialized;
+-
+ static int zs_cpu_notifier(struct notifier_block *nb, unsigned long action,
+ void *pcpu)
+ {
+@@ -489,7 +483,7 @@ fail:
+
+ struct zs_pool *zs_create_pool(const char *name, gfp_t flags)
+ {
+- int i, error, ovhd_size;
++ int i, ovhd_size;
+ struct zs_pool *pool;
+
+ if (!name)
+@@ -516,28 +510,9 @@ struct zs_pool *zs_create_pool(const char *name, gfp_t flags)
+
+ }
+
+- /*
+- * If this becomes a separate module, register zs_init with
+- * module_init, and remove this block
+- */
+- if (!zs_initialized) {
+- error = zs_init();
+- if (error)
+- goto cleanup;
+- zs_initialized = 1;
+- }
+-
+ pool->flags = flags;
+ pool->name = name;
+
+- error = 0; /* Success */
+-
+-cleanup:
+- if (error) {
+- zs_destroy_pool(pool);
+- pool = NULL;
+- }
+-
+ return pool;
+ }
+ EXPORT_SYMBOL_GPL(zs_create_pool);
+@@ -753,3 +728,9 @@ u64 zs_get_total_size_bytes(struct zs_pool *pool)
+ return npages << PAGE_SHIFT;
+ }
+ EXPORT_SYMBOL_GPL(zs_get_total_size_bytes);
++
++module_init(zs_init);
++module_exit(zs_exit);
++
++MODULE_LICENSE("Dual BSD/GPL");
++MODULE_AUTHOR("Nitin Gupta <ngupta at vflare.org>");
Modified: dists/trunk/linux/debian/patches/series
==============================================================================
--- dists/trunk/linux/debian/patches/series Wed Jun 20 00:57:10 2012 (r19173)
+++ dists/trunk/linux/debian/patches/series Wed Jun 20 01:36:04 2012 (r19174)
@@ -98,3 +98,4 @@
bugfix/all/macvtap-zerocopy-validate-vectors-before-building-sk.patch
bugfix/all/KVM-Fix-buffer-overflow-in-kvm_set_irq.patch
+bugfix/x86/zsmalloc-Finish-conversion-to-a-separate-module.patch
More information about the Kernel-svn-changes
mailing list