From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757855AbcIMJUI (ORCPT ); Tue, 13 Sep 2016 05:20:08 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:33889 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757454AbcIMJUE (ORCPT ); Tue, 13 Sep 2016 05:20:04 -0400 To: Matthew Wilcox , Hannes Reinecke , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org From: Vaishali Thakkar Subject: [Question] Calling request_firmware under the spinlocks in file advansys.c Message-ID: <57D7C470.5070505@oracle.com> Date: Tue, 13 Sep 2016 14:48:40 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, In the file drivers/scsi/advansys.c we are calling function AdvISR at 2 instances [in the function advansys_reset and advansys_interrupt] while holding spinlock. Function AdvISR eventually calls request_firmware following this sequence of routines: AdvISR -> adv_async_callback -> AdvResetChipAndSB -> AdvInitAsc3550Driver -> request_firmware According to the definition of request_firmware it should be called from user context where sleeping is allowed. And usually sleeping under the spin lock is not allowed. Is it really necessary to call AdvISR under spinlocks here? Are we taking care of sleeping related concern of request_firmware or am I overlooking something here? Thank you. -- Vaishali