linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] [SCSI] bfa: Use GFP_ATOMIC under spin_lock
@ 2013-03-08 12:01 Dan Carpenter
  2013-03-11 18:21 ` Vijay Mohan Guvva
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-03-08 12:01 UTC (permalink / raw)
  To: Anil Gurumurthy
  Cc: Vijaya Mohan Guvva, James E.J. Bottomley, linux-scsi,
	linux-kernel, kernel-janitors

This is always called with spinlocks held so it should use
GFP_ATOMIC.  The call tree is:

-> bfad_drv_start()
   Takes spin_lock_irqsave(&bfad->bfad_lock, flags);
   -> bfa_fcs_pbc_vport_init()
      -> bfa_fcb_pbc_vport_create()

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c
index a5f7690..d144a06 100644
--- a/drivers/scsi/bfa/bfad.c
+++ b/drivers/scsi/bfa/bfad.c
@@ -491,7 +491,7 @@ bfa_fcb_pbc_vport_create(struct bfad_s *bfad, struct bfi_pbc_vport_s pbc_vport)
 	struct bfad_vport_s   *vport;
 	int rc;
 
-	vport = kzalloc(sizeof(struct bfad_vport_s), GFP_KERNEL);
+	vport = kzalloc(sizeof(struct bfad_vport_s), GFP_ATOMIC);
 	if (!vport) {
 		bfa_trc(bfad, 0);
 		return;

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

* RE: [patch] [SCSI] bfa: Use GFP_ATOMIC under spin_lock
  2013-03-08 12:01 [patch] [SCSI] bfa: Use GFP_ATOMIC under spin_lock Dan Carpenter
@ 2013-03-11 18:21 ` Vijay Mohan Guvva
  0 siblings, 0 replies; 2+ messages in thread
From: Vijay Mohan Guvva @ 2013-03-11 18:21 UTC (permalink / raw)
  To: Dan Carpenter, Anil Gurumurthy
  Cc: James E.J. Bottomley, linux-scsi, linux-kernel, kernel-janitors

> -----Original Message-----
> From: Dan Carpenter [mailto:dan.carpenter@oracle.com]
> Sent: Friday, March 08, 2013 4:01 AM
> To: Anil Gurumurthy
> Cc: Vijay Mohan Guvva; James E.J. Bottomley; linux-scsi@vger.kernel.org;
> linux-kernel@vger.kernel.org; kernel-janitors@vger.kernel.org
> Subject: [patch] [SCSI] bfa: Use GFP_ATOMIC under spin_lock
> 
> This is always called with spinlocks held so it should use GFP_ATOMIC.  The
> call tree is:
> 
> -> bfad_drv_start()
>    Takes spin_lock_irqsave(&bfad->bfad_lock, flags);
>    -> bfa_fcs_pbc_vport_init()
>       -> bfa_fcb_pbc_vport_create()
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c index
> a5f7690..d144a06 100644
> --- a/drivers/scsi/bfa/bfad.c
> +++ b/drivers/scsi/bfa/bfad.c
> @@ -491,7 +491,7 @@ bfa_fcb_pbc_vport_create(struct bfad_s *bfad,
> struct bfi_pbc_vport_s pbc_vport)
>  	struct bfad_vport_s   *vport;
>  	int rc;
> 
> -	vport = kzalloc(sizeof(struct bfad_vport_s), GFP_KERNEL);
> +	vport = kzalloc(sizeof(struct bfad_vport_s), GFP_ATOMIC);
>  	if (!vport) {
>  		bfa_trc(bfad, 0);
>  		return;

Changes looks good. Thanks for the patch.
Acked-by: Vijay Mohan Guvva <vmohan@Brocade.com>

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

end of thread, other threads:[~2013-03-11 18:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-08 12:01 [patch] [SCSI] bfa: Use GFP_ATOMIC under spin_lock Dan Carpenter
2013-03-11 18:21 ` Vijay Mohan Guvva

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).