[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081011111711.GA2808@ami.dom.local>
Date: Sat, 11 Oct 2008 13:17:11 +0200
From: Jarek Poplawski <jarkao2@...il.com>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org, bugme-daemon@...zilla.kernel.org,
m0sia@...tinka.ru, Andrew Morton <akpm@...ux-foundation.org>
Subject: pkt_sched: cls_u32: Fix locking in u32_delete()
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@...tinka.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@...il.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;
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists