]> git.baikalelectronics.ru Git - kernel.git/commit
net: netprio: fix cgrp create and write priomap race
authorJohn Fastabend <john.r.fastabend@intel.com>
Tue, 14 Aug 2012 12:34:35 +0000 (12:34 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Aug 2012 21:56:11 +0000 (14:56 -0700)
commite52fac69623c0d60688b5c8bdf13fed2c7a5b6e3
treedf3621b3720766e4bf3a330d1114e8a1c5beace1
parent5d15d7b8b97b186f3ee57fd9acb9741caf88ee48
net: netprio: fix cgrp create and write priomap race

A race exists where creating cgroups and also updating the priomap
may result in losing a priomap update. This is because priomap
writers are not protected by rtnl_lock.

Move priority writer into rtnl_lock()/rtnl_unlock().

CC: Neil Horman <nhorman@tuxdriver.com>
Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/netprio_cgroup.c