linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: kvalo@adurom.com
Cc: netdev@vger.kernel.org, linux-wireless@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 0/2] Fix uevent race in register_netdevice()
Date: Mon, 16 May 2011 14:11:58 -0400 (EDT)	[thread overview]
Message-ID: <20110516.141158.1777924960833804150.davem@davemloft.net> (raw)
In-Reply-To: <20110516143913.13838.85357.stgit@localhost6.localdomain6>

From: Kalle Valo <kvalo@adurom.com>
Date: Mon, 16 May 2011 17:46:30 +0300

> I'm trying to fix a race in register_netdevice(). The problem is that
> there's a uevent to userspace before the netdevice is ready for use. The
> problem is described here:
> 
> https://bugzilla.kernel.org/show_bug.cgi?id=15606
> 
> I have sent few different ways to fix this, but none of them have been
> really usable. Now I came up with a way which changes the driver core
> to make it possible send the uevent in a separate call. This is a clean
> and safe way to fix the race. Downside is that two new functions are
> added to the driver core interface.
> 
> Please comment.

This doesn't work.

The sysfs file will still be there before the uevent, so any
process can go in there, and see the inconsistent state.

  parent reply	other threads:[~2011-05-16 18:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-16 14:46 [PATCH v3 0/2] Fix uevent race in register_netdevice() Kalle Valo
2011-05-16 14:46 ` [PATCH v3 1/2] driver core: add device_add_noevent() and device_uevent() Kalle Valo
2011-05-16 14:46 ` [PATCH v3 2/2] net: postpone net device uevent to fix a race Kalle Valo
2011-05-16 18:11 ` David Miller [this message]
2011-05-20 12:08   ` [PATCH v3 0/2] Fix uevent race in register_netdevice() Kalle Valo

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=20110516.141158.1777924960833804150.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=kvalo@adurom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --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).