The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: Hans de Goede <hdegoede@redhat.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	ldv-project@linuxtesting.org
Subject: Re: [PATCH] usb/core/devio.c: Don't use GFP_KERNEL while we cannot reset a storage device
Date: Fri, 8 Mar 2013 12:59:40 -0800	[thread overview]
Message-ID: <20130308205940.GA15806@kroah.com> (raw)
In-Reply-To: <1362761447-24643-1-git-send-email-khoroshilov@ispras.ru>

On Sat, Mar 09, 2013 at 12:50:47AM +0800, Alexey Khoroshilov wrote:
> As it was described by Oliver Neukum in commit acbe2fe
> "USB: Don't use GFP_KERNEL while we cannot reset a storage device":
> 
>   Memory allocations with GFP_KERNEL can cause IO to a storage device
>   which can fail resulting in a need to reset the device. Therefore
>   GFP_KERNEL cannot be safely used between usb_lock_device()
>   and usb_unlock_device(). Replace by GFP_NOIO.
> 
> The patch fixes the same issue in usb/core/devio.c.

But that's for userspace drivers, why does it matter here for them?

> All the allocations fixed are under usb_lock_device() from usbdev_do_ioctl().

I really don't want to have usbfs using GFP_NOIO as it is known for
allocating a lot of memory already.  Given that no one has ever reported
a problem like this, I don't think it deserves to change, sorry.

greg k-h

  parent reply	other threads:[~2013-03-08 20:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-08 16:50 [PATCH] usb/core/devio.c: Don't use GFP_KERNEL while we cannot reset a storage device Alexey Khoroshilov
2013-03-08 17:55 ` Alan Stern
2013-03-08 20:46   ` Oliver Neukum
2013-03-09  2:59     ` Alan Stern
2013-03-08 20:59 ` Greg Kroah-Hartman [this message]
2013-03-11 13:31 ` Ming Lei
2013-03-11 15:32   ` Alan Stern
2013-03-11 15:52     ` Ming Lei
2013-03-11 16:08       ` Alan Stern
2013-03-11 16:34         ` Ming Lei
2013-03-11 18:55           ` Alan Stern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130308205940.GA15806@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=khoroshilov@ispras.ru \
    --cc=ldv-project@linuxtesting.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox