Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/810251/?format=api
{ "id": 810251, "url": "http://patchwork.ozlabs.org/api/1.2/patches/810251/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/1504637190.15310.62.camel@edumazet-glaptop3.roam.corp.google.com/", "project": { "id": 7, "url": "http://patchwork.ozlabs.org/api/1.2/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": "<1504637190.15310.62.camel@edumazet-glaptop3.roam.corp.google.com>", "list_archive_url": null, "date": "2017-09-05T18:46:30", "name": "[v2] radix-tree: must check __radix_tree_preload() return value", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": true, "hash": "26cc766cfe9a1a3d4dbbebfb15c063942a627182", "submitter": { "id": 2404, "url": "http://patchwork.ozlabs.org/api/1.2/people/2404/?format=api", "name": "Eric Dumazet", "email": "eric.dumazet@gmail.com" }, "delegate": { "id": 34, "url": "http://patchwork.ozlabs.org/api/1.2/users/34/?format=api", "username": "davem", "first_name": "David", "last_name": "Miller", "email": "davem@davemloft.net" }, "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/1504637190.15310.62.camel@edumazet-glaptop3.roam.corp.google.com/mbox/", "series": [ { "id": 1629, "url": "http://patchwork.ozlabs.org/api/1.2/series/1629/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=1629", "date": "2017-09-05T18:46:30", "name": "[v2] radix-tree: must check __radix_tree_preload() return value", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/1629/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/810251/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/810251/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>)", "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"OFIrVIh/\"; dkim-atps=neutral" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xmwfh6h6Sz9s8J\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 6 Sep 2017 04:46:36 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752867AbdIESqf (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tTue, 5 Sep 2017 14:46:35 -0400", "from mail-pg0-f65.google.com ([74.125.83.65]:37171 \"EHLO\n\tmail-pg0-f65.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751863AbdIESqb (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Tue, 5 Sep 2017 14:46:31 -0400", "by mail-pg0-f65.google.com with SMTP id 63so484045pgc.4;\n\tTue, 05 Sep 2017 11:46:31 -0700 (PDT)", "from ?IPv6:2620:15c:2c1:100:71d2:2db4:a10e:204e?\n\t([2620:15c:2c1:100:71d2:2db4:a10e:204e])\n\tby smtp.googlemail.com with ESMTPSA id\n\ts1sm2455718pfk.27.2017.09.05.11.46.30\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 05 Sep 2017 11:46:30 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=message-id:subject:from:to:cc:date:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=rFftfXG7bapwkcjxuMBmFEI8clZtQD854pyEwtHHg7o=;\n\tb=OFIrVIh/Cb53Zoeu+imx+7rCOVOWaWRibXK9K2Fju6Y5fyW9paltIR5AVV+Pb7QRbV\n\tM5bqmJk6N8AHDExLATukyBncX9fT7rCt3SWsDHBivzI3SC4I/HIGRfUXVrTVxh44UGvS\n\tSAzex2Ifo0d7RgG4x42e4zkKpLWNHnIw9cge8IqD5oGiW7+KnbeOG3ZWbJG0KHmUzTQK\n\tMOevCh9z3kLRcFXQlbLjcX9Ft/gB7XUZKLGTaysYkpqTkcyk9TU26o7A1uDTuK/N/hnM\n\t09nlR4bsQMPiYM3s6LburW78M2GOhR6j9d2bRy60H38v4my34bum+i5cRIDO9EoHEQJo\n\tBVxQ==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=rFftfXG7bapwkcjxuMBmFEI8clZtQD854pyEwtHHg7o=;\n\tb=CtLDzPImwIjeklxf6h2Qc/bdw6JvlnXpWLajHsNY7U5IAE1nsdRmxpmFA2uwf8sOA9\n\tnBKNLFNUebRcaYjmvfj/Dm6yMpaRgc+hps1vqo3dDDxFSDl8h2uJuZdBP8P9/0zpz3uQ\n\tl13tiDrjiKqm53VplRVSLd7J6+1Hyl+L+oyse2RPiZcOKw224G4HmidfZhT5VxVZ4kfz\n\tywFOE9EPzSrHUzpeN1QIKhkGq4My90xvXwyYYrPUKCH0C3Zk2Y0FTOHAn11xtvjpRumS\n\tR3R+5wVW59dVZkTs0HACPZwEAhwgkOHDa/JbYM6by8v57QzXfSGTOONdEA5Ut+M5KyA7\n\t73dg==", "X-Gm-Message-State": "AHPjjUi+lIaFpSIpgKVgdA5or351y3qPbnkQfyBxRbYwDZUDmaKvD9fQ\n\tCYO/2EXP7/sJ4Q==", "X-Google-Smtp-Source": "ADKCNb7LySfDHIRfMyPzUFuKs2/oir0OeXW95zGk/6UuC4aAfOdJnukiCyrc4pj8W0OAamgUSDpJqA==", "X-Received": "by 10.84.210.107 with SMTP id z98mr5328848plh.77.1504637191512; \n\tTue, 05 Sep 2017 11:46:31 -0700 (PDT)", "Message-ID": "<1504637190.15310.62.camel@edumazet-glaptop3.roam.corp.google.com>", "Subject": "[PATCH v2] radix-tree: must check __radix_tree_preload() return\n\tvalue", "From": "Eric Dumazet <eric.dumazet@gmail.com>", "To": "Matthew Wilcox <willy@infradead.org>", "Cc": "Matthew Wilcox <mawilcox@microsoft.com>,\n\t\"Kirill A. Shutemov\" <kirill.shutemov@linux.intel.com>,\n\tAndrew Morton <akpm@linux-foundation.org>,\n\tnetdev <netdev@vger.kernel.org>,\n\tLinus Torvalds <torvalds@linux-foundation.org>,\n\tlinux-kernel <linux-kernel@vger.kernel.org>", "Date": "Tue, 05 Sep 2017 11:46:30 -0700", "In-Reply-To": "<1504634367.15310.59.camel@edumazet-glaptop3.roam.corp.google.com>", "References": "<1504634367.15310.59.camel@edumazet-glaptop3.roam.corp.google.com>", "Content-Type": "text/plain; charset=\"UTF-8\"", "X-Mailer": "Evolution 3.10.4-0ubuntu2 ", "Mime-Version": "1.0", "Content-Transfer-Encoding": "7bit", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "From: Eric Dumazet <edumazet@google.com>\n\n__radix_tree_preload() only disables preemption if no error is returned.\n\nSo we really need to make sure callers always check the return value.\n\nidr_preload() contract is to always disable preemption, so we need\nto add a missing preempt_disable() if an error happened.\n\nSimilarly, ida_pre_get() only needs to call preempt_enable() in the\ncase no error happened.\n\nFixes: 0a835c4f090a (\"Reimplement IDR and IDA using the radix tree\")\nFixes: 7ad3d4d85c7a (\"ida: Move ida_bitmap to a percpu variable\")\nSigned-off-by: Eric Dumazet <edumazet@google.com>\nCc: <stable@vger.kernel.org> [4.11+]\n---\nv2: addressed Linus feedback, not adding useless/confusing 'ret' variables.\n\n lib/radix-tree.c | 9 +++++----\n 1 file changed, 5 insertions(+), 4 deletions(-)", "diff": "diff --git a/lib/radix-tree.c b/lib/radix-tree.c\nindex 3527eb364964..afb3cb4d44b6 100644\n--- a/lib/radix-tree.c\n+++ b/lib/radix-tree.c\n@@ -463,7 +463,7 @@ radix_tree_node_free(struct radix_tree_node *node)\n * To make use of this facility, the radix tree must be initialised without\n * __GFP_DIRECT_RECLAIM being passed to INIT_RADIX_TREE().\n */\n-static int __radix_tree_preload(gfp_t gfp_mask, unsigned nr)\n+static __must_check int __radix_tree_preload(gfp_t gfp_mask, unsigned nr)\n {\n \tstruct radix_tree_preload *rtp;\n \tstruct radix_tree_node *node;\n@@ -2104,7 +2104,8 @@ EXPORT_SYMBOL(radix_tree_tagged);\n */\n void idr_preload(gfp_t gfp_mask)\n {\n-\t__radix_tree_preload(gfp_mask, IDR_PRELOAD_SIZE);\n+\tif (__radix_tree_preload(gfp_mask, IDR_PRELOAD_SIZE))\n+\t\tpreempt_disable();\n }\n EXPORT_SYMBOL(idr_preload);\n \n@@ -2118,13 +2119,13 @@ EXPORT_SYMBOL(idr_preload);\n */\n int ida_pre_get(struct ida *ida, gfp_t gfp)\n {\n-\t__radix_tree_preload(gfp, IDA_PRELOAD_SIZE);\n \t/*\n \t * The IDA API has no preload_end() equivalent. Instead,\n \t * ida_get_new() can return -EAGAIN, prompting the caller\n \t * to return to the ida_pre_get() step.\n \t */\n-\tpreempt_enable();\n+\tif (!__radix_tree_preload(gfp, IDA_PRELOAD_SIZE))\n+\t\tpreempt_enable();\n \n \tif (!this_cpu_read(ida_bitmap)) {\n \t\tstruct ida_bitmap *bitmap = kmalloc(sizeof(*bitmap), gfp);\n", "prefixes": [ "v2" ] }