Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2119225/?format=api
{ "id": 2119225, "url": "http://patchwork.ozlabs.org/api/patches/2119225/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20250805-octeontx2-v1-2-8b804a3760fb@linaro.org/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20250805-octeontx2-v1-2-8b804a3760fb@linaro.org>", "list_archive_url": null, "date": "2025-08-05T14:53:35", "name": "[2/2] net: octeontx2: NULL check before dereference", "commit_ref": "425f9839f3c2922a36efaefa53833f0abe681be0", "pull_url": null, "state": "accepted", "archived": false, "hash": "b2bf7724fae6d8561a1eb8e410a6986b4947078d", "submitter": { "id": 88793, "url": "http://patchwork.ozlabs.org/api/people/88793/?format=api", "name": "Andrew Goodbody", "email": "andrew.goodbody@linaro.org" }, "delegate": { "id": 157425, "url": "http://patchwork.ozlabs.org/api/users/157425/?format=api", "username": "jforissier", "first_name": "Jerome", "last_name": "Forissier", "email": "jerome.forissier@linaro.org" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20250805-octeontx2-v1-2-8b804a3760fb@linaro.org/mbox/", "series": [ { "id": 467965, "url": "http://patchwork.ozlabs.org/api/series/467965/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=467965", "date": "2025-08-05T14:53:33", "name": "net: octeontx2: Fix two Smatch reports", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/467965/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2119225/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2119225/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=Rl2q+qCO;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=linaro.org", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.b=\"Rl2q+qCO\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=linaro.org", "phobos.denx.de;\n spf=pass smtp.mailfrom=andrew.goodbody@linaro.org" ], "Received": [ "from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature ECDSA (secp384r1))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4bxGds47scz1xv2\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 6 Aug 2025 00:53:53 +1000 (AEST)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 70F3D8388B;\n\tTue, 5 Aug 2025 16:53:44 +0200 (CEST)", "by phobos.denx.de (Postfix, from userid 109)\n id C146A83885; Tue, 5 Aug 2025 16:53:43 +0200 (CEST)", "from mail-wm1-x329.google.com (mail-wm1-x329.google.com\n [IPv6:2a00:1450:4864:20::329])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 692728388B\n for <u-boot@lists.denx.de>; Tue, 5 Aug 2025 16:53:38 +0200 (CEST)", "by mail-wm1-x329.google.com with SMTP id\n 5b1f17b1804b1-459e0a249d6so7113155e9.2\n for <u-boot@lists.denx.de>; Tue, 05 Aug 2025 07:53:38 -0700 (PDT)", "from artemis2.elfringham.co.uk\n ([2a0a:ef40:f9e:3c01:60bc:24e3:6dcd:9f35])\n by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-459de0d4cf1sm66075875e9.13.2025.08.05.07.53.37\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 05 Aug 2025 07:53:37 -0700 (PDT)" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1754405618; x=1755010418; darn=lists.denx.de;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:from:to:cc:subject:date:message-id\n :reply-to; bh=5mYztxh811xNl/67QJZPtCTOYjz35oBVCkJ6IQr++E0=;\n b=Rl2q+qCO8wZWkH+QJcIb0/3Z/LvuI8BjYx7OSPqQIWNJvx0kjT2LvlAnPQZ4RD+SDz\n V3uMGn065BrEV7WNs/Xv/8fX5UOY/Fstx9uYL9izdDdWTRyv9/7kgmk+Q/nGPhoscUB+\n zxtgHfSaHhLVcDMulqlyqlERXiv98/089Ec/LzatC1GM8om84ehSLIlgvKU6xTlPGUM7\n 7ww9LcQyUjcM0/qcnr0qFRRLUIVkdBfTE5G6a8maQQFJYCdUuBV9x038vMjXID183MnR\n JKTem4QbiQ8U4cFwGfKzQ75YvS7z0YjhIYsaxMyubHwHAkhbmcQDQnt7zlpRPh7fPOMM\n dUpw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1754405618; x=1755010418;\n h=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n :mime-version:subject:date:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=5mYztxh811xNl/67QJZPtCTOYjz35oBVCkJ6IQr++E0=;\n b=VdLuY8c3+5deU3Pzyv9iX++TVMbvc3kP0PgO+LepGvkF4FUaYq404Y29hddOacneV2\n wm3o/5qOU/iNB6JkEanL+Asb2+iQ81pwGeZSd58QMtkoHpepbumzQsgy/pkpiwnvgpjm\n +MCvzDhSNSHT3B5LXYs69chLoOcWYFnFr/8kV59KwTTGHpZsOqvA45tMPIU0xvWuNjxC\n eyIm6GfkTWH31kpkYA6pDY9l3ikwCk4MSProk+jJQQGQ45K39AZRL3fa+J827BnoaMB8\n 6kKG2oX35qSY1DfJvH67rb4HsLfSrn+Jrc8TyrvyFykN8Qjht2rbKVVodVmWC+WOXxAz\n LzHg==", "X-Gm-Message-State": "AOJu0YybiZrxS3wLCgXeikadXn01T6qBMAgHTDIbl9dW3Pnecl0WwpVV\n 35x5ehzY9qjxZxewvz4pcUxSygxt51NOTG0fXkGM5oUlZ1DQ/gk2A5o9y7/avR1+cG8=", "X-Gm-Gg": "ASbGncvvUKdolhHQtcW3g9LHpDM92y1L+pP19oylH+uHs4TLYgwxzBZ8rDb1KxloBaF\n xREHQfRzlQL2KW2wZ+4vsrjb02205SWth05SZpA6HOR+HP2eQdbdZQj+QoPsGfRN6+eBIpPOEKc\n J5acpbEQEueHVk563JMcDo4J5mJ29Ktyma9r0JIej4zLz4xDYj7IbMWYaVjYgd9i2jDGxUK7AVI\n aLll20tm8Zu0xNrgdquPiUg9lvflmRwnDXMk/wWmPeTlYoDB+FtRH2SwvVZto9twMsmDdYDuwuM\n ofST+LxUduorkFx5WTg9+Tmcq9edJXBGl6km/2Wr4mNmrrEp1x/LmUcq0k9ftom+ZnM6Qh0mvHj\n +xXHUITIXobKG8Ul5n2j/6PURFJIb/zS49FQfsKR2iXbaRyOa8qo=", "X-Google-Smtp-Source": "\n AGHT+IGg7XH15f7VFPwku8vbQxqrpaT4bQh8ybgIsCOESg/1EsR23bYgkuT5OVAekIsLuKLiD0IBIg==", "X-Received": "by 2002:a05:600c:1f0e:b0:459:d645:bff7 with SMTP id\n 5b1f17b1804b1-459d645c4b5mr87687395e9.12.1754405617834;\n Tue, 05 Aug 2025 07:53:37 -0700 (PDT)", "From": "Andrew Goodbody <andrew.goodbody@linaro.org>", "Date": "Tue, 05 Aug 2025 15:53:35 +0100", "Subject": "[PATCH 2/2] net: octeontx2: NULL check before dereference", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "Message-Id": "<20250805-octeontx2-v1-2-8b804a3760fb@linaro.org>", "References": "<20250805-octeontx2-v1-0-8b804a3760fb@linaro.org>", "In-Reply-To": "<20250805-octeontx2-v1-0-8b804a3760fb@linaro.org>", "To": "Joe Hershberger <joe.hershberger@ni.com>,\n Ramon Fried <rfried.dev@gmail.com>, Tom Rini <trini@konsulko.com>", "Cc": "u-boot@lists.denx.de, Andrew Goodbody <andrew.goodbody@linaro.org>", "X-Mailer": "b4 0.12.0", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.39", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>", "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de", "X-Virus-Status": "Clean" }, "content": "In rvu_af_init if the code fails to allocate memory for nix_af it will\ntake the error path with nix_af == NULL which will dereference nix_af.\nAdd the appropriate NULL check.\n\nThis issue was found by Smatch.\n\nSigned-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>\n---\n drivers/net/octeontx2/rvu_af.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)", "diff": "diff --git a/drivers/net/octeontx2/rvu_af.c b/drivers/net/octeontx2/rvu_af.c\nindex 0d3a9ffe9ee..7bdfbc52e3b 100644\n--- a/drivers/net/octeontx2/rvu_af.c\n+++ b/drivers/net/octeontx2/rvu_af.c\n@@ -114,7 +114,7 @@ struct nix_af *rvu_af_init(struct rvu_af *rvu_af)\n \treturn nix_af;\n \n error:\n-\tif (nix_af->npa_af) {\n+\tif (nix_af && nix_af->npa_af) {\n \t\tfree(nix_af->npa_af);\n \t\tmemset(nix_af, 0, sizeof(*nix_af));\n \t}\n", "prefixes": [ "2/2" ] }