From: David Miller <davem@davemloft.net>
To: bpoirier@suse.de
Cc: linux-s390@vger.kernel.org, netdev@vger.kernel.org,
ursula.braun@de.ibm.com, linux390@de.ibm.com,
blaschka@linux.vnet.ibm.com, schwidefsky@de.ibm.com,
heiko.carstens@de.ibm.com, cornelia.huck@de.ibm.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] netiucv: Hold rtnl between name allocation and device registration.
Date: Thu, 13 Jun 2013 17:41:54 -0700 (PDT) [thread overview]
Message-ID: <20130613.174154.4560842535243312.davem@davemloft.net> (raw)
In-Reply-To: <1371128987-3723-1-git-send-email-bpoirier@suse.de>
From: Benjamin Poirier <bpoirier@suse.de>
Date: Thu, 13 Jun 2013 09:09:47 -0400
> fixes a race condition between concurrent initializations of netiucv devices
> that try to use the same name.
>
> sysfs: cannot create duplicate filename '/devices/iucv/netiucv2'
> [...]
> Call Trace:
> ([<00000000002edea4>] sysfs_add_one+0xb0/0xdc)
> [<00000000002eecd4>] create_dir+0x80/0xfc
> [<00000000002eee38>] sysfs_create_dir+0xe8/0x118
> [<00000000003835a8>] kobject_add_internal+0x120/0x2d0
> [<00000000003839d6>] kobject_add+0x62/0x9c
> [<00000000003d9564>] device_add+0xcc/0x510
> [<000003e00212c7b4>] netiucv_register_device+0xc0/0x1ec [netiucv]
>
> Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
> Tested-by: Ursula Braun <braunu@de.ibm.com>
Yes as dev_alloc_name() must be invoked under RTNL or dev_base_lock, this
fix is correct.
Applied, thanks.
prev parent reply other threads:[~2013-06-14 0:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-13 13:09 [PATCH] netiucv: Hold rtnl between name allocation and device registration Benjamin Poirier
2013-06-14 0:41 ` 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=20130613.174154.4560842535243312.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=blaschka@linux.vnet.ibm.com \
--cc=bpoirier@suse.de \
--cc=cornelia.huck@de.ibm.com \
--cc=heiko.carstens@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux390@de.ibm.com \
--cc=netdev@vger.kernel.org \
--cc=schwidefsky@de.ibm.com \
--cc=ursula.braun@de.ibm.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).