Module Ref Counting & ibmphp

From: Srihari Vijayaraghavan
Date: Tue Mar 14 2006 - 17:44:28 EST


Before (in 2.6.16-rc*):
$ egrep 'ibmphp' /proc/modules
ibmphp 67809 4294967295 - Live 0xf8910000
^^^^^^^^^^

After [1]:
ibmphp 64224 0 - Live 0xf8965000
^

Of course, now I'm able to successfully unload ibmphp
(& subsequently load it too :)) without any
observeable problems.

It'd seem, thro struct hotplug_slot_ops, module ref
count for ibmphp is taken care of. No?

Correct me, if I'm completely wrong here. Perhaps,
there may be a better way to address this that I'm
unaware of. If so, enlighten me.

I'm afraid I've no hardware to verify whether the
patch introduces any regressions.

Thanks

[1]
--- 2.6.16-rc6/drivers/pci/hotplug/ibmphp_core.c.orig
2006-03-15 03:37:38.000000000 +1100
+++ 2.6.16-rc6/drivers/pci/hotplug/ibmphp_core.c
2006-03-14 16:57:26.000000000 +1100
@@ -1398,10 +1398,6 @@
goto error;
}

- /* lock ourselves into memory with a module
- * count of -1 so that no one can unload us. */
- module_put(THIS_MODULE);
-
exit:
return rc;





____________________________________________________
On Yahoo!7
Answers: Real people ask and answer questions on any topic.
http://www.yahoo7.com.au/answers.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/