From: Yangchao Zhou Date: Sun, 11 Sep 2016 09:59:23 +0000 (+0800) Subject: kni: fix error rollback kernel crash X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f503b8cff520c5b17d929c7ee8304c2eab7bb20b;p=dpdk.git kni: fix error rollback kernel crash Fixes: 9c61145ff6f9 ("kni: allow multiple threads") Signed-off-by: Yangchao Zhou Acked-by: Ferruh Yigit --- diff --git a/lib/librte_eal/linuxapp/kni/kni_misc.c b/lib/librte_eal/linuxapp/kni/kni_misc.c index 3501dc1bac..071b1585b5 100644 --- a/lib/librte_eal/linuxapp/kni/kni_misc.c +++ b/lib/librte_eal/linuxapp/kni/kni_misc.c @@ -547,7 +547,9 @@ kni_ioctl_create(struct net *net, if (ret) { KNI_ERR("error %i registering device \"%s\"\n", ret, dev_info.name); + kni->net_dev = NULL; kni_dev_remove(kni); + free_netdev(net_dev); return -ENODEV; }