[BUG] sound/core/seq: A possible sleep-in-atomic bug in snd_virmidi_dev_receive_event

From: Jia-Ju Bai
Date: Sun Oct 08 2017 - 22:43:16 EST


According to seq_virmidi.c, the driver may sleep under a read spinlock.
The function call path is:
snd_virmidi_dev_receive_event (acquire the spinlock)
snd_seq_dump_var_event
copy_from_user --> may sleep

This bug is found by my static analysis tool and my code review.


Thanks,
Jia-Ju Bai