Commit 71c631a
KVM: arm64: vgic: Simplify kvm_vgic_destroy()
commit 01ad29d upstream.
When destroying a vgic, we have rather cumbersome rules about
when slots_lock and config_lock are held, resulting in fun
buglets.
The first port of call is to simplify kvm_vgic_map_resources()
so that there is only one call to kvm_vgic_destroy() instead of
two, with the second only holding half of the locks.
For that, we kill the non-locking primitive and move the call
outside of the locking altogether. This doesn't change anything
(we re-acquire the locks and teardown the whole vgic), and
simplifies the code significantly.
Cc: stable@vger.kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20231207151201.3028710-2-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 6fbaeff commit 71c631a
1 file changed
Lines changed: 14 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
385 | | - | |
| 385 | + | |
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
390 | | - | |
| 390 | + | |
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
| 397 | + | |
| 398 | + | |
397 | 399 | | |
398 | | - | |
399 | 400 | | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | 401 | | |
| 402 | + | |
405 | 403 | | |
406 | 404 | | |
407 | 405 | | |
| |||
469 | 467 | | |
470 | 468 | | |
471 | 469 | | |
472 | | - | |
473 | | - | |
| 470 | + | |
474 | 471 | | |
475 | | - | |
| 472 | + | |
476 | 473 | | |
477 | 474 | | |
478 | 475 | | |
479 | 476 | | |
480 | 477 | | |
481 | | - | |
| 478 | + | |
482 | 479 | | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | 480 | | |
| 481 | + | |
488 | 482 | | |
489 | 483 | | |
| 484 | + | |
490 | 485 | | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
491 | 490 | | |
492 | 491 | | |
493 | 492 | | |
| |||
0 commit comments