Commit 0a65dcf
committed
net: designate queue counts as "double ops protected" by instance lock
Drivers which opt into instance lock protection of ops should
only call set_real_num_*_queues() under the instance lock.
This means that queue counts are double protected (writes
are under both rtnl_lock and instance lock, readers under
either).
Some readers may still be under the rtnl_lock, however, so for
now we need double protection of writers.
OTOH queue API paths are only under the protection of the instance
lock, so we need to validate that the instance is actually locking
ops, otherwise the input checks we do against queue count are racy.
Acked-by: Stanislav Fomichev <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>1 parent 4b702f8 commit 0a65dcf
File tree
5 files changed
+17
-0
lines changed- include/linux
- net/core
5 files changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2523 | 2523 | | |
2524 | 2524 | | |
2525 | 2525 | | |
| 2526 | + | |
| 2527 | + | |
| 2528 | + | |
2526 | 2529 | | |
2527 | 2530 | | |
2528 | 2531 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3130 | 3130 | | |
3131 | 3131 | | |
3132 | 3132 | | |
| 3133 | + | |
3133 | 3134 | | |
3134 | 3135 | | |
3135 | 3136 | | |
| |||
3179 | 3180 | | |
3180 | 3181 | | |
3181 | 3182 | | |
| 3183 | + | |
3182 | 3184 | | |
3183 | 3185 | | |
3184 | 3186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2148 | 2148 | | |
2149 | 2149 | | |
2150 | 2150 | | |
| 2151 | + | |
2151 | 2152 | | |
2152 | 2153 | | |
| 2154 | + | |
2153 | 2155 | | |
2154 | 2156 | | |
2155 | 2157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
867 | 867 | | |
868 | 868 | | |
869 | 869 | | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
870 | 877 | | |
871 | 878 | | |
872 | 879 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
95 | 98 | | |
96 | 99 | | |
97 | 100 | | |
| |||
0 commit comments