ipv4: use the right lock for ping_group_range
authorWANG Cong <xiyou.wangcong@gmail.com>
Thu, 20 Oct 2016 21:19:46 +0000 (14:19 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 22 Oct 2016 20:23:12 +0000 (16:23 -0400)
commit396a30cce15d084b2b1a395aa6d515c3d559c674
treee9421ffe250b8f5c509142bd79d313de39976457
parent860e0217fcc9c52013d2dde0b5953fdc95276fc1
ipv4: use the right lock for ping_group_range

This reverts commit a681574c99be23e4d20b769bf0e543239c364af5
("ipv4: disable BH in set_ping_group_range()") because we never
read ping_group_range in BH context (unlike local_port_range).

Then, since we already have a lock for ping_group_range, those
using ip_local_ports.lock for ping_group_range are clearly typos.

We might consider to share a same lock for both ping_group_range
and local_port_range w.r.t. space saving, but that should be for
net-next.

Fixes: a681574c99be ("ipv4: disable BH in set_ping_group_range()")
Fixes: ba6b918ab234 ("ping: move ping_group_range out of CONFIG_SYSCTL")
Cc: Eric Dumazet <edumazet@google.com>
Cc: Eric Salo <salo@google.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/sysctl_net_ipv4.c