From a2577406f5d76ec02562f083e8b345702b74fce5 Mon Sep 17 00:00:00 2001 From: Andrey Utkin Date: Tue, 8 Oct 2013 20:51:14 +0300 Subject: [PATCH 2/5] Add support for kernel 3.9 Taken from git://anonscm.debian.org/collab-maint/ndiswrapper.git debian/patches/support-kernel-3.9.patch Patch authorship is not clear, the committer was Julian Andres Klode Gentoo ebuild uses similar patch, but with LOCKDEP_STILL_OK instead of LOCKDEP_NOW_UNRELIABLE. I don't know yet which is more correct. Signed-off-by: Andrey Utkin --- driver/loader.c | 4 ++++ driver/wrapper.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/driver/loader.c b/driver/loader.c index 406e6ba..2b27252 100644 --- a/driver/loader.c +++ b/driver/loader.c @@ -575,7 +575,11 @@ static int load_user_space_driver(struct load_driver *load_driver) } else { printk(KERN_INFO "%s: driver %s (%s) loaded\n", DRIVER_NAME, wrap_driver->name, wrap_driver->version); +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0) add_taint(TAINT_PROPRIETARY_MODULE); +#else + add_taint(TAINT_PROPRIETARY_MODULE, LOCKDEP_NOW_UNRELIABLE); +#endif EXIT1(return 0); } } diff --git a/driver/wrapper.c b/driver/wrapper.c index f77c879..1bd3116 100644 --- a/driver/wrapper.c +++ b/driver/wrapper.c @@ -72,7 +72,11 @@ static void module_cleanup(void) static int __init wrapper_init(void) { #ifdef TAINT_OOT_MODULE +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0) add_taint(TAINT_OOT_MODULE); +#else + add_taint(TAINT_OOT_MODULE, LOCKDEP_NOW_UNRELIABLE); +#endif #endif printk(KERN_INFO "%s version %s loaded (smp=%s, preempt=%s)\n", DRIVER_NAME, DRIVER_VERSION, -- 1.8.4