From: Pavel Emelyanov <xemul@openvz.org>
To: Chas Williams <chas@cmf.nrl.navy.mil>,
Linux Netdev List <netdev@vger.kernel.org>
Subject: [PATCH 2/2][ATM]: Bad locking on br2684_devs modifications.
Date: Sun, 04 May 2008 11:39:00 +0400 [thread overview]
Message-ID: <481D6814.6050801@openvz.org> (raw)
The list_del happens under read-locked devs_lock.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
---
net/atm/br2684.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/atm/br2684.c b/net/atm/br2684.c
index 3a74ff8..13858e2 100644
--- a/net/atm/br2684.c
+++ b/net/atm/br2684.c
@@ -346,9 +346,9 @@ static void br2684_push(struct atm_vcc *atmvcc, struct sk_buff *skb)
/* skb==NULL means VCC is being destroyed */
br2684_close_vcc(brvcc);
if (list_empty(&brdev->brvccs)) {
- read_lock(&devs_lock);
+ write_lock_irq(&devs_lock);
list_del(&brdev->br2684_devs);
- read_unlock(&devs_lock);
+ write_unlock_irq(&devs_lock);
unregister_netdev(net_dev);
}
return;
--
1.5.3.4
next reply other threads:[~2008-05-04 7:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-04 7:39 Pavel Emelyanov [this message]
2008-05-05 1:00 ` [PATCH 2/2][ATM]: Bad locking on br2684_devs modifications 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=481D6814.6050801@openvz.org \
--to=xemul@openvz.org \
--cc=chas@cmf.nrl.navy.mil \
--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).