]> git.baikalelectronics.ru Git - kernel.git/commit
net: netprio: fix files lock and remove useless d_path bits
authorJohn Fastabend <john.r.fastabend@intel.com>
Tue, 14 Aug 2012 12:34:24 +0000 (12:34 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Aug 2012 21:56:11 +0000 (14:56 -0700)
commit29d22d0d70e65df6ad46c1ba6a2c05dd8f8dc9ee
treeeea2e9d62d56083968683d5df80565c611edfbab
parentb683aaefebcb99c3b0cb5b1944b61789138334d5
net: netprio: fix files lock and remove useless d_path bits

Add lock to prevent a race with a file closing and also remove
useless and ugly sscanf code. The extra code was never needed
and the case it supposedly protected against is in fact handled
correctly by sock_from_file as pointed out by Al Viro.

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