ath9k: use GFP_ATOMIC under spinlock
Subsystems (2)
PATCH 1/1 ath9k: use GFP_ATOMIC under spinlock
This is called with spinlocks held so we have to use GFP_ATOMIC. It's the sc_pcu_lock in ath9k_stop() that's the issue. The call tree looks like this:
ath9k_stop()ath_prepare_reset()ath_stoprecv()ath_flushrecv()ath_rx_tasklet()ath9k_dfs_process_phyerr()pd->add_pulse() => dpd_add_pulse()channel_detector_get()channel_detector_create()pri_detector_init()
channel_detector_create() uses GFP_ATOMIC as well.
---
Static analysis stuff. I haven't tested this but it looks like a real bug to me.
drivers/net/wireless/ath/ath9k/dfs_pri_detector.c +2 -1
@@ -434,7 +434,8 @@ struct pri_detector * pri_detector_init(const struct radar_detector_specs *rs) {struct pri_detector *de; - de =kzalloc (sizeof (*de),GFP_KERNEL ); + + de =kzalloc (sizeof (*de),GFP_ATOMIC );if (de ==NULL )return NULL ; de->exit = pri_detector_exit;
PATCH 1/1 ath9k: use GFP_ATOMIC under spinlock
Quoted 15 lines · Dan Carpenter
This is called with spinlocks held so we have to use
GFP_ATOMIC. It's thesc_pcu_lockinath9k_stop()that's the issue. The call tree looks like this:
ath9k_stop()ath_prepare_reset()ath_stoprecv()ath_flushrecv()ath_rx_tasklet()ath9k_dfs_process_phyerr()pd->add_pulse()=>dpd_add_pulse()channel_detector_get()channel_detector_create()pri_detector_init()
Quoted 7 lines
channel_detector_create()usesGFP_ATOMICas well.Signed-off-by Dan Carpenter <[email protected]>---
Static analysis stuff. I haven't tested this but it looks like a real bug to me.
Thanks Dan,
it is a bug that slipped through the related patch in [1].
Tested-by & Acked-by: Zefir Kurtisi <[email protected]>
[1] http://article.gmane.org/gmane.linux.kernel.wireless.general/106349/