• Taehee Yoo's avatar
    hsr: remove unnecessary rcu_read_lock() in hsr module · 81390d0c
    Taehee Yoo authored
    In order to access the port list, the hsr_port_get_hsr() is used.
    And this is protected by RTNL and RCU.
    The hsr_fill_info(), hsr_check_carrier(), hsr_dev_open() and
    hsr_get_max_mtu() are protected by RTNL.
    So, rcu_read_lock() in these functions are not necessary.
    The hsr_handle_frame() also uses rcu_read_lock() but this function
    is called by packet path.
    It's already protected by RCU.
    So, the rcu_read_lock() in hsr_handle_frame() can be removed.
    Signed-off-by: default avatarTaehee Yoo <ap420073@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    81390d0c
hsr_slave.c 4.2 KB