From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753252AbbBXXZH (ORCPT ); Tue, 24 Feb 2015 18:25:07 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:41787 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753004AbbBXXZB (ORCPT ); Tue, 24 Feb 2015 18:25:01 -0500 Date: Tue, 24 Feb 2015 15:25:00 -0800 From: Greg KH To: Tapasweni Pathak Cc: vinc94@gmail.com, roberta.dobrescu@gmail.com, sachin.kamat@samsung.com, ebru.akagunduz@gmail.com, damm+renesas@opensource.se, chris@rorvick.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, julia.lawall@lip6.fr Subject: Re: [PATCH] staging: emxx_udc: Replace GFP_KERNEL with GFP_ATOMIC Message-ID: <20150224232500.GA24927@kroah.com> References: <20150220131336.GA22731@kt-Inspiron-3542> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150220131336.GA22731@kt-Inspiron-3542> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 20, 2015 at 06:43:53PM +0530, Tapasweni Pathak wrote: > To avoid deadlock, do not call blocking functions with spinlocks held. > > Replace GFP_KERNEL with GFP_ATOMIC, as the latter will fail if the pile > doesn't have enough free pages but will not sleep and hence deadlock can > be avoided. > > Found by Coccinelle. > > Signed-off-by: Tapasweni Pathak > --- > Is there any other way this can be fixed as it is better to avoid GFP_ATOMIC? No, this is fine, nice fix. thanks, greg k-h