From: Yao-Po Wang Date: Fri, 11 Jul 2014 15:37:24 +0000 (+0800) Subject: kni: fix deadlock in netif_receive_skb X-Git-Tag: spdx-start~10523 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=41a6ebded53982107c1adfc0652d6cc1375a7db9;p=dpdk.git kni: fix deadlock in netif_receive_skb Per netif_receive_skb function description, it may only be called from interrupt contex, but KNI is run on kthread that like as user-space context. It may occur deadlock, if netif_receive_skb called from kthread, so it should be repleaced by netif_rx or adding local_bh_disable/enable around netif_receive_skb. Signed-off-by: Yao-Po Wang Acked-by: Alex Markuze --- diff --git a/lib/librte_eal/linuxapp/kni/kni_net.c b/lib/librte_eal/linuxapp/kni/kni_net.c index d3c0190060..28cc5ab038 100644 --- a/lib/librte_eal/linuxapp/kni/kni_net.c +++ b/lib/librte_eal/linuxapp/kni/kni_net.c @@ -179,7 +179,7 @@ kni_net_rx_normal(struct kni_dev *kni) skb->ip_summed = CHECKSUM_UNNECESSARY; /* Call netif interface */ - netif_receive_skb(skb); + netif_rx(skb); /* Update statistics */ kni->stats.rx_bytes += len;