diff options
| author | Stanislav Fomichev <[email protected]> | 2025-03-05 16:37:19 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-03-06 20:59:43 +0000 |
| commit | d4c22ec680c8db832ffc0b964c6008e65436cba8 (patch) | |
| tree | 0192f20d1598d69c93b8932a1df6f7cc1941cc88 /net/core/dev_api.c | |
| parent | inet: fix lwtunnel_valid_encap_type() lock imbalance (diff) | |
| download | kernel-d4c22ec680c8db832ffc0b964c6008e65436cba8.tar.gz kernel-d4c22ec680c8db832ffc0b964c6008e65436cba8.zip | |
net: hold netdev instance lock during ndo_open/ndo_stop
For the drivers that use shaper API, switch to the mode where
core stack holds the netdev lock. This affects two drivers:
* iavf - already grabs netdev lock in ndo_open/ndo_stop, so mostly
remove these
* netdevsim - switch to _locked APIs to avoid deadlock
iavf_close diff is a bit confusing, the existing call looks like this:
iavf_close() {
netdev_lock()
..
netdev_unlock()
wait_event_timeout(down_waitqueue)
}
I change it to the following:
netdev_lock()
iavf_close() {
..
netdev_unlock()
wait_event_timeout(down_waitqueue)
netdev_lock() // reusing this lock call
}
netdev_unlock()
Since I'm reusing existing netdev_lock call, so it looks like I only
add netdev_unlock.
Cc: Saeed Mahameed <[email protected]>
Signed-off-by: Stanislav Fomichev <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/core/dev_api.c')
0 files changed, 0 insertions, 0 deletions
