linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] IB/rdmavt: restore IRQs on error path in rvt_create_ah()
@ 2017-04-27  9:14 Dan Carpenter
  2017-04-27  9:25 ` Leon Romanovsky
  2017-04-27 17:14 ` Dennis Dalessandro
  0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2017-04-27  9:14 UTC (permalink / raw)
  To: Dennis Dalessandro, Kamal Heib
  Cc: Doug Ledford, Sean Hefty, Hal Rosenstock,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA

We need to call spin_unlock_irqrestore() instead of vanilla
spin_unlock() on this error path.

Fixes: 119a8e708d16 ("IB/rdmavt: Add AH to rdmavt")
Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

diff --git a/drivers/infiniband/sw/rdmavt/ah.c b/drivers/infiniband/sw/rdmavt/ah.c
index 16c446142c2a..b0f09fb45c72 100644
--- a/drivers/infiniband/sw/rdmavt/ah.c
+++ b/drivers/infiniband/sw/rdmavt/ah.c
@@ -119,7 +119,7 @@ struct ib_ah *rvt_create_ah(struct ib_pd *pd,
 
 	spin_lock_irqsave(&dev->n_ahs_lock, flags);
 	if (dev->n_ahs_allocated == dev->dparms.props.max_ah) {
-		spin_unlock(&dev->n_ahs_lock);
+		spin_unlock_irqrestore(&dev->n_ahs_lock, flags);
 		kfree(ah);
 		return ERR_PTR(-ENOMEM);
 	}
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] IB/rdmavt: restore IRQs on error path in rvt_create_ah()
  2017-04-27  9:14 [PATCH] IB/rdmavt: restore IRQs on error path in rvt_create_ah() Dan Carpenter
@ 2017-04-27  9:25 ` Leon Romanovsky
  2017-04-27 17:14 ` Dennis Dalessandro
  1 sibling, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2017-04-27  9:25 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Dennis Dalessandro, Kamal Heib, Doug Ledford, Sean Hefty,
	Hal Rosenstock, linux-rdma, kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 868 bytes --]

On Thu, Apr 27, 2017 at 12:14:20PM +0300, Dan Carpenter wrote:
> We need to call spin_unlock_irqrestore() instead of vanilla
> spin_unlock() on this error path.
>
> Fixes: 119a8e708d16 ("IB/rdmavt: Add AH to rdmavt")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/infiniband/sw/rdmavt/ah.c b/drivers/infiniband/sw/rdmavt/ah.c
> index 16c446142c2a..b0f09fb45c72 100644
> --- a/drivers/infiniband/sw/rdmavt/ah.c
> +++ b/drivers/infiniband/sw/rdmavt/ah.c
> @@ -119,7 +119,7 @@ struct ib_ah *rvt_create_ah(struct ib_pd *pd,
>
>  	spin_lock_irqsave(&dev->n_ahs_lock, flags);
>  	if (dev->n_ahs_allocated == dev->dparms.props.max_ah) {
> -		spin_unlock(&dev->n_ahs_lock);
> +		spin_unlock_irqrestore(&dev->n_ahs_lock, flags);
>  		kfree(ah);
>  		return ERR_PTR(-ENOMEM);
>  	}

Thanks,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] IB/rdmavt: restore IRQs on error path in rvt_create_ah()
  2017-04-27  9:14 [PATCH] IB/rdmavt: restore IRQs on error path in rvt_create_ah() Dan Carpenter
  2017-04-27  9:25 ` Leon Romanovsky
@ 2017-04-27 17:14 ` Dennis Dalessandro
  2017-04-28 17:02   ` Doug Ledford
  1 sibling, 1 reply; 4+ messages in thread
From: Dennis Dalessandro @ 2017-04-27 17:14 UTC (permalink / raw)
  To: Dan Carpenter, Kamal Heib
  Cc: Doug Ledford, Sean Hefty, Hal Rosenstock, linux-rdma,
	kernel-janitors

On 04/27/2017 05:14 AM, Dan Carpenter wrote:
> We need to call spin_unlock_irqrestore() instead of vanilla
> spin_unlock() on this error path.
>
> Fixes: 119a8e708d16 ("IB/rdmavt: Add AH to rdmavt")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Dennis Dalessandro <dennis.dalessandro@intel.com>



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

* Re: [PATCH] IB/rdmavt: restore IRQs on error path in rvt_create_ah()
  2017-04-27 17:14 ` Dennis Dalessandro
@ 2017-04-28 17:02   ` Doug Ledford
  0 siblings, 0 replies; 4+ messages in thread
From: Doug Ledford @ 2017-04-28 17:02 UTC (permalink / raw)
  To: Dennis Dalessandro, Dan Carpenter, Kamal Heib
  Cc: Sean Hefty, Hal Rosenstock, linux-rdma, kernel-janitors

On Thu, 2017-04-27 at 13:14 -0400, Dennis Dalessandro wrote:
> On 04/27/2017 05:14 AM, Dan Carpenter wrote:
> > 
> > We need to call spin_unlock_irqrestore() instead of vanilla
> > spin_unlock() on this error path.
> > 
> > Fixes: 119a8e708d16 ("IB/rdmavt: Add AH to rdmavt")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> Acked-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
> 

Thanks, applied.

-- 
Doug Ledford <dledford@redhat.com>
    GPG KeyID: B826A3330E572FDD
   
Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD


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

end of thread, other threads:[~2017-04-28 17:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-27  9:14 [PATCH] IB/rdmavt: restore IRQs on error path in rvt_create_ah() Dan Carpenter
2017-04-27  9:25 ` Leon Romanovsky
2017-04-27 17:14 ` Dennis Dalessandro
2017-04-28 17:02   ` Doug Ledford

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