linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [bug report] [SCSI] mvumi: GFP_KERNEL under spin lock
@ 2012-08-14 14:59 Dan Carpenter
  2012-09-28 11:30 ` Dan Carpenter
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2012-08-14 14:59 UTC (permalink / raw)
  To: jyli; +Cc: linux-scsi, linux-kernel

Hello Jianyun Li,

The patch f0c568a478f0: "[SCSI] mvumi: Add Marvell UMI driver" from 
May 11, 2011, leads to the following warning:
drivers/scsi/mvumi.c:121 mvumi_alloc_mem_resource()
	 error: scheduling with locks held: 'spin_lock:host_lock'

The problem is that we do a couple GPF_KERNEL allocations in
mvumi_alloc_mem_resource() and this static analysis program sees a path
where that function is called with spin_locks held.

mvumi_isr_handler() <- takes a spin lock
-> mvumi_handshake()
   -> mvumi_init_data()
      -> mvumi_alloc_mem_resource() <- GFP_KERNEL

The IRQ handler does print a warning before calling mvumi_handshake()
so it seems like this path doesn't get exercised very much.

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-09-29  7:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-14 14:59 [bug report] [SCSI] mvumi: GFP_KERNEL under spin lock Dan Carpenter
2012-09-28 11:30 ` Dan Carpenter
2012-09-28 11:51   ` Dan Carpenter
2012-09-29  7:14   ` [patch] [SCSI] mvumi: use GFP_ATOMIC " Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).