From: Dan Carpenter Date: Thu, 27 Apr 2017 09:14:20 +0000 (+0300) Subject: IB/rdmavt: restore IRQs on error path in rvt_create_ah() X-Git-Tag: MMI-PSA29.97-13-9~5649^3~86 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f0bb2d44ca26b7090dc7bade8877b77005f07dfc;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git IB/rdmavt: restore IRQs on error path in rvt_create_ah() 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 Reviewed-by: Leon Romanovsky Acked-by: Dennis Dalessandro Signed-off-by: Doug Ledford --- 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); }