summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2020-04-22 05:01:54 +0300
committerJohannes Berg <johannes.berg@intel.com>2020-04-23 11:08:09 +0300
commit0379861217dc2dd46e3bc517010060065b0dd6fc (patch)
treeecb2e5883825323435d5f118e82d31c5bef35b51
parent7c74b0bec918c1e0ca0b4208038c156eacf8f13f (diff)
downloadlinux-0379861217dc2dd46e3bc517010060065b0dd6fc.tar.xz
mac80211_hwsim: use GFP_ATOMIC under spin lock
A spin lock is taken here so we should use GFP_ATOMIC. Fixes: 5d44fe7c9808 ("mac80211_hwsim: add frame transmission support over virtio") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Link: https://lore.kernel.org/r/20200422020154.112088-1-weiyongjun1@huawei.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 7c4b7c31d07a..0528d4cb4d37 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -4068,7 +4068,7 @@ static void hwsim_virtio_rx_work(struct work_struct *work)
}
vq = hwsim_vqs[HWSIM_VQ_RX];
sg_init_one(sg, skb->head, skb_end_offset(skb));
- err = virtqueue_add_inbuf(vq, sg, 1, skb, GFP_KERNEL);
+ err = virtqueue_add_inbuf(vq, sg, 1, skb, GFP_ATOMIC);
if (WARN(err, "virtqueue_add_inbuf returned %d\n", err))
nlmsg_free(skb);
else