Workers may not call into a sleepable function (e.g. mutex_lock). Since ath10k workers can run for a very long time it is necessary to explicitly allow process rescheduling in case there's no preemption. This fixes some issues with system freezes, hangs, watchdogs being triggered, userspace being unresponsive on slow host machines under heavy load. Signed-off-by: Michal Kazior <michal.kazior@xxxxxxxxx> --- drivers/net/wireless/ath/ath10k/htc.c | 4 ++++ drivers/net/wireless/ath/ath10k/htt_rx.c | 4 ++++ drivers/net/wireless/ath/ath10k/wmi.c | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c index 7d445d3..99f1dbd 100644 --- a/drivers/net/wireless/ath/ath10k/htc.c +++ b/drivers/net/wireless/ath/ath10k/htc.c @@ -237,6 +237,10 @@ static void ath10k_htc_send_work(struct work_struct *work) ret = ath10k_htc_issue_skb(htc, ep, skb, credits); if (ret == -ENOSR) break; + +#ifndef CONFIG_PREEMPT + cond_resched(); +#endif } } diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index 6cf4d95..80ea398 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -1229,6 +1229,10 @@ static void ath10k_htt_rx_work(struct work_struct *work) break; ath10k_htt_rx_process_skb(htt->ar, skb); + +#ifndef CONFIG_PREEMPT + cond_resched(); +#endif } } diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 32fd5e7..f36f0be 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -1155,6 +1155,10 @@ static void ath10k_wmi_event_work(struct work_struct *work) break; ath10k_wmi_event_process(ar, skb); + +#ifndef CONFIG_PREEMPT + cond_resched(); +#endif } } -- 1.7.9.5 -- 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