Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2216359/?format=api
{ "id": 2216359, "url": "http://patchwork.ozlabs.org/api/patches/2216359/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260326104544.509518-5-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-5-dhowells@redhat.com>", "list_archive_url": null, "date": "2026-03-26T10:45:19", "name": "[04/26] netfs: fix error handling in netfs_extract_user_iter()", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "25e23439a1dfe08509dd584c628ece8e8f0cf738", "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-5-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/2216359/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2216359/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-cifs+bounces-10527-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=bGzAKdrg;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-cifs+bounces-10527-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=\"bGzAKdrg\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=170.10.129.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 sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\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 4fhLZW5hkWz1y1x\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 22:06:59 +1100 (AEDT)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 3D0783123EF7\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 10:48:10 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 4091D3E4C8C;\n\tThu, 26 Mar 2026 10:46:55 +0000 (UTC)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.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 DF0F83E4C64\n\tfor <linux-cifs@vger.kernel.org>; Thu, 26 Mar 2026 10:46:53 +0000 (UTC)", "from mx-prod-mc-01.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-553-SbEJ6LxhO5WiP_Ngehg1ZQ-1; Thu,\n 26 Mar 2026 06:46:46 -0400", "from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12])\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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 04DF719560B9;\n\tThu, 26 Mar 2026 10:46:43 +0000 (UTC)", "from warthog.procyon.org.com (unknown [10.44.33.121])\n\tby mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 586C419560B1;\n\tThu, 26 Mar 2026 10:46:35 +0000 (UTC)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1774522015; cv=none;\n b=QbvF/70E+LsoQZfH9rt3XkbpdhwBmjuQtbcuYsTVhkYri3YFUL69HfvQmaMn7kU2IpKfGlf3d3c2ARtyfiYYluhXgmhli8MUy2MQCarlCfCwxR+oraZUVBIeQdnsR1NiK6FxITjRRXLRIuS6ljS+YiLImGWS6HtW0wo4jaIDaWk=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1774522015; c=relaxed/simple;\n\tbh=3fxCrPv5jOhzXpbEPh03vPyoVSVq+MIAtMK0QRjzkYs=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=HpJ7XPoBu74v8BdOCIPSUMEkUntFNHoRuNZJZ+UEQ6MhSf8iF0Hb3bj8/boHgM+9JuurKq6w44mt/3fygi7pC5RrscJ02w6LvdATDQ03fptopKL4oT4kTGro0l0vo7dcs9xDLXM71S/W3KrCLjynzOg7OgQzkUT5xCtg17nH7CU=", "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=bGzAKdrg; arc=none smtp.client-ip=170.10.129.124", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1774522012;\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=HpVDvhFE67l3OFnKv5DoNdb7shfVdE092GWoAVAsAa0=;\n\tb=bGzAKdrgHbG4I1dQNPr9yBiox/FwdaDxWUU1jCRxWt+G4U1Gtg10upTiCmTyqx+TeFHJ8k\n\tzbxcElYN/LTo8NioqNITmtrmIUHF1E3LXjl7Haj5g7BphWngSng07sfFENHevNoKuSrBqM\n\t98KZwH602RlDHV4CPCbBiCYxpmmo6V0=", "X-MC-Unique": "SbEJ6LxhO5WiP_Ngehg1ZQ-1", "X-Mimecast-MFC-AGG-ID": "SbEJ6LxhO5WiP_Ngehg1ZQ_1774522003", "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\tPaulo Alcantara <pc@manguebit.org>,\n\tXiaoli Feng <xifeng@redhat.com>,\n\tstable@vger.kernel.org", "Subject": "[PATCH 04/26] netfs: fix error handling in netfs_extract_user_iter()", "Date": "Thu, 26 Mar 2026 10:45:19 +0000", "Message-ID": "<20260326104544.509518-5-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.0 on 10.30.177.12" }, "content": "From: Paulo Alcantara <pc@manguebit.org>\n\nIn netfs_extract_user_iter(), if iov_iter_extract_pages() failed to\nextract user pages, bail out on -ENOMEM, otherwise return the error\ncode only if @npages == 0, allowing short DIO reads and writes to be\nissued.\n\nThis fixes mmapstress02 from LTP tests against CIFS.\n\nReported-by: Xiaoli Feng <xifeng@redhat.com>\nFixes: 85dd2c8ff368 (\"netfs: Add a function to extract a UBUF or IOVEC into a BVEC iterator\")\nSigned-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>\nReviewed-by: David Howells <dhowells@redhat.com>\nCc: netfs@lists.linux.dev\nCc: stable@vger.kernel.org\nCc: linux-cifs@vger.kernel.org\nCc: linux-fsdevel@vger.kernel.org\nSigned-off-by: David Howells <dhowells@redhat.com>\n---\n fs/netfs/iterator.c | 13 ++++++++++---\n 1 file changed, 10 insertions(+), 3 deletions(-)", "diff": "diff --git a/fs/netfs/iterator.c b/fs/netfs/iterator.c\nindex 154a14bb2d7f..adca78747f23 100644\n--- a/fs/netfs/iterator.c\n+++ b/fs/netfs/iterator.c\n@@ -22,7 +22,7 @@\n *\n * Extract the page fragments from the given amount of the source iterator and\n * build up a second iterator that refers to all of those bits. This allows\n- * the original iterator to disposed of.\n+ * the original iterator to be disposed of.\n *\n * @extraction_flags can have ITER_ALLOW_P2PDMA set to request peer-to-peer DMA be\n * allowed on the pages extracted.\n@@ -67,8 +67,8 @@ ssize_t netfs_extract_user_iter(struct iov_iter *orig, size_t orig_len,\n \t\tret = iov_iter_extract_pages(orig, &pages, count,\n \t\t\t\t\t max_pages - npages, extraction_flags,\n \t\t\t\t\t &offset);\n-\t\tif (ret < 0) {\n-\t\t\tpr_err(\"Couldn't get user pages (rc=%zd)\\n\", ret);\n+\t\tif (unlikely(ret <= 0)) {\n+\t\t\tret = ret ?: -EIO;\n \t\t\tbreak;\n \t\t}\n \n@@ -97,6 +97,13 @@ ssize_t netfs_extract_user_iter(struct iov_iter *orig, size_t orig_len,\n \t\tnpages += cur_npages;\n \t}\n \n+\tif (ret < 0 && (ret == -ENOMEM || npages == 0)) {\n+\t\tfor (i = 0; i < npages; i++)\n+\t\t\tunpin_user_page(bv[i].bv_page);\n+\t\tkvfree(bv);\n+\t\treturn ret;\n+\t}\n+\n \tiov_iter_bvec(new, orig->data_source, bv, npages, orig_len - count);\n \treturn npages;\n }\n", "prefixes": [ "04/26" ] }