Commit e0b26cc
ipvs: call rtnl_lock early
When the sync damon is started we need to hold rtnl
lock while calling ip_mc_join_group. Currently, we have
a wrong locking order because the correct one is
rtnl_lock->__ip_vs_mutex. It is implied from the usage
of __ip_vs_mutex in ip_vs_dst_event() which is called
under rtnl lock during NETDEV_* notifications.
Fix the problem by calling rtnl_lock early only for the
start_sync_thread call. As a bonus this fixes the usage
__dev_get_by_name which was not called under rtnl lock.
This patch actually extends and depends on commit 54ff9ef
("ipv4, ipv6: kill ip_mc_{join, leave}_group and
ipv6_sock_mc_{join, drop}").
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>1 parent eefa32d commit e0b26cc
2 files changed
+33
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2335 | 2335 | | |
2336 | 2336 | | |
2337 | 2337 | | |
2338 | | - | |
2339 | | - | |
| 2338 | + | |
| 2339 | + | |
| 2340 | + | |
2340 | 2341 | | |
2341 | 2342 | | |
2342 | | - | |
| 2343 | + | |
| 2344 | + | |
| 2345 | + | |
| 2346 | + | |
2343 | 2347 | | |
2344 | | - | |
| 2348 | + | |
| 2349 | + | |
2345 | 2350 | | |
2346 | 2351 | | |
2347 | 2352 | | |
| |||
3342 | 3347 | | |
3343 | 3348 | | |
3344 | 3349 | | |
| 3350 | + | |
| 3351 | + | |
| 3352 | + | |
3345 | 3353 | | |
3346 | 3354 | | |
3347 | 3355 | | |
| |||
3353 | 3361 | | |
3354 | 3362 | | |
3355 | 3363 | | |
3356 | | - | |
3357 | | - | |
3358 | | - | |
3359 | | - | |
| 3364 | + | |
| 3365 | + | |
| 3366 | + | |
| 3367 | + | |
| 3368 | + | |
| 3369 | + | |
| 3370 | + | |
| 3371 | + | |
| 3372 | + | |
3360 | 3373 | | |
3361 | 3374 | | |
3362 | 3375 | | |
3363 | 3376 | | |
| 3377 | + | |
| 3378 | + | |
| 3379 | + | |
3364 | 3380 | | |
3365 | 3381 | | |
3366 | 3382 | | |
3367 | | - | |
3368 | | - | |
| 3383 | + | |
| 3384 | + | |
| 3385 | + | |
| 3386 | + | |
| 3387 | + | |
3369 | 3388 | | |
3370 | 3389 | | |
3371 | 3390 | | |
| |||
3389 | 3408 | | |
3390 | 3409 | | |
3391 | 3410 | | |
3392 | | - | |
| 3411 | + | |
3393 | 3412 | | |
3394 | 3413 | | |
3395 | 3414 | | |
| |||
3400 | 3419 | | |
3401 | 3420 | | |
3402 | 3421 | | |
3403 | | - | |
3404 | 3422 | | |
3405 | 3423 | | |
3406 | 3424 | | |
3407 | | - | |
3408 | | - | |
| 3425 | + | |
3409 | 3426 | | |
3410 | | - | |
3411 | 3427 | | |
3412 | 3428 | | |
3413 | 3429 | | |
3414 | 3430 | | |
3415 | 3431 | | |
3416 | | - | |
3417 | | - | |
3418 | 3432 | | |
| 3433 | + | |
| 3434 | + | |
3419 | 3435 | | |
3420 | 3436 | | |
3421 | 3437 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1405 | 1405 | | |
1406 | 1406 | | |
1407 | 1407 | | |
1408 | | - | |
1409 | 1408 | | |
1410 | 1409 | | |
1411 | 1410 | | |
1412 | | - | |
1413 | 1411 | | |
1414 | 1412 | | |
1415 | 1413 | | |
| |||
0 commit comments