diff options
author | Madhuparna Bhowmik <madhuparnabhowmik04@gmail.com> | 2020-01-15 12:41:01 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-01-16 14:30:52 +0100 |
commit | 93ad0f969fc704959636846fc7f8d1aaf57f523e (patch) | |
tree | 5a232295b049fbb2ebc90a25f7828bedd8899ba4 /drivers | |
parent | net: dsa: tag_qca: fix doubled Tx statistics (diff) | |
download | linux-93ad0f969fc704959636846fc7f8d1aaf57f523e.tar.xz linux-93ad0f969fc704959636846fc7f8d1aaf57f523e.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wan/lapbether.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c index 0f1217b506ad..e30d91a38cfb 100644 --- a/drivers/net/wan/lapbether.c +++ b/drivers/net/wan/lapbether.c @@ -64,7 +64,7 @@ static struct lapbethdev *lapbeth_get_x25_dev(struct net_device *dev) { struct lapbethdev *lapbeth; - list_for_each_entry_rcu(lapbeth, &lapbeth_devices, node) { + list_for_each_entry_rcu(lapbeth, &lapbeth_devices, node, lockdep_rtnl_is_held()) { if (lapbeth->ethdev == dev) return lapbeth; } |