IB/rxe: fix GFP_KERNEL in spinlock context
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 2 Sep 2016 20:46:53 +0000 (23:46 +0300)
committerDoug Ledford <dledford@redhat.com>
Fri, 16 Sep 2016 18:14:08 +0000 (14:14 -0400)
There is skb_clone(skb, GFP_KERNEL) in spinlock context
in rxe_rcv_mcast_pkt().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rxe/rxe_recv.c

index 3d464c23e08bbbf0d55f3efbe922b44b12ca1442..144d2f129fcdf7f8a18b1fb8440ef6a597412fda 100644 (file)
@@ -312,7 +312,7 @@ static void rxe_rcv_mcast_pkt(struct rxe_dev *rxe, struct sk_buff *skb)
                 * make a copy of the skb to post to the next qp
                 */
                skb_copy = (mce->qp_list.next != &mcg->qp_list) ?
-                               skb_clone(skb, GFP_KERNEL) : NULL;
+                               skb_clone(skb, GFP_ATOMIC) : NULL;
 
                pkt->qp = qp;
                rxe_add_ref(qp);