[dpdk-dev] kni: unregister an unregisterd net_device could cause a kernel crash
Commit Message
Signed-off-by: zhouyangchao <zhouyates@gmail.com>
---
lib/librte_eal/linuxapp/kni/kni_misc.c | 2 ++
1 file changed, 2 insertions(+)
Comments
On 9/11/2016 10:59 AM, zhouyangchao wrote:
> Signed-off-by: zhouyangchao <zhouyates@gmail.com>
> ---
There is a typo in the patch subject, I suggest:
kni: fix error rollback kernel crash
Fixes: 9c61145ff6f9 ("kni: allow multiple threads")
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2016-09-13 14:13, Ferruh Yigit:
> On 9/11/2016 10:59 AM, zhouyangchao wrote:
> > Signed-off-by: zhouyangchao <zhouyates@gmail.com>
>
> There is a typo in the patch subject, I suggest:
> kni: fix error rollback kernel crash
>
> Fixes: 9c61145ff6f9 ("kni: allow multiple threads")
>
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Applied, thanks
@@ -545,7 +545,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;
}