public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: jyli@marvell.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [bug report] [SCSI] mvumi: GFP_KERNEL under spin lock
Date: Tue, 14 Aug 2012 17:59:27 +0300	[thread overview]
Message-ID: <20120814145926.GA29090@elgon.mountain> (raw)

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


             reply	other threads:[~2012-08-14 14:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-14 14:59 Dan Carpenter [this message]
2012-09-28 11:30 ` [bug report] [SCSI] mvumi: GFP_KERNEL under spin lock Dan Carpenter
2012-09-28 11:51   ` Dan Carpenter
2012-09-29  7:14   ` [patch] [SCSI] mvumi: use GFP_ATOMIC " Dan Carpenter

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=20120814145926.GA29090@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=jyli@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /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