ath9k: fix access to freed data on unload
Calling ath_bus_cleanup() after ieee80211_free_hw() resulted in access to common->bus_ops, which is already freed as part of the device data. Remove the cleanup field in struct ath_bus_ops, as it was never used properly. Remove ath_bus_cleanup(). Merge cleanup functions in place of the ath_bus_cleanup() calls. Take care not to use any device data after ieee80211_free_hw(). Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
e389900ed3
commit
ab5132a262
@@ -538,11 +538,6 @@ static inline void ath_read_cachesize(struct ath_common *common, int *csz)
|
||||
common->bus_ops->read_cachesize(common, csz);
|
||||
}
|
||||
|
||||
static inline void ath_bus_cleanup(struct ath_common *common)
|
||||
{
|
||||
common->bus_ops->cleanup(common);
|
||||
}
|
||||
|
||||
extern struct ieee80211_ops ath9k_ops;
|
||||
extern int modparam_nohwcrypt;
|
||||
|
||||
|
Reference in New Issue
Block a user