diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-03-19 05:16:53 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-03 07:26:17 +0300 |
commit | d9d215be3a3aa8b3638f2705826f52a7fb84cf24 (patch) | |
tree | ddab70c9611c06b44ac9516b790cf1baf82fe391 /lib | |
parent | 8dcf078d92ae81a241019df80db311d5884f8812 (diff) | |
download | linux-d9d215be3a3aa8b3638f2705826f52a7fb84cf24.tar.xz |
net-sysfs: call dev_hold if kobject_init_and_add success
[ Upstream commit a3e23f719f5c4a38ffb3d30c8d7632a4ed8ccd9e ]
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions