• Takashi Iwai's avatar
    Revert "ALSA: usb-audio: purge needless variable length array" · 64188cfb
    Takashi Iwai authored
    This reverts commit 89b593c3 ("ALSA: usb-audio: purge needless
    variable length array").  The patch turned out to cause a severe
    regression, triggering an Oops at snd_usb_ctl_msg().  It was overseen
    that snd_usb_ctl_msg() writes back the response to the given buffer,
    while the patch changed it to a read-only const buffer.  (One should
    always double-check when an extra pointer cast is present...)
    
    As a simple fix, just revert the affected commit.  It was merely a
    cleanup.  Although it brings VLA again, it's clearer as a fix.  We'll
    address the VLA later in another patch.
    
    Fixes: 89b593c3 ("ALSA: usb-audio: purge needless variable length array")
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195875
    Cc: <stable@vger.kernel.org> # v4.11+
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    64188cfb
mixer_us16x08.c 37.6 KB