From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 006403ABDB3 for ; Tue, 12 May 2026 14:18:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778595508; cv=none; b=ZtmQYxbkgRTeULl7hk2TWd5v/gT4pmLSVAEEBK45LijONysNJIcG9J/RfI7W9F9lOoFJ/1QM5Y4CfV+myJURooyCf8ZJnSGF3XGNV5p+7pQKvU1Vr3U4dw0qCJqy++7hJHguqT4GWYMkPu16TmfLJ918ODRGiBGaUrXYRwACsq0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778595508; c=relaxed/simple; bh=wqC79YUMA5sULJ+yLDOiaMRTw2bgMubAH+gZ0LTXNfk=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=B0JYbk5jrLOttEYOciB5ceSbbd5Fk6ebd1ghFZqeJyRDAsVokJFJDLEuFVFXViboW6qhsYA+8/lhXtqHgJamarY8c4mVQ70V5aMRTO87+ppoocGbWJJ8b/DTrbaURrjoPuNKv+10vZyFkcXQiaPqGjhDk94EZQYX+BM8Fmsw84s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=BTLBI/b/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="BTLBI/b/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D2CFC2BCF7; Tue, 12 May 2026 14:18:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778595507; bh=wqC79YUMA5sULJ+yLDOiaMRTw2bgMubAH+gZ0LTXNfk=; h=Subject:To:Cc:From:Date:From; b=BTLBI/b/wEW+kjBdC5yRLt1+zfyipA5yGx8kSLQ3IJXSCaMQOR34SK3ybEGNB/9F2 0UAtD79wcyvHnfXGkvtitbVqa9jdOzyqVZeXM3XP4Dm8BwsIXND+3FoeKP/UGNSwpw 6OhL+fzik/u54r9I/tsHP2mfLw3qBKv8zAPS+6h8= Subject: FAILED: patch "[PATCH] RDMA/mana: Remove user triggerable WARN_ON() in" failed to apply to 6.12-stable tree To: jgg@ziepe.ca,jgg@nvidia.com,longli@microsoft.com Cc: From: Date: Tue, 12 May 2026 16:15:29 +0200 Message-ID: <2026051229-jelly-reverence-0bf5@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.12-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y git checkout FETCH_HEAD git cherry-pick -x 159f2efabc89d3f931d38f2d35876535d4abf0a3 # git commit -s git send-email --to '' --in-reply-to '2026051229-jelly-reverence-0bf5@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 159f2efabc89d3f931d38f2d35876535d4abf0a3 Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Tue, 28 Apr 2026 13:17:38 -0300 Subject: [PATCH] RDMA/mana: Remove user triggerable WARN_ON() in mana_ib_create_qp_rss() Sashiko points out that the user can specify WQs sharing the same CQ as a part of the uAPI and this will trigger the WARN_ON() then go on to corrupt the kernel. Just reject it outright and fail the QP creation. Cc: stable@vger.kernel.org Fixes: c15d7802a424 ("RDMA/mana_ib: Add CQ interrupt support for RAW QP") Link: https://sashiko.dev/#/patchset/0-v2-1c49eeb88c48%2B91-rdma_udata_rep_jgg%40nvidia.com?part=1 Link: https://patch.msgid.link/r/5-v1-41f3135e5565+9d2-rdma_ai_fixes1_jgg@nvidia.com Reviewed-by: Long Li Signed-off-by: Jason Gunthorpe diff --git a/drivers/infiniband/hw/mana/cq.c b/drivers/infiniband/hw/mana/cq.c index f4cbe21763bf..2d682428ef20 100644 --- a/drivers/infiniband/hw/mana/cq.c +++ b/drivers/infiniband/hw/mana/cq.c @@ -137,8 +137,9 @@ int mana_ib_install_cq_cb(struct mana_ib_dev *mdev, struct mana_ib_cq *cq) if (cq->queue.id >= gc->max_num_cqs) return -EINVAL; - /* Create CQ table entry */ - WARN_ON(gc->cq_table[cq->queue.id]); + /* Create CQ table entry, sharing a CQ between WQs is not supported */ + if (gc->cq_table[cq->queue.id]) + return -EINVAL; if (cq->queue.kmem) gdma_cq = cq->queue.kmem; else