diff options
| author | 2026-09-20 19:47:45 +0900 | |
|---|---|---|
| committer | 2026-09-20 19:47:45 +0900 | |
| commit | e64f2d4de1f344b84c0fa0bebf3102a8fac48b33 (patch) | |
| tree | 06284d8b54f4d4b2545cc957d3ee3d12b978f9f7 /scripts/Makefile.thinlto | |
| parent | firewire: cdev: add KUnit test for bus reset event UAPI structure (diff) | |
firewire: core: consolidate lock scopes for event waiting in dequeue function
Current implementation uses the spinlock in the card structure to
serialize accesses to the event list. The dequeue_event() function yields
the CPU while waiting for the condition to become true, but checks the
list without acquiring the spinlock. It acquires the spinlock when
operating the list, however it assumes that the list has at least one
entry.
This can cause problems when multiple threads execute read(2) system calls
concurrently, since the list can become empty after rescheduling but before
the list operation, depending on the scheduling order of the two threads.
Use a wait_event variant that reacquires the lock after being
rescheduled, before checking the condition.
Link: https://lore.kernel.org/r/20260920104745.212753-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
