From: Stephen Hemminger <shemminger@osdl.org>
To: Nenad Corbic <ncorbic@sangoma.com>
Cc: Jeff Garzik <jgarzik@pobox.com>, netdev@oss.sgi.com
Subject: [PATCH] remove dev_get from wanrouter
Date: Mon, 29 Sep 2003 14:36:03 -0700 [thread overview]
Message-ID: <20030929143603.06d32058.shemminger@osdl.org> (raw)
The call to dev_get() in wanrouter_device_new_if is racy and redundant and should
be removed. The later 'register_netdev()' does the same test internally and will
return the appropriate error if the name already exists.
This patch is against 2.6.0-test6.
Resend of earlier patch because it was ignored, or missed.
diff -urN -X dontdiff linux-2.5/net/wanrouter/wanmain.c linux-2.5-net/net/wanrouter/wanmain.c
--- linux-2.5/net/wanrouter/wanmain.c 2003-09-22 10:21:35.000000000 -0700
+++ linux-2.5-net/net/wanrouter/wanmain.c 2003-09-22 10:49:29.000000000 -0700
@@ -726,8 +726,6 @@
if (dev->name == NULL) {
err = -EINVAL;
- } else if (dev_get(dev->name)) {
- err = -EEXIST; /* name already exists */
} else {
#ifdef WANDEBUG
next reply other threads:[~2003-09-29 21:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-29 21:36 Stephen Hemminger [this message]
2003-10-14 17:39 ` [PATCH] remove dev_get from wanrouter Jeff Garzik
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=20030929143603.06d32058.shemminger@osdl.org \
--to=shemminger@osdl.org \
--cc=jgarzik@pobox.com \
--cc=ncorbic@sangoma.com \
--cc=netdev@oss.sgi.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).