android_kernel_samsung_msm8976/include
Takashi Iwai 7b3750b117 ALSA: seq: Fix copy_from_user() call inside lock
commit 5803b023881857db32ffefa0d269c90280a67ee0 upstream.

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 <baijiaju1990@163.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2019-07-27 21:45:36 +02:00
..
acpi
asm-generic cpumask: fix spurious cpumask_of_node() on non-NUMA multi-node configs 2019-07-27 21:45:10 +02:00
clocksource
crypto crypto: crypto_memneq - add equality testing of memory regions w/o timing leaks 2019-07-27 21:42:52 +02:00
drm
dt-bindings
keys
kvm
linux Input: uinput - avoid FF flush when destroying device 2019-07-27 21:45:29 +02:00
math-emu
media
memory
misc
net ipv4: use separate genid for next hop exceptions 2019-07-27 21:45:24 +02:00
pcmcia
ras
rdma RDMA/core: Fix incorrect structure packing for booleans 2019-07-27 21:43:09 +02:00
rxrpc
scsi
sdp
soc/qcom
sound ALSA: seq: Fix copy_from_user() call inside lock 2019-07-27 21:45:36 +02:00
target target: Avoid mappedlun symlink creation during lun shutdown 2019-07-27 21:44:16 +02:00
trace tracing: Add #undef to fix compile error 2019-07-27 21:43:11 +02:00
uapi uapi: fix linux/packet_diag.h userspace compilation error 2019-07-27 21:44:00 +02:00
video
xen
Kbuild