]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mac80211_hwsim: use GFP_ATOMIC under spin lock
authorWei Yongjun <weiyongjun1@huawei.com>
Wed, 22 Apr 2020 02:01:54 +0000 (02:01 +0000)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 23 Apr 2020 08:08:09 +0000 (10:08 +0200)
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>
drivers/net/wireless/mac80211_hwsim.c

index 7c4b7c31d07ab88e86a41dc5e1491b6edff1bef5..0528d4cb4d37478bbed6008b20dde478e5390f87 100644 (file)
@@ -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