From: Jarek Poplawski <jarkao2@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
netdev@vger.kernel.org, bugme-daemon@bugzilla.kernel.org
Subject: [PATCH] Re: [Bugme-new] [Bug 11571] New: u32_classify Kernel Panic
Date: Mon, 5 Jan 2009 13:52:45 +0000 [thread overview]
Message-ID: <20090105135245.GC4460@ff.dom.local> (raw)
In-Reply-To: <20080918075351.GA4633@ff.dom.local>
> On Thu, Sep 18, 2008 at 01:05:28PM +0600, m0sia wrote:
> ...
> >>>> http://bugzilla.kernel.org/show_bug.cgi?id=11571
...
(take 2)
It seems there could be a problem with testing if this patch fixes
this bug, but IMHO it's quite probable, and needed anyway.
Jarek P.
----------------->
pkt_sched: cls_u32: Fix locking in u32_change()
New nodes are inserted in u32_change() under rtnl_lock() with wmb(),
so without tcf_tree_lock() like in other classifiers (e.g. cls_fw).
This isn't enough without rmb() on the read side, but on the other
hand adding such barriers doesn't give any savings, so the lock is
added instead.
Reported-by: m0sia <m0sia@plotinka.ru>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
---
net/sched/cls_u32.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index 05d1780..07372f6 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
@@ -638,8 +638,9 @@ static int u32_change(struct tcf_proto *tp, unsigned long base, u32 handle,
break;
n->next = *ins;
- wmb();
+ tcf_tree_lock(tp);
*ins = n;
+ tcf_tree_unlock(tp);
*arg = (unsigned long)n;
return 0;
next prev parent reply other threads:[~2009-01-05 13:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-11571-10286@http.bugzilla.kernel.org/>
2008-09-16 16:15 ` [Bugme-new] [Bug 11571] New: u32_classify Kernel Panic Andrew Morton
2008-09-17 19:38 ` Jarek Poplawski
2008-09-17 22:08 ` Jarek Poplawski
2008-09-18 7:05 ` m0sia
2008-09-18 7:53 ` Jarek Poplawski
2009-01-05 13:52 ` Jarek Poplawski [this message]
2009-01-06 2:14 ` [PATCH] " David Miller
2008-10-11 11:17 ` pkt_sched: cls_u32: Fix locking in u32_delete() Jarek Poplawski
2008-10-11 14:10 ` Herbert Xu
2008-10-11 19:24 ` David Miller
2008-10-11 22:04 ` Jarek Poplawski
2008-10-11 22:05 ` David Miller
2008-10-13 6:46 ` Jarek Poplawski
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=20090105135245.GC4460@ff.dom.local \
--to=jarkao2@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bugme-daemon@bugzilla.kernel.org \
--cc=davem@davemloft.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.