Skip to content

Commit 93ad0f9

Browse files
Madhuparna04davem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent bd5874d commit 93ad0f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/wan/lapbether.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static struct lapbethdev *lapbeth_get_x25_dev(struct net_device *dev)
6464
{
6565
struct lapbethdev *lapbeth;
6666

67-
list_for_each_entry_rcu(lapbeth, &lapbeth_devices, node) {
67+
list_for_each_entry_rcu(lapbeth, &lapbeth_devices, node, lockdep_rtnl_is_held()) {
6868
if (lapbeth->ethdev == dev)
6969
return lapbeth;
7070
}

0 commit comments

Comments
 (0)