public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Dennis Dalessandro <dennis.dalessandro@intel.com>,
	Kamal Heib <kamalh@mellanox.com>,
	Doug Ledford <dledford@redhat.com>,
	Sean Hefty <sean.hefty@intel.com>,
	Hal Rosenstock <hal.rosenstock@gmail.com>,
	linux-rdma@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] IB/rdmavt: restore IRQs on error path in rvt_create_ah()
Date: Thu, 27 Apr 2017 09:25:56 +0000	[thread overview]
Message-ID: <20170427092556.GF14088@mtr-leonro.local> (raw)
In-Reply-To: <20170427091420.j7kl5tmzqnyami4s@mwanda>

[-- 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 --]

  reply	other threads:[~2017-04-27  9:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2017-04-27 17:14 ` Dennis Dalessandro
2017-04-28 17:02   ` Doug Ledford

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=20170427092556.GF14088@mtr-leonro.local \
    --to=leon@kernel.org \
    --cc=dan.carpenter@oracle.com \
    --cc=dennis.dalessandro@intel.com \
    --cc=dledford@redhat.com \
    --cc=hal.rosenstock@gmail.com \
    --cc=kamalh@mellanox.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sean.hefty@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox