Patch "ALSA: usx2y: Use snd_card_free_when_closed() at disconnection" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ALSA: usx2y: Use snd_card_free_when_closed() at disconnection

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     alsa-usx2y-use-snd_card_free_when_closed-at-disconne.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit b146c74b4c01b457ce96df7d55ac3d4c700ff2c3
Author: Takashi Iwai <tiwai@xxxxxxx>
Date:   Wed Nov 13 12:10:35 2024 +0100

    ALSA: usx2y: Use snd_card_free_when_closed() at disconnection
    
    [ Upstream commit dafb28f02be407e07a6f679e922a626592b481b0 ]
    
    The USB disconnect callback is supposed to be short and not too-long
    waiting.  OTOH, the current code uses snd_card_free() at
    disconnection, but this waits for the close of all used fds, hence it
    can take long.  It eventually blocks the upper layer USB ioctls, which
    may trigger a soft lockup.
    
    An easy workaround is to replace snd_card_free() with
    snd_card_free_when_closed().  This variant returns immediately while
    the release of resources is done asynchronously by the card device
    release at the last close.
    
    Fixes: 230cd5e24853 ("[ALSA] prevent oops & dead keyboard on usb unplugging while the device is be ing used")
    Reported-by: syzbot+73582d08864d8268b6fd@xxxxxxxxxxxxxxxxxxxxxxxxx
    Closes: https://syzkaller.appspot.com/bug?extid=73582d08864d8268b6fd
    Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
    Link: https://patch.msgid.link/20241113111042.15058-2-tiwai@xxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/usb/usx2y/usbusx2y.c b/sound/usb/usx2y/usbusx2y.c
index 9d5a33c4ff2f3..c567e58ceb4fd 100644
--- a/sound/usb/usx2y/usbusx2y.c
+++ b/sound/usb/usx2y/usbusx2y.c
@@ -396,7 +396,7 @@ static void snd_usx2y_disconnect(struct usb_interface *intf)
 	}
 	if (usx2y->us428ctls_sharedmem)
 		wake_up(&usx2y->us428ctls_wait_queue_head);
-	snd_card_free(card);
+	snd_card_free_when_closed(card);
 }
 
 static int snd_usx2y_probe(struct usb_interface *intf,




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux