aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
diff options
context:
space:
mode:
authorTakashi Iwai <[email protected]>2017-10-09 08:02:56 +0000
committerTakashi Iwai <[email protected]>2017-10-09 12:10:13 +0000
commit5803b023881857db32ffefa0d269c90280a67ee0 (patch)
treedc218d1ac325d6290ec3ca495eaa86aaa4ea461b /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
parentALSA: usb-audio: Add sample rate quirk for Plantronics P610 (diff)
downloadkernel-5803b023881857db32ffefa0d269c90280a67ee0.tar.gz
kernel-5803b023881857db32ffefa0d269c90280a67ee0.zip
ALSA: seq: Fix copy_from_user() call inside lock
The event handler in the virmidi sequencer code takes a read-lock for the linked list traverse, while it's calling snd_seq_dump_var_event() in the loop. The latter function may expand the user-space data depending on the event type. It eventually invokes copy_from_user(), which might be a potential dead-lock. The sequencer core guarantees that the user-space data is passed only with atomic=0 argument, but snd_virmidi_dev_receive_event() ignores it and always takes read-lock(). For avoiding the problem above, this patch introduces rwsem for non-atomic case, while keeping rwlock for atomic case. Also while we're at it: the superfluous irq flags is dropped in snd_virmidi_input_open(). Reported-by: Jia-Ju Bai <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
0 files changed, 0 insertions, 0 deletions