[PATCH] ALSA: fireface: fix locking bug in ff400_copy_msg_to_user()

Takashi Iwai tiwai at suse.de
Wed Jan 18 17:50:05 CET 2023


On Tue, 17 Jan 2023 15:17:29 +0100,
Dan Carpenter wrote:
> 
> The ff400_copy_msg_to_user() function drops the spin lock to call
> copy_to_user().  However, if the copy_to_user() fails, then it must
> take the lock again before returning.  Failure to take the lock leads
> to a double unlock in the caller, hwdep_read().
> 
> Fixes: acdebd8b4c0c ("ALSA: fireface: implement message parser for Fireface 400")
> Signed-off-by: Dan Carpenter <error27 at gmail.com>

Thanks, applied.


Takashi


More information about the Alsa-devel mailing list