Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2220504/?format=api
{ "id": 2220504, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2220504/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260407124421.282766-3-mani@kernel.org/", "project": { "id": 28, "url": "http://patchwork.ozlabs.org/api/1.1/projects/28/?format=api", "name": "Linux PCI development", "link_name": "linux-pci", "list_id": "linux-pci.vger.kernel.org", "list_email": "linux-pci@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null }, "msgid": "<20260407124421.282766-3-mani@kernel.org>", "date": "2026-04-07T12:44:21", "name": "[2/2] PCI: endpoint: pci-epf-ntb: Add check to detect 'db_count' value of 0", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "8a30f64dd7632641ffe89698da5b5a6d99bfb50b", "submitter": { "id": 91273, "url": "http://patchwork.ozlabs.org/api/1.1/people/91273/?format=api", "name": "Manivannan Sadhasivam", "email": "manivannan.sadhasivam@oss.qualcomm.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260407124421.282766-3-mani@kernel.org/mbox/", "series": [ { "id": 498977, "url": "http://patchwork.ozlabs.org/api/1.1/series/498977/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=498977", "date": "2026-04-07T12:44:19", "name": "PCI: endpoint: pci-epf-{v}ntb: A couple of fixes", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/498977/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2220504/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2220504/checks/", "tags": {}, "headers": { "Return-Path": "\n <linux-pci+bounces-52055-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-pci@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256\n header.s=qcppdkim1 header.b=CBBMQ8Yx;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.a=rsa-sha256 header.s=google header.b=A1NYGiD7;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=linux-pci+bounces-52055-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com\n header.b=\"CBBMQ8Yx\";\n\tdkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.b=\"A1NYGiD7\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=205.220.168.131", "smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=oss.qualcomm.com" ], "Received": [ "from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fqmDN22z5z1yD3\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 07 Apr 2026 22:47:00 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 279E6303745E\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 7 Apr 2026 12:44:53 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id AFE683AA4FC;\n\tTue, 7 Apr 2026 12:44:52 +0000 (UTC)", "from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com\n [205.220.168.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 7DBC73B388D\n\tfor <linux-pci@vger.kernel.org>; Tue, 7 Apr 2026 12:44:51 +0000 (UTC)", "from pps.filterd (m0279863.ppops.net [127.0.0.1])\n\tby mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 637BbFrK1584596\n\tfor <linux-pci@vger.kernel.org>; Tue, 7 Apr 2026 12:44:51 GMT", "from mail-pf1-f197.google.com (mail-pf1-f197.google.com\n [209.85.210.197])\n\tby mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dcmr9trdt-1\n\t(version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT)\n\tfor <linux-pci@vger.kernel.org>; Tue, 07 Apr 2026 12:44:50 +0000 (GMT)", "by mail-pf1-f197.google.com with SMTP id\n d2e1a72fcca58-82d02942266so6232864b3a.1\n for <linux-pci@vger.kernel.org>; Tue, 07 Apr 2026 05:44:50 -0700 (PDT)", "from work ([120.60.133.76])\n by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-82cf9c3ce13sm18262551b3a.38.2026.04.07.05.44.44\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 07 Apr 2026 05:44:48 -0700 (PDT)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775565892; cv=none;\n b=DlrQtfuR11Rs46fn8dhQqFD1dJOqHTzgf3ijuBxstjSSr4LirDKya8vUJkWROU+yfbYVJX6heOOJcoOtlBezCJ1pyE9+0MmLrfAb6LMHk9/a4Ki8D6+U6LCS5w+kCXgWi1cdH60lHz/MvagIJNZOCusdMuNzvaNE9QwGY36U9SI=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775565892; c=relaxed/simple;\n\tbh=6vOJo8cFxGIBGsgdZ72PCKdeMVx3dnSGChMlP1LRF/0=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=kik5qnBMqLKRJQM5LCnBTPTklcI/nPVWfrwJsISlKg6eMnMnspsAGGqcwAqtchArH82bvOJJ/9sjKXE1RpN4lwRMqMGa4Pspl8UVXDwezx3P4t6gfxhXAvBPSboOnsz0lOVX0KwD6vFsi2O1R+pmg+A3Tkndt8eCxbcTOyaPxbA=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com;\n spf=pass smtp.mailfrom=oss.qualcomm.com;\n dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com\n header.b=CBBMQ8Yx;\n dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.b=A1NYGiD7; arc=none smtp.client-ip=205.220.168.131", "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=\n\tcc:content-transfer-encoding:date:from:in-reply-to:message-id\n\t:mime-version:references:subject:to; s=qcppdkim1; bh=+McTs62jXEi\n\tG+U6yhLRFrie/mtKMh+Q9ylHrEG5OPXc=; b=CBBMQ8YxfOv+T/jzRRSo2B18sd1\n\tm9Wb5pVeCQi6kxLETjsFqcZHFe/DR6BbDk+nLiHhG9LlQ3wPL5w/4nGNGgpo9gWz\n\thv1UeTtbJaoLSZlDCnyQRYSmBRejyqumEgPjHYVHXNOETM+/UdBLsWCg3EonNT1Y\n\t0Imt7UuvQC6MNkcgnoBHxWpr7ybgPCgPYFuIax4tNUqJBcPMXyvqeZcTR9EEaUA5\n\t3HJZ/wMbYetGZ1lUNvs67RVr8Vm9cOXWs0syyhsJCuYUBzxsfjMpX8jNWZD4LfPP\n\tyEE1EGrkJZazM35Hw9omJJHdLPPoebNt5SPPmGaniBvGL7q5WmZ4/Z7jVkA==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=oss.qualcomm.com; s=google; t=1775565890; x=1776170690;\n darn=vger.kernel.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=+McTs62jXEiG+U6yhLRFrie/mtKMh+Q9ylHrEG5OPXc=;\n b=A1NYGiD7KmLmZBApR6f1cTYl+8XH3f1PtW5JwJkKBTysVZOPjkjDdQKB87/Yb+cBEz\n 7GKKKq7JQkWF7gOU+sTmOah0XT2LU8T3VXWyJ3v1Qv4f0Bww6s8JDueo1cTnbyPmpPTo\n TotlStST8QdG26wT0PHFY34FIPxEDlhSXhOhQWtdVxt+LoP+oKrLBnOP7zhWER2JWGP/\n AN8DtMTSv7IOPSDGbaCE2Q51rIXyQDhGELFxOS50TqQvNe1Tex2QilQpMlh5tYC7bE3F\n iarzaQ8fzUg6DP+BO9STCrbO6TzLdMmvtSxkaVbKmYOTCvjtWiaedLUD/01+EumN7ga+\n g5SQ==" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775565890; x=1776170690;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=+McTs62jXEiG+U6yhLRFrie/mtKMh+Q9ylHrEG5OPXc=;\n b=D+8ajvpZ0bPMpOYony3zchooSPhe6ox5skxnW+4JDz/CMBuFHVELgTxxJU+IKbnyIz\n CTlQrEOHqZr6PlitEykUud0DmsmNhDHyIZfQ4NqxpXl4ciiMTBzV0BEMpdTYuSLhELnn\n iosVaXQK7Gjv7ViIw34cXrM/QxCHZkzoHiJ1yRhlZ9r9ETj2zV4d7OytNLrmAQo0Wtma\n xfKTpOqluszQVLh6HaJcQyl8FvE8tD/XyswFEjMCzmq8cL+eJLnggi4bmeDLz2ZoXob7\n NE0JvYmyiujaLBT6B0onpi6zQOQuA7o8CSiJziOH9fO83W1cfrwBjnUYw3/ylBV+EZ+c\n ONZw==", "X-Forwarded-Encrypted": "i=1;\n AJvYcCXT8QpRLmGXVjNfAnb9SrCdazj62Ixt8eCVrmf3qtwWUQg+ulJn8cyzUpChPYng+p4B9sC4vy8tlg8=@vger.kernel.org", "X-Gm-Message-State": "AOJu0YyqrSyBjEU3Jx3u1XVXG/f4otwwJJV15b/Rv14/tgQvYfkpngk5\n\tFl83fpz5Ph0FuGmNOMjblFC5aMlU9bhH0W238hIErmoqbyhzOcoWGPTCbmVv1oNkSO459LTXJJN\n\taJkG7qFtcjZveaAnSdl/51uaS4iN4RLhsDerRQaBbh8V32rGcxHExldApqhULgjs=", "X-Gm-Gg": "AeBDieu/1dxTzodhyaC6UlRubCadL8lTgTJQZips3LWLUxivA7nva4iaI/bKmPx7lsB\n\te7gfeyGm3EIVtJ/WjtPIKgv3I+Q+CXEWMPzHIdh5AjuEfGGw3gbdwhBkL6FAlblX4MZ8favJAUk\n\t7wPFULp0pyJxA+Nk+jlX0Gfw0Ve10KRgdVii/cF1gfXHdDITApTnzuvi15tBn20zhbcUbTdVCl6\n\tzR9bpNpLkbwYKHK7kquw264RJqxN6R7wVJ6d+9cMgjXxrip7OUtcz35k1HOhh2iKxHGrAzVBjvf\n\tcUuYETCSe6+2CCkDqljL5DYZ9PwSngDmc5LdXWBRu7F/5Pn4ER8JIL8DZCNxgk6QGYefIhWgIsM\n\t9wJ2Gtw==", "X-Received": [ "by 2002:a05:6a00:451b:b0:829:9c5d:4342 with SMTP id\n d2e1a72fcca58-82d0dbdeb04mr16110997b3a.54.1775565890140;\n Tue, 07 Apr 2026 05:44:50 -0700 (PDT)", "by 2002:a05:6a00:451b:b0:829:9c5d:4342 with SMTP id\n d2e1a72fcca58-82d0dbdeb04mr16110973b3a.54.1775565889440;\n Tue, 07 Apr 2026 05:44:49 -0700 (PDT)" ], "From": "Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>", "X-Google-Original-From": "Manivannan Sadhasivam <mani@kernel.org>", "To": "mani@kernel.org, kwilczynski@kernel.org, kishon@kernel.org,\n bhelgaas@google.com", "Cc": "jdmason@kudzu.us, dave.jiang@intel.com, allenbh@gmail.com,\n ntb@lists.linux.dev, linux-pci@vger.kernel.org,\n linux-kernel@vger.kernel.org, den@valinux.co.jp, Frank.li@nxp.com,\n Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>", "Subject": "[PATCH 2/2] PCI: endpoint: pci-epf-ntb: Add check to detect\n 'db_count' value of 0", "Date": "Tue, 7 Apr 2026 18:14:21 +0530", "Message-ID": "<20260407124421.282766-3-mani@kernel.org>", "X-Mailer": "git-send-email 2.51.0", "In-Reply-To": "<20260407124421.282766-1-mani@kernel.org>", "References": "<20260407124421.282766-1-mani@kernel.org>", "Precedence": "bulk", "X-Mailing-List": "linux-pci@vger.kernel.org", "List-Id": "<linux-pci.vger.kernel.org>", "List-Subscribe": "<mailto:linux-pci+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-pci+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Authority-Analysis": "v=2.4 cv=SMdykuvH c=1 sm=1 tr=0 ts=69d4fc42 cx=c_pps\n a=rEQLjTOiSrHUhVqRoksmgQ==:117 a=yDxY/ZQAnAaCL67VaoekCQ==:17\n a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22\n a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=EUspDBNiAAAA:8\n a=PxpW6Q19wR3HJFGb5M4A:9 a=2VI0MkxyNR6bbpdq8BZq:22", "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwNDA3MDExOSBTYWx0ZWRfX2IMu1H1CX5cS\n +DfCCGEbYwvYDxr5EpNmxMx/LN4uJeVWLg/zwfZosp4onqGg3HUVyX2VJ5tORaMruiLuhZS2wT7\n 3K9H+8yf9htFVcWlV72EOkZkURk/+tntQVc6rOD+3MneqXWr9U0X6KHdAKi0I9GUdHwGd4sfiAz\n DZ82SOZJqea7SxV6fcFG5MI2b8aJU6FOgr7AS9E8YcmfZj9SRe7joYFVf2D7ib0bdSMp2QvScd6\n QlPabOWJTy0VUed0CQmbOfC5TJ06V3Zr47eOSOJG4kE5Rfk6RyJPsr2/OOQNf3o6Jm77ToCG3Nm\n G+i8RRtp2YARReypVI8//KInQKWVmkYt4RrG0JawZxHs1wqpeEqzZsmeGkbwan9ppubmWQxJFNm\n bRSbipCRDGactr1JaHHGneFjMyhrOoiTpb6icuBEDLQFtB60tTwg4qukN4s5vImb9Kw2Sg+6pvk\n uy8e4+WLhtUtcG8xwIw==", "X-Proofpoint-GUID": "AOJkM8b9iUDITD0gkh9a4E8Tw76YGhoO", "X-Proofpoint-ORIG-GUID": "AOJkM8b9iUDITD0gkh9a4E8Tw76YGhoO", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-04-07_02,2026-04-07_02,2025-10-01_01", "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n clxscore=1015 malwarescore=0 adultscore=0 lowpriorityscore=0 phishscore=0\n impostorscore=0 priorityscore=1501 suspectscore=0 bulkscore=0 spamscore=0\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2604010000 definitions=main-2604070119" }, "content": "From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>\n\nepf_ntb::db_count value should be within 1 to MAX_DB_COUNT. Current code\nonly checks for the upper bound, while the lower bound is unchecked. This\ncan cause a lot of issues in the driver if the user passes 'db_count' as 0.\n\nSo add a check for 0 also. While at it, remove the redundant 'db_count'\nassignment.\n\nFixes: 8b821cf76150 (\"PCI: endpoint: Add EP function driver to provide NTB functionality\")\nSigned-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>\n---\n drivers/pci/endpoint/functions/pci-epf-ntb.c | 15 +++++++++------\n 1 file changed, 9 insertions(+), 6 deletions(-)", "diff": "diff --git a/drivers/pci/endpoint/functions/pci-epf-ntb.c b/drivers/pci/endpoint/functions/pci-epf-ntb.c\nindex 2bdcc35b652c..7edd177f861f 100644\n--- a/drivers/pci/endpoint/functions/pci-epf-ntb.c\n+++ b/drivers/pci/endpoint/functions/pci-epf-ntb.c\n@@ -559,12 +559,15 @@ static int epf_ntb_configure_db(struct epf_ntb *ntb,\n \tstruct pci_epc *epc;\n \tint ret;\n \n-\tif (db_count > MAX_DB_COUNT)\n-\t\treturn -EINVAL;\n-\n \tntb_epc = ntb->epc[type];\n \tepc = ntb_epc->epc;\n \n+\tif (!db_count || db_count > MAX_DB_COUNT) {\n+\t\tdev_err(&epc->dev, \"DB count %d out of range (1 - %d)\\n\",\n+\t\t\tdb_count, MAX_DB_COUNT);\n+\t\treturn -EINVAL;\n+\t}\n+\n \tif (msix)\n \t\tret = epf_ntb_configure_msix(ntb, type, db_count);\n \telse\n@@ -1297,12 +1300,12 @@ static int epf_ntb_configure_interrupt(struct epf_ntb *ntb,\n \tvfunc_no = ntb_epc->vfunc_no;\n \n \tdb_count = ntb->db_count;\n-\tif (db_count > MAX_DB_COUNT) {\n-\t\tdev_err(dev, \"DB count cannot be more than %d\\n\", MAX_DB_COUNT);\n+\tif (!db_count || db_count > MAX_DB_COUNT) {\n+\t\tdev_err(dev, \"DB count %d out of range (1 - %d)\\n\",\n+\t\t\tdb_count, MAX_DB_COUNT);\n \t\treturn -EINVAL;\n \t}\n \n-\tntb->db_count = db_count;\n \tepc = ntb_epc->epc;\n \n \tif (msi_capable) {\n", "prefixes": [ "2/2" ] }