kni: fix possible deadlock
authorFerruh Yigit <ferruh.yigit@intel.com>
Thu, 7 Apr 2016 15:55:17 +0000 (16:55 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 7 Apr 2016 17:30:16 +0000 (19:30 +0200)
netif_rx() should be used in interrupt context. Replace it with
netif_rx_ni() which is safe to use in process context.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
lib/librte_eal/linuxapp/kni/kni_net.c

index e02edcb..cfa8339 100644 (file)
@@ -175,7 +175,7 @@ kni_net_rx_normal(struct kni_dev *kni)
                        skb->ip_summed = CHECKSUM_UNNECESSARY;
 
                        /* Call netif interface */
-                       netif_rx(skb);
+                       netif_rx_ni(skb);
 
                        /* Update statistics */
                        kni->stats.rx_bytes += len;