From: Jarek Poplawski <jarkao2@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, bugme-daemon@bugzilla.kernel.org,
m0sia@plotinka.ru, Andrew Morton <akpm@linux-foundation.org>
Subject: pkt_sched: cls_u32: Fix locking in u32_delete()
Date: Sat, 11 Oct 2008 13:17:11 +0200 [thread overview]
Message-ID: <20081011111711.GA2808@ami.dom.local> (raw)
In-Reply-To: <20080917193832.GA2623@ami.dom.local>
pkt_sched: cls_u32: Fix locking in u32_delete()
While looking for a possible reason of bugzilla [Bug 11571]
"u32_classify Kernel Panic" reported by m0sia@plotinka.ru I found that
tcf_tree_lock() is missing in u32_delete() during u32_destroy_hnode()
call. Other paths calling this function use this lock. It haven't been
acknowledged this fixes the bug, but I think this patch is needed here
anyway.
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
---
net/sched/cls_u32.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index 246f906..9912ad5 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
@@ -433,7 +433,9 @@ static int u32_delete(struct tcf_proto *tp, unsigned long arg)
if (ht->refcnt == 1) {
ht->refcnt--;
+ tcf_tree_lock(tp);
u32_destroy_hnode(tp, ht);
+ tcf_tree_unlock(tp);
} else {
return -EBUSY;
}
next prev parent reply other threads:[~2008-10-11 11:17 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 ` [PATCH] " Jarek Poplawski
2009-01-06 2:14 ` David Miller
2008-10-11 11:17 ` Jarek Poplawski [this message]
2008-10-11 14:10 ` pkt_sched: cls_u32: Fix locking in u32_delete() 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=20081011111711.GA2808@ami.dom.local \
--to=jarkao2@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bugme-daemon@bugzilla.kernel.org \
--cc=davem@davemloft.net \
--cc=m0sia@plotinka.ru \
--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.