public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vaishali Thakkar <vaishali.thakkar@oracle.com>
To: Matthew Wilcox <matthew@wil.cx>, Hannes Reinecke <hare@suse.com>,
	"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [Question] Calling request_firmware under the spinlocks in file advansys.c
Date: Tue, 27 Sep 2016 16:56:33 +0530	[thread overview]
Message-ID: <57EA5769.1080807@oracle.com> (raw)
In-Reply-To: <57D7C470.5070505@oracle.com>



On Tuesday 13 September 2016 02:48 PM, Vaishali Thakkar wrote:
> 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?

Hi,

Any comments on this?

Thanks

> Thank you.
> 

-- 
Vaishali

  reply	other threads:[~2016-09-27 11:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-13  9:18 [Question] Calling request_firmware under the spinlocks in file advansys.c Vaishali Thakkar
2016-09-27 11:26 ` Vaishali Thakkar [this message]
2016-09-27 15:16   ` Hannes Reinecke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57EA5769.1080807@oracle.com \
    --to=vaishali.thakkar@oracle.com \
    --cc=hare@suse.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=matthew@wil.cx \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox