From: Alexey Khoroshilov <khoroshilov@ispras.ru>
To: Anil Gurumurthy <anil.gurumurthy@qlogic.com>,
Sudarsana Kalluru <sudarsana.kalluru@qlogic.com>
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
ldv-project@linuxtesting.org
Subject: Re: [PATCH] [SCSI] bfa: allocate memory with GFP_ATOMIC in spinlock context
Date: Fri, 18 Apr 2014 00:50:12 -0700 [thread overview]
Message-ID: <5350D934.706@ispras.ru> (raw)
In-Reply-To: <1397805949-20502-1-git-send-email-khoroshilov@ispras.ru>
Please ignore this patch, it will resend a correct version of it.
On 18.04.2014 00:25, Alexey Khoroshilov wrote:
> bfa_fcb_pbc_vport_create() is called only from bfa_fcs_pbc_vport_init(),
> that is called only from bfad_drv_start() with bfad_lock spinlock held.
> So the patch replaces GFP_KERNEL with GFP_ATOMIC to avoid
> sleeping in atomic spinlock context.
>
> Found by Linux Driver Verification project (linuxtesting.org).
>
> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
> ---
> drivers/scsi/bfa/bfad.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c
> index cc0fbcdc5192..8f46d1b72fb8 100644
> --- a/drivers/scsi/bfa/bfad.c
> +++ b/drivers/scsi/bfa/bfad.c
> @@ -652,7 +652,7 @@ bfad_vport_create(struct bfad_s *bfad, u16 vf_id,
> unsigned long flags;
> struct completion fcomp;
>
> - vport = kzalloc(sizeof(struct bfad_vport_s), GFP_KERNEL);
> + vport = kzalloc(sizeof(struct bfad_vport_s), GFP_ATOMIC);
> if (!vport) {
> rc = BFA_STATUS_ENOMEM;
> goto ext;
prev parent reply other threads:[~2014-04-18 7:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-18 7:25 [PATCH] [SCSI] bfa: allocate memory with GFP_ATOMIC in spinlock context Alexey Khoroshilov
2014-04-18 7:50 ` Alexey Khoroshilov [this message]
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=5350D934.706@ispras.ru \
--to=khoroshilov@ispras.ru \
--cc=JBottomley@parallels.com \
--cc=anil.gurumurthy@qlogic.com \
--cc=ldv-project@linuxtesting.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=sudarsana.kalluru@qlogic.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.