From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 051962EBB8D; Tue, 21 Jul 2026 20:35:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784666102; cv=none; b=F7/sP5hRgxjMR6o2PBr4IVZsY2lSpuh33fEod0jZvV6LDqEIafF4mxwB2aVhsQ8j9J8HOT+NsrkAWWpmD47jx8fczmccprEpI5OXdelKjAoTjf2uN4vYMRjIaFYuP103cgZLZJdSMEtLpdysDLTn2avGP9DapJGR/rao1/3pBFQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784666102; c=relaxed/simple; bh=q8olZCL6XomPgRwF8qTU/qb2hrL39ITARfhcgffo3SE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=H5QRJM5/psgo0PKMEwzaW/t2qn8qh7Z2hMAK2wzd7TOt6mYdeaSRLsVbPvnjo1cTY6uOaWo6pYDvR8ep5MmZ6er7YF7pLNwm3xTtp3GG//JerA4kcq0IJYbtYjbhpxReglILt3yfB5Mr/m6P4MA38vBPVWBllmnmXKZCdNrc/WY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=S3x7kRpd; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="S3x7kRpd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 917731F000E9; Tue, 21 Jul 2026 20:35:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784666100; bh=KCAjHNF56vae6K+a7Coosi5dA0Dv/17FOjmRl9yuNNQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=S3x7kRpdrB0aYCxkEhCyEIeXkMEbSzKiBv9D/AoZy8LZmRTGicGGGhK17y7JE/LPx 1jMYpa9+nM3hCr9XhfTwTztdKioazqTb7aLyxYMkhJ8t8q+4lx/nR5XWjqoxSRCb2k wsCGrHnDvixlkmBozPIC2FghS21m1j1u2waH3odw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Jason Gunthorpe , Sasha Levin Subject: [PATCH 6.6 0511/1266] IB/mlx5: Dont take the rereg_mr fallback without a new translation Date: Tue, 21 Jul 2026 17:15:48 +0200 Message-ID: <20260721152453.281687873@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260721152441.786066624@linuxfoundation.org> References: <20260721152441.786066624@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jason Gunthorpe [ Upstream commit 55d339d200c908de83a408d023cfb7be779b0dd7 ] Jumping to mlx5_ib_reg_user_mr() without IB_MR_REREG_TRANS set will use garbage values for start, length, and iova. Recovering the original mr parameters for ODP and DMABUF to properly recreate it is too hard in this flow, so just fail it. Fixes: ef3642c4f54d ("RDMA/mlx5: Fix error unwinds for rereg_mr") Link: https://patch.msgid.link/r/1-v1-29ebd2c229b5+fd5-ib_mr_pd_jgg@nvidia.com Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/mlx5/mr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c index 6968092b6a413e..b6727f4647915b 100644 --- a/drivers/infiniband/hw/mlx5/mr.c +++ b/drivers/infiniband/hw/mlx5/mr.c @@ -1721,7 +1721,7 @@ struct ib_mr *mlx5_ib_rereg_user_mr(struct ib_mr *ib_mr, int flags, u64 start, } /* DM or ODP MR's don't have a normal umem so we can't re-use it */ if (!mr->umem || is_odp_mr(mr) || is_dmabuf_mr(mr)) - goto recreate; + return ERR_PTR(-EOPNOTSUPP); /* * Only one active MR can refer to a umem at one time, revoke -- 2.53.0