linux-scsi.vger.kernel.org archive mirror
 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: Re: [bug report] [SCSI] mvumi: GFP_KERNEL under spin lock
Date: Fri, 28 Sep 2012 14:30:22 +0300	[thread overview]
Message-ID: <20120928113022.GW13767@mwanda> (raw)
In-Reply-To: <20120814145926.GA29090@elgon.mountain>

Whatever happened with this?  You could just change the GFP_KERNEL
to GFP_ATOMIC.

regards,
dan carpenter

On Tue, Aug 14, 2012 at 05:59:27PM +0300, Dan Carpenter wrote:
> 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
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

  reply	other threads:[~2012-09-28 11:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-14 14:59 [bug report] [SCSI] mvumi: GFP_KERNEL under spin lock Dan Carpenter
2012-09-28 11:30 ` Dan Carpenter [this message]
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=20120928113022.GW13767@mwanda \
    --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;
as well as URLs for NNTP newsgroup(s).