All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Hong <lihong.hi@gmail.com>
To: Oliver Neukum <oliver@neukum.org>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: use memdup_user()
Date: Sun, 3 May 2009 23:38:33 -0400	[thread overview]
Message-ID: <3a3680030905032038h40cd75bdrbee839117e5a4d55@mail.gmail.com> (raw)
In-Reply-To: <200905031909.14101.oliver@neukum.org>

The key is: is there any need or probability to use GFP_NOIO instead
of GFP_KERNEL _here_? It also confuses me to move the user space copy
outside of the loop.

IMHO, this is just a simple cleanup of the code.

Regards,
Hong

2009/5/3 Oliver Neukum <oliver@neukum.org>:
> Am Sonntag, 3. Mai 2009 18:00:56 schrieb Li Hong:
>> Replace a combination call of kmalloc() and copy_from_user() with
>> memdup_user().
>
> To be precise. copy_*_user() of course implies that you can do
> GFP_KERNEL. But the point is one of design. Right now I can change
> locking and if that means that one must use GFP_NOIO, which is common
> in usb due to the storage driver, we can find out by simply grepping and
> move the user space copy outside of the loop.
>
> If you make that change we must grep against a second and rare
> key.
>
>        Regards
>                Oliver
>
>

  reply	other threads:[~2009-05-04  3:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-03 16:00 [PATCH] usb: use memdup_user() Li Hong
2009-05-03 16:28 ` Oliver Neukum
2009-05-03 17:09 ` Oliver Neukum
2009-05-04  3:38   ` Li Hong [this message]
2009-05-04  6:54     ` Oliver Neukum
2009-05-04  7:02       ` David Brownell
2009-05-04  7:41         ` Pekka Enberg
2009-05-04 14:53           ` Greg KH
2009-05-04 15:13             ` Li Hong
2009-05-05  8:50             ` Oliver Neukum
2009-05-04 14:01         ` Oliver Neukum
2009-05-05  6:11           ` Andrew Morton
2009-05-05 10:44             ` Oliver Neukum
2009-05-05 17:22               ` Andrew Morton
2009-05-06 13:34                 ` Oliver Neukum
2009-05-06 18:31                   ` Andrew Morton
2009-05-06 18:44                     ` Oliver Neukum

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=3a3680030905032038h40cd75bdrbee839117e5a4d55@mail.gmail.com \
    --to=lihong.hi@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oliver@neukum.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.