aboutsummaryrefslogtreecommitdiff
path: root/sys/modules/dtb/freescale/(developers-only)
diff options
context:
space:
mode:
authorHayzam Sherif <hayzam@alchemilla.io>2026-11-07 01:19:07 +0000
committerKenneth D. Merry <ken@FreeBSD.org>2026-11-07 01:19:07 +0000
commitc17aa0984de83a1079cda81b5cce521e73c7a64d (patch)
tree897cbe9ad1d4634d5d2dced569baa3b59576597f /sys/modules/dtb/freescale/(developers-only)
parent6eae951cd51b5b8603c119f21c77871a8595ff88 (diff)
camdd: Fix the worker startup raceHEADmain
The reader can hand off its first buffer before the writer sets CAMDD_DEV_FLAG_ACTIVE. camdd_queue_peer_buf() then mistakes the writer for an exited peer and releases the buffer instead of queueing it. This can make a copy fail with bytes read but nothing written, without an error message. Mark both devices active before creating either worker, leaving the workers to clear the flag on exit. The work queues and EVFILT_USER events are already initialized, so queued buffers and their notification can wait for the writer to start without a startup barrier. Treat pthread_create() failure as fatal. Returning through the normal cleanup path can free devices that an already-started worker is still using, and an unstarted peer cannot consume any queued buffers. Reviewed by: imp, markj, ken MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D61277
Diffstat (limited to 'sys/modules/dtb/freescale/(developers-only)')
0 files changed, 0 insertions, 0 deletions