public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Gal Pressman <gal.pressman@linux.dev>,
	Krzysztof Czurylo <krzysztof.czurylo@intel.com>,
	linux-rdma@vger.kernel.org, Michael Margolin <mrgolin@amazon.com>,
	Yossi Leybovich <sleybo@amazon.com>,
	Tatyana Nikolova <tatyana.e.nikolova@intel.com>,
	Abhijit Gangurde <abhijit.gangurde@amd.com>,
	Allen Hubbe <allen.hubbe@amd.com>,
	Andrew Boyer <andrew.boyer@amd.com>,
	Gal Pressman <galpress@amazon.com>,
	Mustafa Ismail <mustafa.ismail@intel.com>,
	patches@lists.linux.dev, Roland Dreier <rolandd@cisco.com>,
	Shiraz Saleem <shiraz.saleem@intel.com>,
	stable@vger.kernel.org, Steve Wise <swise@opengridcomputing.com>
Subject: Re: [PATCH rc 2/4] IB/mthca: Add missed mthca_unmap_user_db() for mthca_create_srq()
Date: Wed, 18 Feb 2026 11:06:26 +0200	[thread overview]
Message-ID: <20260218090626.GE10368@unreal> (raw)
In-Reply-To: <20260217234627.GB3804671@nvidia.com>

On Tue, Feb 17, 2026 at 07:46:27PM -0400, Jason Gunthorpe wrote:
> On Tue, Feb 17, 2026 at 03:23:56PM +0200, Leon Romanovsky wrote:
> > > @@ -428,6 +428,8 @@ static int mthca_create_srq(struct ib_srq *ibsrq,
> > >  
> > >  	if (context && ib_copy_to_udata(udata, &srq->srqn, sizeof(__u32))) {
> > >  		mthca_free_srq(to_mdev(ibsrq->device), srq);
> > > +		mthca_unmap_user_db(to_mdev(ibsrq->device), &context->uar,
> > > +				    context->db_tab, ucmd.db_index);
> > >  		return -EFAULT;
> > >  	}
> > 
> > The `mthca_destroy_srq()` implementation needs to be corrected as well.
> > Its resource release order is currently reversed.
> 
> Er, that looks OK, this is probably in the wrong order, let's should swap
> it, though I'm not sure it is even order sensitive..

Yes, mthca_destroy_srq() in the wrong order.

Thanks

> 
> Jason

  reply	other threads:[~2026-02-18  9:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-16 15:02 [PATCH rc 0/4] Fix several serious mistakes on the udata path in drivers Jason Gunthorpe
2026-02-16 15:02 ` [PATCH rc 1/4] RDMA/efa: Fix typo in efa_alloc_mr() Jason Gunthorpe
2026-02-16 15:30   ` Michael Margolin
2026-02-16 15:02 ` [PATCH rc 2/4] IB/mthca: Add missed mthca_unmap_user_db() for mthca_create_srq() Jason Gunthorpe
2026-02-17 13:23   ` Leon Romanovsky
2026-02-17 23:46     ` Jason Gunthorpe
2026-02-18  9:06       ` Leon Romanovsky [this message]
2026-02-16 15:02 ` [PATCH rc 3/4] RDMA/irdma: Fix kernel stack leak in irdma_create_user_ah() Jason Gunthorpe
2026-02-16 15:02 ` [PATCH rc 4/4] RDMA/ionic: Fix kernel stack leak in ionic_create_cq() Jason Gunthorpe
2026-02-23 12:07   ` Abhijit Gangurde
2026-02-24 10:03 ` [PATCH rc 0/4] Fix several serious mistakes on the udata path in drivers Leon Romanovsky

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=20260218090626.GE10368@unreal \
    --to=leon@kernel.org \
    --cc=abhijit.gangurde@amd.com \
    --cc=allen.hubbe@amd.com \
    --cc=andrew.boyer@amd.com \
    --cc=gal.pressman@linux.dev \
    --cc=galpress@amazon.com \
    --cc=jgg@nvidia.com \
    --cc=krzysztof.czurylo@intel.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mrgolin@amazon.com \
    --cc=mustafa.ismail@intel.com \
    --cc=patches@lists.linux.dev \
    --cc=rolandd@cisco.com \
    --cc=shiraz.saleem@intel.com \
    --cc=sleybo@amazon.com \
    --cc=stable@vger.kernel.org \
    --cc=swise@opengridcomputing.com \
    --cc=tatyana.e.nikolova@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