From a80eec4346d5eca0dacc772aeaa5aa2094a660e2 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Mon, 28 Nov 2011 18:40:35 +0100 Subject: Fix double reference counting on the kernel module causing GPF --- driver/base.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'driver') diff --git a/driver/base.c b/driver/base.c index 51dd1f4..8215660 100644 --- a/driver/base.c +++ b/driver/base.c @@ -501,7 +501,6 @@ static struct file_operations pcidriver_fops = { }; void pcidriver_module_get(pcidriver_privdata_t *privdata) { - try_module_get(THIS_MODULE); atomic_inc(&(privdata->refs)); // mod_info("Ref: %i\n", atomic_read(&(privdata->refs))); } @@ -511,7 +510,6 @@ void pcidriver_module_put(pcidriver_privdata_t *privdata) { atomic_inc(&(privdata->refs)); mod_info("Reference counting error..."); } else { - module_put(THIS_MODULE); // mod_info("Unref: %i\n", atomic_read(&(privdata->refs))); } } -- cgit v1.2.3