linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: yuehaibing@huawei.com
Cc: idosch@mellanox.com, alexander.h.duyck@intel.com,
	tyhicks@canonical.com, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH] net-sysfs: call dev_hold if kobject_init_and_add success
Date: Tue, 19 Mar 2019 13:46:45 -0700 (PDT)	[thread overview]
Message-ID: <20190319.134645.1866261157636933653.davem@davemloft.net> (raw)
In-Reply-To: <20190319021653.2584-1-yuehaibing@huawei.com>

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.

      reply	other threads:[~2019-03-19 20:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-19  2:16 [PATCH] net-sysfs: call dev_hold if kobject_init_and_add success Yue Haibing
2019-03-19 20:46 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190319.134645.1866261157636933653.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=alexander.h.duyck@intel.com \
    --cc=idosch@mellanox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tyhicks@canonical.com \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).