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