aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/controller/pci-host-common.c
diff options
context:
space:
mode:
authorTakashi Iwai <[email protected]>2019-07-15 20:50:27 +0000
committerTakashi Iwai <[email protected]>2019-07-16 07:41:41 +0000
commitede34f397ddb063b145b9e7d79c6026f819ded13 (patch)
treec4512b7219236a6268838215384de608eb3c992e /drivers/pci/controller/pci-host-common.c
parentALSA: hda/realtek: apply ALC891 headset fixup to one Dell machine (diff)
downloadkernel-ede34f397ddb063b145b9e7d79c6026f819ded13.tar.gz
kernel-ede34f397ddb063b145b9e7d79c6026f819ded13.zip
ALSA: seq: Break too long mutex context in the write loop
The fix for the racy writes and ioctls to sequencer widened the application of client->ioctl_mutex to the whole write loop. Although it does unlock/relock for the lengthy operation like the event dup, the loop keeps the ioctl_mutex for the whole time in other situations. This may take quite long time if the user-space would give a huge buffer, and this is a likely cause of some weird behavior spotted by syzcaller fuzzer. This patch puts a simple workaround, just adding a mutex break in the loop when a large number of events have been processed. This shouldn't hit any performance drop because the threshold is set high enough for usual operations. Fixes: 7bd800915677 ("ALSA: seq: More protection for concurrent write and ioctl races") Reported-by: [email protected] Reported-by: [email protected] Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'drivers/pci/controller/pci-host-common.c')
0 files changed, 0 insertions, 0 deletions