lkml.org 
[lkml]   [2019]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] net-sysfs: call dev_hold if kobject_init_and_add success
From
From: Yue Haibing <yuehaibing@huawei.com>
Date: Tue, 19 Mar 2019 10:16:53 +0800

> From: YueHaibing <yuehaibing@huawei.com>
>
> In netdev_queue_add_kobject and rx_queue_add_kobject,
> if sysfs_create_group failed, kobject_put will call
> netdev_queue_release to decrease dev refcont, however
> dev_hold has not be called. So we will see this while
> unregistering dev:
>
> unregister_netdevice: waiting for bcsh0 to become free. Usage count = -1
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Fixes: d0d668371679 ("net: don't decrement kobj reference count on init failure")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied and queued up for -stable.

\
 
 \ /
  Last update: 2019-03-19 21:47    [W:0.027 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site