From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755562AbdLVHvF (ORCPT ); Fri, 22 Dec 2017 02:51:05 -0500 Received: from mail-io0-f195.google.com ([209.85.223.195]:36783 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751390AbdLVHvA (ORCPT ); Fri, 22 Dec 2017 02:51:00 -0500 X-Google-Smtp-Source: ACJfBotRkgB+INj5a7Ps8IcmtSFUW6eq+PpENDScIMMO/38DqNqx5vibGntxn5HWsHyC3+BTod3CYg== Subject: Re: [PATCH] drivers: usb: host: Fix GFP_KERNEL in spinlock context To: Greg KH Cc: ok@artecdesign.ee, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Suniel Mahesh , Raghu Bharadwaj , Karthik Tummala References: <1513921764-17246-1-git-send-email-shrikant.maurya@techveda.org> <20171222071315.GA10784@kroah.com> From: Shrikant Maurya Message-ID: <43a80699-bf8e-dc69-04a7-501be916d311@techveda.org> Date: Fri, 22 Dec 2017 13:20:54 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171222071315.GA10784@kroah.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 22 December 2017 12:43 PM, Greg KH wrote: > On Fri, Dec 22, 2017 at 11:19:24AM +0530, shrikant.maurya@techveda.org wrote: >> From: Shrikant Maurya >> >> As reported by Jia-Ju Bai (https://lkml.org/lkml/2017/12/11/872): >> API's are using GFP_KERNEL to allocate memory, which may sleep. >> To ensure atomicity such allocations must be avoided in critical >> sections under spinlock. >> Fixed by moving part of the code which is using GFP_KERNEL for >> memory allocation out of spinlock. >> >> Reported-by: Jia-Ju Bai >> Signed-off-by: Shrikant Maurya >> Signed-off-by: Suniel Mahesh >> Signed-off-by: Raghu Bharadwaj >> Signed-off-by: Karthik Tummala >> --- >> Note: >> - trace of device_init_wakeup() leads to creation of a struct >> wakeup_source object and addition of the object to the list >> of wakeup sources. While allocating wakeup_source object, API >> is using GFP_KERNEL. This particular section is removed out of >> spinlock. >> - Changeset was compile tested and built(ARCH=arm) on linux-next >> (latest). >> - No build issues reported. >> - Changeset was not tested on hardware. > No one was able to test on the hardware itself? Ideally I'd like to see > that happen to verify nothing breaks here. No one has this chip on any > devices? > > thanks, Sorry Greg, we dont have the chip / hardware, and we are aware that it should be hardware tested. we were looking at the software aspect. thanks, shrikanth > greg k-h