[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <s5hk4epfbjk.wl%tiwai@suse.de>
Date: Wed, 20 Apr 2011 12:43:27 +0200
From: Takashi Iwai <tiwai@...e.de>
To: Oliver Neukum <oneukum@...e.de>
Cc: Dave Jones <davej@...hat.com>,
Linux Kernel <linux-kernel@...r.kernel.org>,
Jaroslav Kysela <perex@...ex.cz>
Subject: Re: lockdep trace when unplugging usb audio (.39rc4)
At Wed, 20 Apr 2011 12:32:44 +0200,
Oliver Neukum wrote:
>
> Am Dienstag, 19. April 2011, 20:07:45 schrieb Dave Jones:
> > I get this trace when I unplug my NuForce uDAC.
>
> Please test this patch.
Well, no, it would break the real fix for disconnection race we've
done recently.
Such a lockdep warning is sometimes seen, but I haven't seen the real
deadlock by this in practice. It's a path from munmap -> release, and
hits many other subsystems like NFS, if not fixed yet...
thanks,
Takashi
>
> Regards
> Oliver
> [2 0001-usb-audio-fix-potential-deadlock-on-unplug.patch <text/x-patch; UTF-8 (quoted-printable)>]
> From 24d036ccb418d7cfa5a821d5a70b3d3da2d63bb3 Mon Sep 17 00:00:00 2001
> From: Oliver Neukum <oliver@...kum.org>
> Date: Wed, 20 Apr 2011 12:29:22 +0200
> Subject: [PATCH] usb-audio:fix potential deadlock on unplug
>
> Decrease the scope of a lock to fix a deadlock
>
> Signed-off-by: Oliver Neukum <oneukum@...e.de>
> ---
> sound/usb/card.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/sound/usb/card.c b/sound/usb/card.c
> index a90662a..1d3d9f0 100644
> --- a/sound/usb/card.c
> +++ b/sound/usb/card.c
> @@ -554,6 +554,7 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, void *ptr)
> mutex_lock(&chip->shutdown_mutex);
> chip->shutdown = 1;
> chip->num_interfaces--;
> + mutex_unlock(&chip->shutdown_mutex);
> if (chip->num_interfaces <= 0) {
> snd_card_disconnect(card);
> /* release the pcm resources */
> @@ -569,11 +570,9 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, void *ptr)
> snd_usb_mixer_disconnect(p);
> }
> usb_chip[chip->index] = NULL;
> - mutex_unlock(&chip->shutdown_mutex);
> mutex_unlock(®ister_mutex);
> snd_card_free_when_closed(card);
> } else {
> - mutex_unlock(&chip->shutdown_mutex);
> mutex_unlock(®ister_mutex);
> }
> }
> --
> 1.7.1
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists