]> git.baikalelectronics.ru Git - kernel.git/commit
net: wan: lapbether.c: Use built-in RCU list checking
authorMadhuparna Bhowmik <madhuparnabhowmik04@gmail.com>
Wed, 15 Jan 2020 11:41:01 +0000 (17:11 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Jan 2020 13:30:52 +0000 (14:30 +0100)
commitcf3f521856a9e75c79bb75a7bc2089ca7a3ad0ae
tree5a232295b049fbb2ebc90a25f7828bedd8899ba4
parenta95a1cb30f94aab6bc3d8232570f49ad309445a9
net: wan: lapbether.c: Use built-in RCU list checking

The only callers of the function lapbeth_get_x25_dev()
are lapbeth_rcv() and lapbeth_device_event().

lapbeth_rcv() uses rcu_read_lock() whereas lapbeth_device_event()
is called with RTNL held (As mentioned in the comments).

Therefore, pass lockdep_rtnl_is_held() as cond argument in
list_for_each_entry_rcu();

Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik04@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wan/lapbether.c