Search Linux Wireless

Re: [PATCH] lib80211: call try_module_get() in lib80211_get_crypto_ops()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/28/2011 10:50 PM, Pavel Roskin wrote:
Doing it by the caller is racy.  Some callers neglected to do so.  Fix
callers not to call try_module_get() after lib80211_get_crypto_ops().

When ops is copied, move lib80211_crypt_delayed_deinit() after
try_module_get() to avoid the risk that the module would be unloaded
between those calls.

Signed-off-by: Pavel Roskin<proski@xxxxxxx>

Sorry, please ignore this patch! I didn't mean to send it. It's not complete, and I don't think I'll have time to fix it :(

lib80211 has a terrible API, and the module referencing is split between lib80211 and the callers. Everything is too complicated. Keys may be freed asynchronously. Module referencing is tied to the keys and not to the ops. I've seen the reference count for lib80211_crypt_ccmp to underflow and become 4294967295 or something.

Considering that lib80211 is only used by old modules, I'm even thinking of making lib80211_crypt_* modules not unloadable. It's too much work to fix.

What I actually intended to send is "lib80211: remove exports for functions not called by other modules". That "simplifies" the API a little bit.

--
Regards,
Pavel Roskin
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux