netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: lucian.grijincu@gmail.com
Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com
Subject: Re: [PATCH 2/2] net: dummy: allocate devices with alloc_netdev_id
Date: Thu, 09 Jun 2011 00:20:55 -0700 (PDT)	[thread overview]
Message-ID: <20110609.002055.558422517682261395.davem@davemloft.net> (raw)
In-Reply-To: <20110607.022926.472309688813629515.davem@davemloft.net>

From: David Miller <davem@davemloft.net>
Date: Tue, 07 Jun 2011 02:29:26 -0700 (PDT)

> From: Lucian Adrian Grijincu <lucian.grijincu@gmail.com>
> Date: Tue, 7 Jun 2011 11:30:38 +0300
> 
>> @David: I see [1][2] that you marked the patches as Rejected. If it's
>> not a script that sends all my patches to /dev/null because of the
>> 100+ patch set I sent a while back, could you tell me why you rejected
>> the patches?
> 
> I misfired while changing patch states earlier today, I put them back
> into "Under Review"

So I took a look again, you're patches introduce problems.

We don't do the instance allocation and (more importantly) conflict
validation of the netdev name in alloc_netdev_mqs(), we do it when the
netdev is registered.

So with your patch some other entity could rename a random netdev
to "dummy62" in between the alloc_netdev_id() call and the register
and the register will fail erroneously.

I really don't like this optimization, sorry.  Make dev_alloc_name()
less stupid instead.


      reply	other threads:[~2011-06-09  7:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-07  1:39 [PATCH 0/2] speed up net device allocation using pattern names Lucian Adrian Grijincu
2011-06-07  1:39 ` [PATCH 1/2] net: add alloc_netdev_mqs_id Lucian Adrian Grijincu
2011-06-07  1:39 ` [PATCH 2/2] net: dummy: allocate devices with alloc_netdev_id Lucian Adrian Grijincu
2011-06-07  3:19   ` Eric Dumazet
2011-06-07  3:38     ` David Miller
2011-06-07  7:49     ` Lucian Adrian Grijincu
2011-06-07  7:59       ` Eric Dumazet
2011-06-07  8:30         ` Lucian Adrian Grijincu
2011-06-07  9:29           ` David Miller
2011-06-09  7:20             ` 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=20110609.002055.558422517682261395.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=lucian.grijincu@gmail.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).