[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACVXFVN6zm2gG4v1jhV=8EwAtKs=bg3urJ7dRiOgPGHtKXHYxA@mail.gmail.com>
Date: Mon, 11 Mar 2013 23:52:08 +0800
From: Ming Lei <tom.leiming@...il.com>
To: Alan Stern <stern@...land.harvard.edu>
Cc: Alexey Khoroshilov <khoroshilov@...ras.ru>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Hans de Goede <hdegoede@...hat.com>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
ldv-project@...uxtesting.org
Subject: Re: [PATCH] usb/core/devio.c: Don't use GFP_KERNEL while we cannot
reset a storage device
On Mon, Mar 11, 2013 at 11:32 PM, Alan Stern <stern@...land.harvard.edu> wrote:
>
> Of course you have to lock the device before changing its driver. What
> would happen if two different threads tried to change a device's driver
> at the same time?
Yes, claim/release interface need device lock, but the patch doesn't
touch claim/release command handling.
>
> usbdev_do_ioctl() needs to acquire the device lock in order to prevent
> races with driver_disconnect() and usbdev_remove().
Looks the patch basically converts the allocation inside URB submit path,
and actually I mean why we need to hold device lock in submitting
URB path? Device lock isn't required before submitting URBs
in kernel driver.
Thanks,
--
Ming Lei
--
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