hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/net/hamradio/bpqether.c
....@@ -1,13 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * G8BPQ compatible "AX.25 via ethernet" driver release 004
34 *
45 * This code REQUIRES 2.0.0 or higher/ NET3.029
5
- *
6
- * This module:
7
- * This module is free software; you can redistribute it and/or
8
- * modify it under the terms of the GNU General Public License
9
- * as published by the Free Software Foundation; either version
10
- * 2 of the License, or (at your option) any later version.
116 *
127 * This is a "pseudo" network driver to allow AX.25 over Ethernet
138 * using G8BPQ encapsulation. It has been extracted from the protocol
....@@ -153,7 +148,8 @@
153148 {
154149 struct bpqdev *bpq;
155150
156
- list_for_each_entry_rcu(bpq, &bpq_devices, bpq_list) {
151
+ list_for_each_entry_rcu(bpq, &bpq_devices, bpq_list,
152
+ lockdep_rtnl_is_held()) {
157153 if (bpq->ethdev == dev)
158154 return bpq->axdev;
159155 }
....@@ -537,7 +533,7 @@
537533 if (!net_eq(dev_net(dev), &init_net))
538534 return NOTIFY_DONE;
539535
540
- if (!dev_is_ethdev(dev))
536
+ if (!dev_is_ethdev(dev) && !bpq_get_ax25_dev(dev))
541537 return NOTIFY_DONE;
542538
543539 switch (event) {