Commit e0023c8
Philipp Stanner
drm/nouveau: Fix race in nouveau_sched_fini()
nouveau_sched_fini() uses a memory barrier before wait_event().
wait_event(), however, is a macro which expands to a loop which might
check the passed condition several times. The barrier would only take
effect for the first check.
Replace the barrier with a function which takes the spinlock.
Cc: [email protected] # v6.8+
Fixes: 5f03a50 ("drm/nouveau: implement 1:1 scheduler - entity relationship")
Acked-by: Danilo Krummrich <[email protected]>
Signed-off-by: Philipp Stanner <[email protected]>
Link: https://patch.msgid.link/[email protected]1 parent d25e3a6 commit e0023c8
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
482 | 482 | | |
483 | 483 | | |
484 | 484 | | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
485 | 496 | | |
486 | 497 | | |
487 | 498 | | |
488 | 499 | | |
489 | 500 | | |
490 | 501 | | |
491 | 502 | | |
492 | | - | |
493 | | - | |
| 503 | + | |
494 | 504 | | |
495 | 505 | | |
496 | 506 | | |
| |||
0 commit comments