> Adding a field to every registerable structure is gross. The
> responsibility for getting modules right should be with the person
> writing the modules. The rules are simple; and people w/o module
> support don't pay the penalty for the extra field everywhere...
It's possible to have the module use count maintained from outside the
driver without having the extra structure.
Take a look at put_module_symbol() in kernel/module.c. It doesn't require
any argument other than the address of the function, and it can find the
module quite happily.
So it's theoretically possible to code up a get_module_symbol_byaddr()
which does the converse, then for chrdev_open() et al to use that on
whatever method of the fops is expected to be present in every case.
While we're at it - can we get rid of MOD_INC_USE_COUNT and
__MOD_INC_USE_COUNT altogether to force people to be aware of the need for
try_inc_mod_count and checking its return value? First thing in 2.5 along
with removing sleep_on() ?
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to email@example.com Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon Jun 26 2000 - 21:00:08 EST