public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Wei Yongjun <weiyj.lk@gmail.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	yongjun_wei@trendmicro.com.cn, wonkang@gctsemi.com,
	joe@perches.com
Subject: Re: [PATCH -next] staging: gdm724x: use GFP_ATOMIC under spin lock
Date: Fri, 26 Jul 2013 15:04:01 -0700	[thread overview]
Message-ID: <20130726220401.GA6735@kroah.com> (raw)
In-Reply-To: <20130726073233.GD5585@mwanda>

On Fri, Jul 26, 2013 at 10:32:33AM +0300, Dan Carpenter wrote:
> On Fri, Jul 26, 2013 at 10:15:55AM +0800, Wei Yongjun wrote:
> > From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> > 
> > A spin lock is taken here so we should use GFP_ATOMIC.
> > 
> 
> Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> But the locking here is really odd and pointless.  usb_submit_urb()
> returns asynchronously before the data has been sent, so there is
> almost no point in locking around it.

There's no guarantee it will return before the complete() call is made,
so the data could be sent and then received before the call returns.

Not to say that the locking doesn't seem wrong, I agree with that...

thanks,

greg k-h

      reply	other threads:[~2013-07-26 22:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-26  2:15 [PATCH -next] staging: gdm724x: use GFP_ATOMIC under spin lock Wei Yongjun
2013-07-26  7:32 ` Dan Carpenter
2013-07-26 22:04   ` Greg KH [this message]

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=20130726220401.GA6735@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=weiyj.lk@gmail.com \
    --cc=wonkang@gctsemi.com \
    --cc=yongjun_wei@trendmicro.com.cn \
    /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