kni: fix deadlock in netif_receive_skb
authorYao-Po Wang <blue119@gmail.com>
Fri, 11 Jul 2014 15:37:24 +0000 (23:37 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 18 Jul 2014 23:54:41 +0000 (01:54 +0200)
commit41a6ebded53982107c1adfc0652d6cc1375a7db9
tree3e4ed70fd9c9d122eb065b9d74c47b883865c809
parentc43e65c9b6e6325777d9a08a201103f14b31d362
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 <blue119@gmail.com>
Acked-by: Alex Markuze <alex@weka.io>
lib/librte_eal/linuxapp/kni/kni_net.c