[openib-general] Re: [PATCH] Fix to backport infinipath_core.c to 2.6.9
iod00d at hp.com
Tue Oct 18 16:43:50 PDT 2005
On Tue, Oct 18, 2005 at 01:44:52PM -0700, Roland Dreier wrote:
> Robert> In trying to backport svn3796 back to 2.6.9, I got a
> Robert> compile error on infinipath_core.c. Here is a patch that I
> Robert> think fixes the problem, but have no way to test it. Can
> Robert> you review the patch and if it looks OK, I will include it
> Robert> in my next set of backport patches ?
> That looks like it should work to me.
> Incidentally, I hadn't noticed that struct pci_driver had added a
> .owner member. Does anyone know what it's used for? It seems that
> very few in-tree drivers set it to anything.
Uhm, in 2.6.13, i get:
grundler <496>find -name \*.c | xargs fgrep ".owner =" | wc
569 2429 32166
I am getting some false positives in that count though.
I expect the key uses are for sysfs:
./fs/sysfs/bin.c: if (!try_module_get(attr->attr.owner))
and some similar code in ALSA (sound/).
It looks like the module_get/put is just managing the reference count
for driver modules when someone opens a /sys file owned by that driver.
More information about the general