From: Oleg Nesterov <oleg@tv-sign.ru>
To: Andrew Morton <akpm@linux-foundation.org>,
Jarek Poplawski <jarkao2@o2.pl>,
"David S. Miller" <davem@davemloft.net>
Cc: David Howells <dhowells@redhat.com>, linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] net/bridge/br_if.c: don't use _WORK_NAR
Date: Mon, 19 Feb 2007 00:43:59 +0300 [thread overview]
Message-ID: <20070218214359.GA4226@tv-sign.ru> (raw)
Afaics, noautorel work_struct buys nothing for "struct net_bridge_port".
If del_nbp()->cancel_delayed_work(&p->carrier_check) fails, port_carrier_check
may be called later anyway. So the reading of *work in port_carrier_check() is
equally unsafe with or without this patch.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
--- WQ/net/bridge/br_if.c~1_bridge 2007-02-18 22:56:49.000000000 +0300
+++ WQ/net/bridge/br_if.c 2007-02-18 23:06:15.000000000 +0300
@@ -85,7 +85,6 @@ static void port_carrier_check(struct wo
dev = container_of(work, struct net_bridge_port,
carrier_check.work)->dev;
- work_release(work);
rtnl_lock();
p = dev->br_port;
@@ -282,7 +281,7 @@ static struct net_bridge_port *new_nbp(s
p->port_no = index;
br_init_port(p);
p->state = BR_STATE_DISABLED;
- INIT_DELAYED_WORK_NAR(&p->carrier_check, port_carrier_check);
+ INIT_DELAYED_WORK(&p->carrier_check, port_carrier_check);
br_stp_port_timer_init(p);
kobject_init(&p->kobj);
next reply other threads:[~2007-02-18 21:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-18 21:43 Oleg Nesterov [this message]
2007-02-19 11:00 ` Jarek Poplawski
2007-02-19 12:03 ` Oleg Nesterov
2007-02-19 13:27 ` Jarek Poplawski
2007-02-19 15:04 ` Oleg Nesterov
2007-02-20 13:25 ` Jarek Poplawski
2007-02-20 14:25 ` Oleg Nesterov
2007-02-19 11:27 ` David Howells
2007-02-19 11:59 ` Oleg Nesterov
2007-02-19 22:11 ` PATCH? net/bridge/br_if.c: fix use after free in port_carrier_check() Oleg Nesterov
2007-02-20 10:44 ` David Howells
2007-02-20 14:34 ` Oleg Nesterov
2007-02-19 13:15 ` [PATCH 1/3] net/bridge/br_if.c: don't use _WORK_NAR David Howells
2007-02-19 14:56 ` Oleg Nesterov
2007-02-19 15:15 ` David Howells
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=20070218214359.GA4226@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=jarkao2@o2.pl \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®