get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2216343/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2216343,
    "url": "http://patchwork.ozlabs.org/api/patches/2216343/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260326104544.509518-3-dhowells@redhat.com/",
    "project": {
        "id": 12,
        "url": "http://patchwork.ozlabs.org/api/projects/12/?format=api",
        "name": "Linux CIFS Client",
        "link_name": "linux-cifs-client",
        "list_id": "linux-cifs.vger.kernel.org",
        "list_email": "linux-cifs@vger.kernel.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260326104544.509518-3-dhowells@redhat.com>",
    "list_archive_url": null,
    "date": "2026-03-26T10:45:17",
    "name": "[02/26] netfs: Fix kernel BUG in netfs_limit_iter() for ITER_KVEC iterators",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "e44fce97ddf35daca71230d9f97cd23b764d450d",
    "submitter": {
        "id": 59,
        "url": "http://patchwork.ozlabs.org/api/people/59/?format=api",
        "name": "David Howells",
        "email": "dhowells@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260326104544.509518-3-dhowells@redhat.com/mbox/",
    "series": [
        {
            "id": 497565,
            "url": "http://patchwork.ozlabs.org/api/series/497565/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/list/?series=497565",
            "date": "2026-03-26T10:45:15",
            "name": "netfs: Keep track of folios in a segmented bio_vec[] chain",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/497565/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2216343/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2216343/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-cifs+bounces-10525-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-cifs@vger.kernel.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=KMpRow1I;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=104.64.211.4; helo=sin.lore.kernel.org;\n envelope-from=linux-cifs+bounces-10525-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com\n header.b=\"KMpRow1I\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=170.10.133.124",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=redhat.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=redhat.com"
        ],
        "Received": [
            "from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fhLKj44YDz1y1G\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 21:55:53 +1100 (AEDT)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id 2DBAA30AB9C2\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 10:47:27 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id D32733DA5B4;\n\tThu, 26 Mar 2026 10:46:35 +0000 (UTC)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\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 63084382F38\n\tfor <linux-cifs@vger.kernel.org>; Thu, 26 Mar 2026 10:46:34 +0000 (UTC)",
            "from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-532-bkvv3eYQNDWdQ1hrbBSehg-1; Thu,\n 26 Mar 2026 06:46:28 -0400",
            "from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 6D192195608B;\n\tThu, 26 Mar 2026 10:46:23 +0000 (UTC)",
            "from warthog.procyon.org.com (unknown [10.44.33.121])\n\tby mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 81831180075C;\n\tThu, 26 Mar 2026 10:46:15 +0000 (UTC)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774521995; cv=none;\n b=dru6rRAIJfKj4zT/w4Blflrn6KhPsoLJxGtye8K1X7DA74oHMlB87DXHwtA2fG0lQ/EoHyQF0e+5fZtCaP+Kq3WxgmlK/FmvbLgSb8LMJVSr3fC6WK6xWjkEkOpgXteW66ZDvCGaMCtbSLnNZagn+PLBLoZJYb686aMyigBiskI=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774521995; c=relaxed/simple;\n\tbh=gvz/gcDuW+KetAIQBj5BeJWsKHNMDr4LBMHJoJ7MhWM=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=PyI1Y9xuxqBBxVw/quFIvRFCVoM5xyTjEcL24ap7EDJXTWZBor3MbVJMD2Au1JrJ+CHaCXjKWWcqycV48ud8Vfx+PMdB3x7adO42hqhv4wzIC1yaY80fAaZElEguLDYF1MxZZzmNMTy3dNpN06/T0eDJUEAEbUxt87ceiEdKtko=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=redhat.com;\n spf=pass smtp.mailfrom=redhat.com;\n dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com\n header.b=KMpRow1I; arc=none smtp.client-ip=170.10.133.124",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1774521993;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\t to:to:cc:cc:mime-version:mime-version:\n\t content-transfer-encoding:content-transfer-encoding:\n\t in-reply-to:in-reply-to:references:references;\n\tbh=MVVzRK3Tmywza1SU8JPOcR6dARnvIl+M3c8pioBtMpU=;\n\tb=KMpRow1I0ytgwqfiM15ZP1oRhxIY/hf2Xmfy2/Fw5qdNQiUuKHip8WtNWpjNwKVdIf1L2l\n\t28A9BU/rOvUDbOQliVtTs9kQMQI3lLqKypm5lzj4PC6TLPjRwTeue753YIEovZP4N49apQ\n\tPaYtJvkuUIfEfGwM25juOsMXxAWWNe0=",
        "X-MC-Unique": "bkvv3eYQNDWdQ1hrbBSehg-1",
        "X-Mimecast-MFC-AGG-ID": "bkvv3eYQNDWdQ1hrbBSehg_1774521985",
        "From": "David Howells <dhowells@redhat.com>",
        "To": "Christian Brauner <christian@brauner.io>,\n\tMatthew Wilcox <willy@infradead.org>,\n\tChristoph Hellwig <hch@infradead.org>",
        "Cc": "David Howells <dhowells@redhat.com>,\n\tPaulo Alcantara <pc@manguebit.com>,\n\tJens Axboe <axboe@kernel.dk>,\n\tLeon Romanovsky <leon@kernel.org>,\n\tSteve French <sfrench@samba.org>,\n\tChenXiaoSong <chenxiaosong@chenxiaosong.com>,\n\tMarc Dionne <marc.dionne@auristor.com>,\n\tEric Van Hensbergen <ericvh@kernel.org>,\n\tDominique Martinet <asmadeus@codewreck.org>,\n\tIlya Dryomov <idryomov@gmail.com>,\n\tTrond Myklebust <trondmy@kernel.org>,\n\tnetfs@lists.linux.dev,\n\tlinux-afs@lists.infradead.org,\n\tlinux-cifs@vger.kernel.org,\n\tlinux-nfs@vger.kernel.org,\n\tceph-devel@vger.kernel.org,\n\tv9fs@lists.linux.dev,\n\tlinux-erofs@lists.ozlabs.org,\n\tlinux-fsdevel@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tDeepanshu Kartikey <kartikey406@gmail.com>,\n\tsyzbot+9c058f0d63475adc97fd@syzkaller.appspotmail.com,\n\tDeepanshu Kartikey <Kartikey406@gmail.com>",
        "Subject": "[PATCH 02/26] netfs: Fix kernel BUG in netfs_limit_iter() for\n ITER_KVEC iterators",
        "Date": "Thu, 26 Mar 2026 10:45:17 +0000",
        "Message-ID": "<20260326104544.509518-3-dhowells@redhat.com>",
        "In-Reply-To": "<20260326104544.509518-1-dhowells@redhat.com>",
        "References": "<20260326104544.509518-1-dhowells@redhat.com>",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-cifs@vger.kernel.org",
        "List-Id": "<linux-cifs.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-cifs+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-cifs+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.93"
    },
    "content": "From: Deepanshu Kartikey <kartikey406@gmail.com>\n\nWhen a process crashes and the kernel writes a core dump to a 9P\nfilesystem, __kernel_write() creates an ITER_KVEC iterator. This\niterator reaches netfs_limit_iter() via netfs_unbuffered_write(), which\nonly handles ITER_FOLIOQ, ITER_BVEC and ITER_XARRAY iterator types,\nhitting the BUG() for any other type.\n\nFix this by adding netfs_limit_kvec() following the same pattern as\nnetfs_limit_bvec(), since both kvec and bvec are simple segment arrays\nwith pointer and length fields. Dispatch it from netfs_limit_iter() when\nthe iterator type is ITER_KVEC.\n\nFixes: cae932d3aee5 (\"netfs: Add func to calculate pagecount/size-limited span of an iterator\")\nReported-by: syzbot+9c058f0d63475adc97fd@syzkaller.appspotmail.com\nCloses: https://syzkaller.appspot.com/bug?extid=9c058f0d63475adc97fd\nTested-by: syzbot+9c058f0d63475adc97fd@syzkaller.appspotmail.com\nSigned-off-by: Deepanshu Kartikey <Kartikey406@gmail.com>\nSigned-off-by: David Howells <dhowells@redhat.com>\n---\n fs/netfs/iterator.c | 43 +++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 43 insertions(+)",
    "diff": "diff --git a/fs/netfs/iterator.c b/fs/netfs/iterator.c\nindex 72a435e5fc6d..154a14bb2d7f 100644\n--- a/fs/netfs/iterator.c\n+++ b/fs/netfs/iterator.c\n@@ -142,6 +142,47 @@ static size_t netfs_limit_bvec(const struct iov_iter *iter, size_t start_offset,\n \treturn min(span, max_size);\n }\n \n+/*\n+ * Select the span of a kvec iterator we're going to use.  Limit it by both\n+ * maximum size and maximum number of segments.  Returns the size of the span\n+ * in bytes.\n+ */\n+static size_t netfs_limit_kvec(const struct iov_iter *iter, size_t start_offset,\n+\t\t\t       size_t max_size, size_t max_segs)\n+{\n+\tconst struct kvec *kvecs = iter->kvec;\n+\tunsigned int nkv = iter->nr_segs, ix = 0, nsegs = 0;\n+\tsize_t len, span = 0, n = iter->count;\n+\tsize_t skip = iter->iov_offset + start_offset;\n+\n+\tif (WARN_ON(!iov_iter_is_kvec(iter)) ||\n+\t    WARN_ON(start_offset > n) ||\n+\t    n == 0)\n+\t\treturn 0;\n+\n+\twhile (n && ix < nkv && skip) {\n+\t\tlen = kvecs[ix].iov_len;\n+\t\tif (skip < len)\n+\t\t\tbreak;\n+\t\tskip -= len;\n+\t\tn -= len;\n+\t\tix++;\n+\t}\n+\n+\twhile (n && ix < nkv) {\n+\t\tlen = min3(n, kvecs[ix].iov_len - skip, max_size);\n+\t\tspan += len;\n+\t\tnsegs++;\n+\t\tix++;\n+\t\tif (span >= max_size || nsegs >= max_segs)\n+\t\t\tbreak;\n+\t\tskip = 0;\n+\t\tn -= len;\n+\t}\n+\n+\treturn min(span, max_size);\n+}\n+\n /*\n  * Select the span of an xarray iterator we're going to use.  Limit it by both\n  * maximum size and maximum number of segments.  It is assumed that segments\n@@ -245,6 +286,8 @@ size_t netfs_limit_iter(const struct iov_iter *iter, size_t start_offset,\n \t\treturn netfs_limit_bvec(iter, start_offset, max_size, max_segs);\n \tif (iov_iter_is_xarray(iter))\n \t\treturn netfs_limit_xarray(iter, start_offset, max_size, max_segs);\n+\tif (iov_iter_is_kvec(iter))\n+\t\treturn netfs_limit_kvec(iter, start_offset, max_size, max_segs);\n \tBUG();\n }\n EXPORT_SYMBOL(netfs_limit_iter);\n",
    "prefixes": [
        "02/26"
    ]
}