Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/807541/?format=api
{ "id": 807541, "url": "http://patchwork.ozlabs.org/api/patches/807541/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/1504086545-7777-7-git-send-email-nikolay@cumulusnetworks.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": "<1504086545-7777-7-git-send-email-nikolay@cumulusnetworks.com>", "list_archive_url": null, "date": "2017-08-30T09:49:02", "name": "[net,6/9] sch_fq_codel: avoid double free on init failure", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "8771fd0c5d0468ad074dfd68358512a57ba1e163", "submitter": { "id": 66448, "url": "http://patchwork.ozlabs.org/api/people/66448/?format=api", "name": "Nikolay Aleksandrov", "email": "nikolay@cumulusnetworks.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/1504086545-7777-7-git-send-email-nikolay@cumulusnetworks.com/mbox/", "series": [ { "id": 565, "url": "http://patchwork.ozlabs.org/api/series/565/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=565", "date": "2017-08-30T09:48:56", "name": "net/sched: init failure fixes", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/565/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/807541/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/807541/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 (1024-bit key;\n\tunprotected) header.d=cumulusnetworks.com\n\theader.i=@cumulusnetworks.com header.b=\"T3nbMwA2\"; \n\tdkim-atps=neutral" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xj11r4Zc5z9sNn\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 30 Aug 2017 19:49:36 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751942AbdH3Jtd (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 30 Aug 2017 05:49:33 -0400", "from mail-wr0-f171.google.com ([209.85.128.171]:37499 \"EHLO\n\tmail-wr0-f171.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751316AbdH3Jt3 (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 30 Aug 2017 05:49:29 -0400", "by mail-wr0-f171.google.com with SMTP id k9so4663539wre.4\n\tfor <netdev@vger.kernel.org>; Wed, 30 Aug 2017 02:49:28 -0700 (PDT)", "from debil.mediahub-bg.com (46-10-142-144.ip.btc-net.bg.\n\t[46.10.142.144]) by smtp.gmail.com with ESMTPSA id\n\to206sm1113294wmo.10.2017.08.30.02.49.26\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tWed, 30 Aug 2017 02:49:26 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=cumulusnetworks.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=2FRLpb2I2CEizxr4roHcSVLHhbu1f/VSygIDGxZynqM=;\n\tb=T3nbMwA27C47GRP+Zfc+8p4J9QwBbJM5Y2xuFEipAv9kRoDOQYNCFXAigY8DUTDiu5\n\twtuEimUE1lo5TgMqHxa/VptLJxU2+01GIIYbfF/tZX26uSbU8hKCl4rym0iU71tOPhbN\n\tPipiRkfRxJeUM/C7oqWDaMMNx+yPsG50mRibs=", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=2FRLpb2I2CEizxr4roHcSVLHhbu1f/VSygIDGxZynqM=;\n\tb=J4OSHSjEuOTe++/zheTBjgWNR1SViGNWGRK78IFQgZRT2LtL9mMbD++iSUwc8zJpiL\n\tXZZYsqlR/vF1KRSv4dItNUijizhhnuylWDzSCiS/+pPYmkhe1QipDYj1miGCiayE7KSF\n\t24lTNGlMPeiEtGRPViq6KOw6TPbrS/l8JqNqofB4bmd+7lBDDYvkVrkY0xb4T6w1Wc+T\n\tsi5EaFcAq1CGWrNjL1B0nWPBtHtyvt/V9GeNcarxGV1NGxOgHwiMQzuQTdtsh215jbXy\n\tQarY8S4wnvuhh/ToJZVEQO7X64PG0IOfHsH3VnTvkikQzuznDJQk4f5AqDSQCcc0atNr\n\tpzQw==", "X-Gm-Message-State": "AHYfb5huS9Hw/jeodGwgOWAKcmdfKtbB9CP445cZoZkNIXThdVvluHkh\n\taejs1cqqMEvF4V5390A=", "X-Received": "by 10.223.164.90 with SMTP id e26mr658238wra.62.1504086567779;\n\tWed, 30 Aug 2017 02:49:27 -0700 (PDT)", "From": "Nikolay Aleksandrov <nikolay@cumulusnetworks.com>", "To": "netdev@vger.kernel.org", "Cc": "edumazet@google.com, jhs@mojatatu.com, xiyou.wangcong@gmail.com,\n\tjiri@resnulli.us, roopa@cumulusnetworks.com,\n\tNikolay Aleksandrov <nikolay@cumulusnetworks.com>", "Subject": "[PATCH net 6/9] sch_fq_codel: avoid double free on init failure", "Date": "Wed, 30 Aug 2017 12:49:02 +0300", "Message-Id": "<1504086545-7777-7-git-send-email-nikolay@cumulusnetworks.com>", "X-Mailer": "git-send-email 2.1.4", "In-Reply-To": "<1504086545-7777-1-git-send-email-nikolay@cumulusnetworks.com>", "References": "<1504086545-7777-1-git-send-email-nikolay@cumulusnetworks.com>", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "It is very unlikely to happen but the backlogs memory allocation\ncould fail and will free q->flows, but then ->destroy() will free\nq->flows too. For correctness remove the first free and let ->destroy\nclean up.\n\nFixes: 87b60cfacf9f (\"net_sched: fix error recovery at qdisc creation\")\nSigned-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>\n---\n net/sched/sch_fq_codel.c | 4 +---\n 1 file changed, 1 insertion(+), 3 deletions(-)", "diff": "diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c\nindex 337f2d6d81e4..2c0c05f2cc34 100644\n--- a/net/sched/sch_fq_codel.c\n+++ b/net/sched/sch_fq_codel.c\n@@ -491,10 +491,8 @@ static int fq_codel_init(struct Qdisc *sch, struct nlattr *opt)\n \t\tif (!q->flows)\n \t\t\treturn -ENOMEM;\n \t\tq->backlogs = kvzalloc(q->flows_cnt * sizeof(u32), GFP_KERNEL);\n-\t\tif (!q->backlogs) {\n-\t\t\tkvfree(q->flows);\n+\t\tif (!q->backlogs)\n \t\t\treturn -ENOMEM;\n-\t\t}\n \t\tfor (i = 0; i < q->flows_cnt; i++) {\n \t\t\tstruct fq_codel_flow *flow = q->flows + i;\n \n", "prefixes": [ "net", "6/9" ] }