[PATCH] Linking into 2.4 kernel
Jouni Malinen
jkmaline
Wed May 14 18:36:19 PDT 2003
On Wed, May 14, 2003 at 07:41:43PM -0400, Pavel Roskin wrote:
> __MOD_DEC_USE_COUNT and __MOD_INC_USE_COUNT should not be called if MODULE
> is not defined, i.e. when the module is compiled into the kernel. For
> 2.4 kernels this causes kernel oops when the interface is being brought
> up. Thanks to Christian Lauterbach for reporting this bug.
>
> A minimal patch is attached.
Thanks, applied.
> A better solution would be to use SET_MODULE_OWNER(dev) and let the
> network code lock and unlock the modules. That's what the orinoco driver
> does for both 2.4 and 2.5 kernels.
try_module_get/module_put is already used in 2.5 case, but yes,
SET_MODULE_OWNER could be better for this.
> However, this may break 2.2 kernels and I don't have time and desire to
> handle 2.2, 2.4 and 2.5 kernels separately and test the new code with all
> of them.
Yes, and it looks like there will be even more 2.2/2.4/2.6 differences
if the driver is to get into kernel tree at some point.. Maybe we
actually need a new version of the driver that is made only for the
latest 2.5 version. However, this will easily end up in the other
version (2.2/2.4/2.5) lagging in new features..
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list