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 26C344DEC32 for ; Tue, 22 Sep 2026 09:44:08 +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=1790070249; cv=none; b=tnvJ64gpIlJzoNXjOINBNQ61oL5rQtKHNoX5rIWUFKwHnR9MbeRJYHqzfKWsLkVc7DHE1cXlgqOg1iaklUwAt7L3shOuzejx36P9rsJIH5dugaHaIh7+PtPuoAjOtfOZEP0c/DgvmWRGZA8cmifQU20Td38WEtbosLpEVVVk1Yw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790070249; c=relaxed/simple; bh=50tOeINFt+xIzqRuVyc3jUlI8GsU1ht1kVAbltHcjoY=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=kIHCpafGmIz+xOa1i/6kEZaSwtwHzxTp6uXS8aOYdJHIZaAjgbPh3tGBBZxWQZtHQPW4+/viNp/PBzcS1UrdCZZXZ+KhdmCXl9pjbv0ZO6khnt2KjQ9u6rtdW0KzaS01oxy/ukLFKQDgIeIh3kRfX8mh3IvzJ9eSK+QzjLBDUas= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Uj0Pe57F; 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="Uj0Pe57F" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5C3D31F000FF; Tue, 22 Sep 2026 09:44:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790070248; bh=uknRrAhBDfUUX+sOVMGBULHEG8aGojeapHJrT2RnK3A=; h=Subject:To:Cc:From:Date; b=Uj0Pe57FYMH5AYrnf1GfDjqHF842bARJQjaW/M2Yh+rC/pl1t33pSCdSeWvAk7TvU 9D5RozwUHQcBmtPV4uQjgIBa8vZ9/il/Lv0gwyQvhIlPg2ZwYgB1kUdXxDohBCVPwX 977jgou1CWQ+k0wqAf3LfSuFwXJu/NFZLNNGrS9U= Subject: FAILED: patch "[PATCH] IB/hfi1: Resolve the credit-return buffer through the send" failed to apply to 5.10-stable tree To: jyohuku.alterego@gmail.com,leon@kernel.org Cc: From: Date: Tue, 22 Sep 2026 11:40:07 +0200 Message-ID: <2026092207-spotless-rambling-6fce@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 5.10-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-5.10.y git checkout FETCH_HEAD git cherry-pick -x 975396b9e5a4028e649f4b9a6a5ca5dfb76a824b # git commit -s git send-email --to '' --in-reply-to '2026092207-spotless-rambling-6fce@gregkh' --subject-prefix 'PATCH 5.10.y' 'HEAD^..' Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ From 975396b9e5a4028e649f4b9a6a5ca5dfb76a824b Mon Sep 17 00:00:00 2001 From: Shuhei Takeshita Date: Sun, 9 Aug 2026 12:27:42 +0900 Subject: [PATCH] IB/hfi1: Resolve the credit-return buffer through the send context's node hfi1_file_mmap()'s PIO_CRED case derives this context's credit-return page offset, and the DMA handle for it, from dd->cr_base[uctxt->numa_id]. uctxt->numa_id is the node of whichever CPU the process happened to be running on, but the entry itself lives in the credit-return allocation of the send context's own node: sc->hw_free = &sc->dd->cr_base[sc->node].va[gc].cr[index]; and user send contexts are allocated with sc_alloc(dd, SC_USER, ..., dd->node), the HFI-local node. On a multi-socket host with the process running off that node the two allocations differ, so the subtraction produces an offset into an unrelated buffer and the DMA handle belongs to the wrong allocation. Use the send context's own node for all three references. The continuation lines are reindented at the same time; they mixed spaces and tabs. Fixes: 7724105686e7 ("IB/hfi1: add driver files") Cc: stable@vger.kernel.org Signed-off-by: Shuhei Takeshita Link: https://patch.msgid.link/20260809032743.2671579-2-jyohuku.alterego@gmail.com Signed-off-by: Leon Romanovsky diff --git a/drivers/infiniband/hw/hfi1/file_ops.c b/drivers/infiniband/hw/hfi1/file_ops.c index dc548e6802e2..72c21d7455fd 100644 --- a/drivers/infiniband/hw/hfi1/file_ops.c +++ b/drivers/infiniband/hw/hfi1/file_ops.c @@ -382,10 +382,10 @@ static int hfi1_file_mmap(struct file *fp, struct vm_area_struct *vma) * of enabled contexts > 64 and 128 respectively). */ cr_page_offset = ((u64)uctxt->sc->hw_free - - (u64)dd->cr_base[uctxt->numa_id].va) & - PAGE_MASK; - memvirt = dd->cr_base[uctxt->numa_id].va + cr_page_offset; - memdma = dd->cr_base[uctxt->numa_id].dma + cr_page_offset; + (u64)dd->cr_base[uctxt->sc->node].va) & + PAGE_MASK; + memvirt = dd->cr_base[uctxt->sc->node].va + cr_page_offset; + memdma = dd->cr_base[uctxt->sc->node].dma + cr_page_offset; memlen = PAGE_SIZE; flags &= ~VM_MAYWRITE; flags |= VM_DONTCOPY | VM_DONTEXPAND;