| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * G8BPQ compatible "AX.25 via ethernet" driver release 004 |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * 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. |
|---|
| 11 | 6 | * |
|---|
| 12 | 7 | * This is a "pseudo" network driver to allow AX.25 over Ethernet |
|---|
| 13 | 8 | * using G8BPQ encapsulation. It has been extracted from the protocol |
|---|
| .. | .. |
|---|
| 153 | 148 | { |
|---|
| 154 | 149 | struct bpqdev *bpq; |
|---|
| 155 | 150 | |
|---|
| 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()) { |
|---|
| 157 | 153 | if (bpq->ethdev == dev) |
|---|
| 158 | 154 | return bpq->axdev; |
|---|
| 159 | 155 | } |
|---|
| .. | .. |
|---|
| 537 | 533 | if (!net_eq(dev_net(dev), &init_net)) |
|---|
| 538 | 534 | return NOTIFY_DONE; |
|---|
| 539 | 535 | |
|---|
| 540 | | - if (!dev_is_ethdev(dev)) |
|---|
| 536 | + if (!dev_is_ethdev(dev) && !bpq_get_ax25_dev(dev)) |
|---|
| 541 | 537 | return NOTIFY_DONE; |
|---|
| 542 | 538 | |
|---|
| 543 | 539 | switch (event) { |
|---|