• WANG Cong's avatar
    ipv4: use the right lock for ping_group_range · 95e68768
    WANG Cong authored
    commit 396a30cc upstream.
    
    This reverts commit a681574c
    ("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: a681574c ("ipv4: disable BH in set_ping_group_range()")
    Fixes: ba6b918a ("ping: move ping_group_range out of CONFIG_SYSCTL")
    Cc: Eric Dumazet <edumazet@google.com>
    Cc: Eric Salo <salo@google.com>
    Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    [bwh: Backported to 3.16: we never applied "ipv4: disable BH in
      set_ping_group_range()"]
    Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
    95e68768
sysctl_net_ipv4.c 21.8 KB