diff --git a/target/linux/generic/patches-3.8/996-zsmalloc_allow_module_build.patch b/target/linux/generic/patches-3.8/996-zsmalloc_allow_module_build.patch
new file mode 100644
index 0000000000000000000000000000000000000000..eaa9fc60e9a88510d92eb304f3f69bd3389dcbca
--- /dev/null
+++ b/target/linux/generic/patches-3.8/996-zsmalloc_allow_module_build.patch
@@ -0,0 +1,9 @@
+--- a/drivers/staging/zsmalloc/Kconfig
++++ b/drivers/staging/zsmalloc/Kconfig
+@@ -1,5 +1,5 @@
+ config ZSMALLOC
+-	bool "Memory allocator for compressed pages"
++	tristate "Memory allocator for compressed pages"
+ 	default n
+ 	help
+ 	  zsmalloc is a slab-based memory allocator designed to store
diff --git a/target/linux/generic/patches-3.9/996-zsmalloc_allow_module_build.patch b/target/linux/generic/patches-3.9/996-zsmalloc_allow_module_build.patch
new file mode 100644
index 0000000000000000000000000000000000000000..eaa9fc60e9a88510d92eb304f3f69bd3389dcbca
--- /dev/null
+++ b/target/linux/generic/patches-3.9/996-zsmalloc_allow_module_build.patch
@@ -0,0 +1,9 @@
+--- a/drivers/staging/zsmalloc/Kconfig
++++ b/drivers/staging/zsmalloc/Kconfig
+@@ -1,5 +1,5 @@
+ config ZSMALLOC
+-	bool "Memory allocator for compressed pages"
++	tristate "Memory allocator for compressed pages"
+ 	default n
+ 	help
+ 	  zsmalloc is a slab-based memory allocator designed to store