18 Apr, 2015

1 commit

  • A deadlock can be initiated by userspace via ioctl(SNDCTL_SEQ_OUTOFBAND)
    on /dev/sequencer with TMR_ECHO midi event.

    In this case the control flow is:
    sound_ioctl()
    -> case SND_DEV_SEQ:
    case SND_DEV_SEQ2:
    sequencer_ioctl()
    -> case SNDCTL_SEQ_OUTOFBAND:
    spin_lock_irqsave(&lock,flags);
    play_event();
    -> case EV_TIMING:
    seq_timing_event()
    -> case TMR_ECHO:
    seq_copy_to_input()
    -> spin_lock_irqsave(&lock,flags);

    It seems that spin_lock_irqsave() around play_event() is not necessary,
    because the only other call location in seq_startplay() makes the call
    without acquiring spinlock.

    So, the patch just removes spinlocks around play_event().
    By the way, it removes unreachable code in seq_timing_event(),
    since (seq_mode == SEQ_2) case is handled in the beginning.

    Compile tested only.

    Found by Linux Driver Verification project (linuxtesting.org).

    Signed-off-by: Alexey Khoroshilov
    Signed-off-by: Takashi Iwai

    Alexey Khoroshilov
     

17 Apr, 2015

1 commit


16 Apr, 2015

3 commits


14 Apr, 2015

1 commit

  • Some HD-A codecs may add their own vendor 'set' verb to the regmap, thru func
    snd_hdac_add_vendor_verb(). This patch sets the GET bit (bit 11) when adding
    the verb so that its peer vendor 'get' verb is actually added. This can avoid
    I/O error when writing the 'set' verb thru remap, since HD-A regmap internally
    looks up a writable vendor verb with GET bit set at first.

    Signed-off-by: Mengdong Lin
    Signed-off-by: Takashi Iwai

    Mengdong Lin
     

13 Apr, 2015

26 commits


12 Apr, 2015

8 commits