summaryrefslogtreecommitdiff
path: root/net/mac80211
diff options
context:
space:
mode:
authorJia-Ju Bai <baijiaju1990@gmail.com>2018-09-01 20:11:05 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-10 08:54:21 +0200
commit8590e6fecb5e672e522daa840f01e33272c13b88 (patch)
tree616e7904f1a30356b103efc944966a2da56ff66c /net/mac80211
parentb08d15cc921f9bdd472dc4b264998e88cd7d0071 (diff)
net: cadence: Fix a sleep-in-atomic-context bug in macb_halt_tx()
[ Upstream commit 16fe10cf92783ed9ceb182d6ea2b8adf5e8ec1b8 ] The kernel module may sleep with holding a spinlock. The function call paths (from bottom to top) in Linux-4.16 are: [FUNC] usleep_range drivers/net/ethernet/cadence/macb_main.c, 648: usleep_range in macb_halt_tx drivers/net/ethernet/cadence/macb_main.c, 730: macb_halt_tx in macb_tx_error_task drivers/net/ethernet/cadence/macb_main.c, 721: _raw_spin_lock_irqsave in macb_tx_error_task To fix this bug, usleep_range() is replaced with udelay(). This bug is found by my static analysis tool DSAC. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/mac80211')
0 files changed, 0 insertions, 0 deletions