From: Pavel Emelyanov <xemul@openvz.org>
To: Daniel Lezcano <dlezcano@fr.ibm.com>
Cc: David Miller <davem@davemloft.net>,
Linux Netdev List <netdev@vger.kernel.org>
Subject: Re: [net-2.6][DRIVER][VETH] fix dev refcount race
Date: Tue, 19 Feb 2008 19:30:44 +0300 [thread overview]
Message-ID: <47BB0434.9080906@openvz.org> (raw)
In-Reply-To: <47BB0138.1000104@fr.ibm.com>
Daniel Lezcano wrote:
> Subject: veth fix dev refcount race
> From: Daniel Lezcano <dlezcano@fr.ibm.com>
>
> When deleting the veth driver, veth_close calls netif_carrier_off
> for the two extremities of the network device. netif_carrier_off on
> the peer device will fire an event and hold a reference on the peer
> device. Just after, the peer is unregistered taking the rtnl_lock while
> the linkwatch_event is scheduled. If __linkwatch_run_queue does not
> occurs before the unregistering, unregister_netdevice will wait for
> the dev refcount to reach zero holding the rtnl_lock and linkwatch_event
Brr... AFAIS the unregister process waits for refcount without
the rtnl_lock. The run-todo was invented for this. No?
> will wait for the rtnl_lock and hold the dev refcount.
>
> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
> ---
> drivers/net/veth.c | 53 ++++++++++++++++++++++++++++++++++++++++-------------
> 1 file changed, 40 insertions(+), 13 deletions(-)
next prev parent reply other threads:[~2008-02-19 16:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-19 16:18 [net-2.6][DRIVER][VETH] fix dev refcount race Daniel Lezcano
2008-02-19 16:30 ` Pavel Emelyanov [this message]
2008-02-20 8:22 ` David Miller
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=47BB0434.9080906@openvz.org \
--to=xemul@openvz.org \
--cc=davem@davemloft.net \
--cc=dlezcano@fr.ibm.com \
--cc=netdev@vger.kernel.org \
/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).