Commit 74841b1
CKI Backport Bot
ip6mr: fix tables suspicious RCU usage
JIRA: https://issues.redhat.com/browse/RHEL-74037
commit f1553c9
Author: Paolo Abeni <pabeni@redhat.com>
Date: Sun Nov 24 16:40:57 2024 +0100
ip6mr: fix tables suspicious RCU usage
Several places call ip6mr_get_table() with no RCU nor RTNL lock.
Add RCU protection inside such helper and provide a lockless variant
for the few callers that already acquired the relevant lock.
Note that some users additionally reference the table outside the RCU
lock. That is actually safe as the table deletion can happen only
after all table accesses are completed.
Fixes: e2d5776 ("net: Provide compat support for SIOCGETMIFCNT_IN6 and SIOCGETSGCNT_IN6.")
Fixes: d7c31cb ("net: ip6mr: add RTM_GETROUTE netlink op")
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>1 parent 96643f4 commit 74841b1
1 file changed
+27
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
144 | 154 | | |
145 | 155 | | |
146 | 156 | | |
| |||
182 | 192 | | |
183 | 193 | | |
184 | 194 | | |
185 | | - | |
| 195 | + | |
186 | 196 | | |
187 | 197 | | |
188 | 198 | | |
| |||
314 | 324 | | |
315 | 325 | | |
316 | 326 | | |
| 327 | + | |
| 328 | + | |
317 | 329 | | |
318 | 330 | | |
319 | 331 | | |
| |||
392 | 404 | | |
393 | 405 | | |
394 | 406 | | |
395 | | - | |
| 407 | + | |
396 | 408 | | |
397 | 409 | | |
398 | 410 | | |
| |||
425 | 437 | | |
426 | 438 | | |
427 | 439 | | |
428 | | - | |
429 | | - | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
430 | 444 | | |
| 445 | + | |
431 | 446 | | |
432 | 447 | | |
433 | 448 | | |
434 | | - | |
435 | 449 | | |
436 | 450 | | |
437 | 451 | | |
| |||
2289 | 2303 | | |
2290 | 2304 | | |
2291 | 2305 | | |
2292 | | - | |
2293 | | - | |
| 2306 | + | |
| 2307 | + | |
| 2308 | + | |
| 2309 | + | |
2294 | 2310 | | |
| 2311 | + | |
2295 | 2312 | | |
2296 | | - | |
2297 | 2313 | | |
2298 | 2314 | | |
2299 | 2315 | | |
| |||
2573 | 2589 | | |
2574 | 2590 | | |
2575 | 2591 | | |
2576 | | - | |
| 2592 | + | |
2577 | 2593 | | |
2578 | 2594 | | |
2579 | 2595 | | |
| |||
2620 | 2636 | | |
2621 | 2637 | | |
2622 | 2638 | | |
2623 | | - | |
| 2639 | + | |
2624 | 2640 | | |
2625 | 2641 | | |
2626 | 2642 | | |
| |||
0 commit comments