diff options
| author | Gertjan van Wingerde <gwingerde@gmail.com> | 2009-04-01 21:18:11 +0200 |
|---|---|---|
| committer | Chris Wright <chrisw@sous-sol.org> | 2009-04-27 10:36:52 -0700 |
| commit | f8629efabc754f5c0003ce38c28b26db7ca89244 (patch) | |
| tree | 8a9f5c9a324841fc802b9722f9cb721b4382c3af /drivers/net/wireless/rt2x00/rt2x00lib.h | |
| parent | c3d82093749274b9f86d9a058372cccb9eed3ac0 (diff) | |
rt2x00: Fix SLAB corruption during rmmod
At rmmod stage, the code path is the following one :
rt2x00lib_remove_dev
-> rt2x00lib_uninitialize()
-> rt2x00rfkill_unregister()
-> rfkill_unregister()
-> rt2x00rfkill_free()
-> rfkill_free()
The problem is that rfkill_free should not be called after rfkill_register
otherwise put_device(&rfkill->dev) will be called 2 times. This patch
fixes this by only calling rt2x00rfkill_free() when rt2x00rfkill_register()
hasn't been called or has failed.
This patch is for 2.6.29 only. The code in question has completely disappeared
in 2.6.30 and does not contain this bug.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Tested-by: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00lib.h')
| -rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00lib.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00lib.h b/drivers/net/wireless/rt2x00/rt2x00lib.h index 86cd26fbf769..49309d49b204 100644 --- a/drivers/net/wireless/rt2x00/rt2x00lib.h +++ b/drivers/net/wireless/rt2x00/rt2x00lib.h @@ -260,8 +260,6 @@ static inline void rt2x00crypto_rx_insert_iv(struct sk_buff *skb, #ifdef CONFIG_RT2X00_LIB_RFKILL void rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev); void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev); -void rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev); -void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev); #else static inline void rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev) { @@ -270,14 +268,6 @@ static inline void rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev) static inline void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev) { } - -static inline void rt2x00rfkill_allocate(struct rt2x00_dev *rt2x00dev) -{ -} - -static inline void rt2x00rfkill_free(struct rt2x00_dev *rt2x00dev) -{ -} #endif /* CONFIG_RT2X00_LIB_RFKILL */ /* |
