Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/810663/?format=api
{ "id": 810663, "url": "http://patchwork.ozlabs.org/api/patches/810663/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170906145908.8082-2-tuomas@tuxera.com/", "project": { "id": 7, "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api", "name": "Linux network development", "link_name": "netdev", "list_id": "netdev.vger.kernel.org", "list_email": "netdev@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170906145908.8082-2-tuomas@tuxera.com>", "list_archive_url": null, "date": "2017-09-06T14:59:07", "name": "[1/2] fs/9p: Compare qid.path in v9fs_test_inode", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": true, "hash": "2a45699fe3cd199a3e56f8e85f7bc25a0590ecfc", "submitter": { "id": 70706, "url": "http://patchwork.ozlabs.org/api/people/70706/?format=api", "name": "Tuomas Tynkkynen", "email": "tuomas@tuxera.com" }, "delegate": { "id": 34, "url": "http://patchwork.ozlabs.org/api/users/34/?format=api", "username": "davem", "first_name": "David", "last_name": "Miller", "email": "davem@davemloft.net" }, "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/20170906145908.8082-2-tuomas@tuxera.com/mbox/", "series": [ { "id": 1830, "url": "http://patchwork.ozlabs.org/api/series/1830/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=1830", "date": "2017-09-06T14:59:06", "name": "9p: Fixes for hard-to-hit bugs", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/1830/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/810663/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/810663/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<netdev-owner@vger.kernel.org>", "X-Original-To": "patchwork-incoming@ozlabs.org", "Delivered-To": "patchwork-incoming@ozlabs.org", "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xnRq40rX4z9t2R\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 7 Sep 2017 01:10:40 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S932854AbdIFPKi (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 6 Sep 2017 11:10:38 -0400", "from mx1.mpynet.fi ([82.197.21.84]:25008 \"EHLO mx1.mpynet.fi\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S932714AbdIFPKe (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tWed, 6 Sep 2017 11:10:34 -0400" ], "From": "Tuomas Tynkkynen <tuomas@tuxera.com>", "To": "Al Viro <viro@zeniv.linux.org.uk>", "CC": "<v9fs-developer@lists.sourceforge.net>,\n\tEric Van Hensbergen <ericvh@gmail.com>,\n\tRon Minnich <rminnich@sandia.gov>, Latchesar Ionkov <lucho@ionkov.net>,\n\t\"David S. Miller\" <davem@davemloft.net>,\n\t<linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,\n\t<linux-fsdevel@vger.kernel.org>,\n\tTuomas Tynkkynen <tuomas@tuxera.com>, <stable@vger.kernel.org>", "Subject": "[PATCH 1/2] fs/9p: Compare qid.path in v9fs_test_inode", "Date": "Wed, 6 Sep 2017 17:59:07 +0300", "Message-ID": "<20170906145908.8082-2-tuomas@tuxera.com>", "X-Mailer": "git-send-email 2.13.0", "In-Reply-To": "<20170906145908.8082-1-tuomas@tuxera.com>", "References": "<20170906145908.8082-1-tuomas@tuxera.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-ClientProxiedBy": "tuxera-exch.ad.tuxera.com (10.20.48.11) To\n\ttuxera-exch.ad.tuxera.com (10.20.48.11)", "Received-SPF": "none", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "Commit fd2421f54423 (\"fs/9p: When doing inode lookup compare qid details\nand inode mode bits.\") transformed v9fs_qid_iget() to use iget5_locked()\ninstead of iget_locked(). However, the test() callback is not checking\nfid.path at all, which means that a lookup in the inode cache can now\naccidentally locate a completely wrong inode from the same inode hash\nbucket if the other fields (qid.type and qid.version) match.\n\nFixes: fd2421f54423 (\"fs/9p: When doing inode lookup compare qid details and inode mode bits.\")\nCc: stable@vger.kernel.org\nReviewed-by: Latchesar Ionkov <lucho@ionkov.net>\nSigned-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>\n---\n fs/9p/vfs_inode.c | 3 +++\n fs/9p/vfs_inode_dotl.c | 3 +++\n 2 files changed, 6 insertions(+)", "diff": "diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c\nindex 2a5de610dd8f..bdabb2765d1b 100644\n--- a/fs/9p/vfs_inode.c\n+++ b/fs/9p/vfs_inode.c\n@@ -483,6 +483,9 @@ static int v9fs_test_inode(struct inode *inode, void *data)\n \n \tif (v9inode->qid.type != st->qid.type)\n \t\treturn 0;\n+\n+\tif (v9inode->qid.path != st->qid.path)\n+\t\treturn 0;\n \treturn 1;\n }\n \ndiff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c\nindex 70f9887c59a9..7f6ae21a27b3 100644\n--- a/fs/9p/vfs_inode_dotl.c\n+++ b/fs/9p/vfs_inode_dotl.c\n@@ -87,6 +87,9 @@ static int v9fs_test_inode_dotl(struct inode *inode, void *data)\n \n \tif (v9inode->qid.type != st->qid.type)\n \t\treturn 0;\n+\n+\tif (v9inode->qid.path != st->qid.path)\n+\t\treturn 0;\n \treturn 1;\n }\n \n", "prefixes": [ "1/2" ] }