lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130726220401.GA6735@kroah.com>
Date:	Fri, 26 Jul 2013 15:04:01 -0700
From:	Greg KH <gregkh@...uxfoundation.org>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Wei Yongjun <weiyj.lk@...il.com>, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org, yongjun_wei@...ndmicro.com.cn,
	wonkang@...semi.com, joe@...ches.com
Subject: Re: [PATCH -next] staging: gdm724x: use GFP_ATOMIC under spin lock

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@...ndmicro.com.cn>
> > 
> > A spin lock is taken here so we should use GFP_ATOMIC.
> > 
> 
> Acked-by: Dan Carpenter <dan.carpenter@...cle.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
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ