Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932475Ab3GZWEQ (ORCPT ); Fri, 26 Jul 2013 18:04:16 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:51865 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753389Ab3GZWED (ORCPT ); Fri, 26 Jul 2013 18:04:03 -0400 Date: Fri, 26 Jul 2013 15:04:01 -0700 From: Greg KH To: Dan Carpenter Cc: Wei Yongjun , 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 Message-ID: <20130726220401.GA6735@kroah.com> References: <20130726073233.GD5585@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130726073233.GD5585@mwanda> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 962 Lines: 26 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 > > > > A spin lock is taken here so we should use GFP_ATOMIC. > > > > Acked-by: Dan Carpenter > > 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/