pkt_sched: cls_u32: Fix locking in u32_change()
commite0fb1a4b23623c34cf914f5ed988f7ef46c76732
authorJarek Poplawski <jarkao2@gmail.com>
Tue, 20 Jan 2009 22:08:23 +0000 (20 14:08 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 25 Jan 2009 00:41:42 +0000 (24 16:41 -0800)
tree35d38e8bf679fe174fb50ed3e0ff2d3c59576275
parentbe6d2874035d70ccda30e385f769023915d3a60e
pkt_sched: cls_u32: Fix locking in u32_change()

[ Upstream commit: 6f57321422e0d359e83c978c2b03db77b967b7d5 ]

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/sched/cls_u32.c