]> git.baikalelectronics.ru Git - kernel.git/commit
cls_cgroup: Allow classifier cgroups to have their classid reset to 0
authorNeil Horman <nhorman@tuxdriver.com>
Mon, 20 Aug 2012 07:59:10 +0000 (07:59 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 24 Aug 2012 16:41:17 +0000 (12:41 -0400)
commit954f6e89615f57f9ba6628d29bb84da889096978
treef058281124d7ce597c3814ac496422a6d0c575e7
parentddebf374816ed3a8d7d8309934a4d131e15d7189
cls_cgroup: Allow classifier cgroups to have their classid reset to 0

The network classifier cgroup initalizes each cgroups instance classid value to
0.  However, the sock_update_classid function only updates classid's in sockets
if the tasks cgroup classid is not zero, and if it differs from the current
classid.  The later check is to prevent cache line dirtying, but the former is
detrimental, as it prevents resetting a classid for a cgroup to 0.  While this
is not a common action, it has administrative usefulness (if the admin wants to
disable classification of a certain group temporarily for instance).

Easy fix, just remove the zero check.  Tested successfully by myself

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: "David S. Miller" <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/sock.c