diff options
author | Takashi Iwai <[email protected]> | 2022-08-23 09:27:17 +0200 |
---|---|---|
committer | Takashi Iwai <[email protected]> | 2022-08-24 07:59:06 +0200 |
commit | 3e7e04b747adea36f349715d9f0998eeebf15d72 (patch) | |
tree | 52bffb03307aa12eaa13ac76a801703759705473 /lib/test_fortify/write_overflow-strlcpy-src.c | |
parent | 22dec134dbfa825b963f8a1807ad19b943e46a56 (diff) |
ALSA: seq: Fix data-race at module auto-loading
It's been reported that there is a possible data-race accessing to the
global card_requested[] array at ALSA sequencer core, which is used
for determining whether to call request_module() for the card or not.
This data race itself is almost harmless, as it might end up with one
extra request_module() call for the already loaded module at most.
But it's still better to fix.
This patch addresses the possible data race of card_requested[] and
client_requested[] arrays by replacing them with bitmask.
It's an atomic operation and can work without locks.
Reported-by: Abhishek Shah <[email protected]>
Cc: <[email protected]>
Link: https://lore.kernel.org/r/CAEHB24_ay6YzARpA1zgCsE7=H9CSJJzux618E=Ka4h0YdKn=qA@mail.gmail.com
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strlcpy-src.c')
0 files changed, 0 insertions, 0 deletions