Message ID | 20211115105154.26714-1-linmq006@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=KcTu=QC=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5EE63C433EF for <linux-arm-kernel@archiver.kernel.org>; Mon, 15 Nov 2021 10:53:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 21FD961AFF for <linux-arm-kernel@archiver.kernel.org>; Mon, 15 Nov 2021 10:53:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 21FD961AFF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:Subject:Cc:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=2R8Yy4nn2b6z7F57CxQJ/jVAJPdMFE7iSbHDgvb5tvM=; b=cTLtaa3oWD8lPS +dLEnKnd5cLjhNLtDY1Ho1xCqTf5E7JG4SkRyDqcJJC9DiYnHy0bx2KDdraEIDsqVHueNHDbZDsMk bjV4mpY8uGqIfSa2YE1LS3z4bSjSDZ0XJAzVoOCPRZ2kneuFCiBqne4JUskRXfBdiY6eWJp2BOSuC e+C3fty1gKjTcbnQtcVOeTMROS6hkwSuFYLn4IAt6BcauP9QvQ1Atvu7nIC7mm1ECZugT97vPHTbi gtcKI3/duIv0qILvogNz+vvK80hEuQKt3DOEgggxoxgSeGIF7r5deBZzWKuy3v8xUg/WTSB30GO/s 7Ac6zZ0ofW026IgvRdPQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmZan-00FGy4-La; Mon, 15 Nov 2021 10:52:05 +0000 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mmZak-00FGwn-4O for linux-arm-kernel@lists.infradead.org; Mon, 15 Nov 2021 10:52:03 +0000 Received: by mail-pg1-x52c.google.com with SMTP id s138so6198222pgs.4 for <linux-arm-kernel@lists.infradead.org>; Mon, 15 Nov 2021 02:52:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id; bh=r4XyC+5w2S49btR2CrwNd3E7DMZ/stKYlyfPHpipecA=; b=eBYa3K/DaoHokSzRNdLBVY1Hv4D3t3eadJjF2waN5NDDgbiN0GxeehSaH9C2Gz3nMq SKcaG48xb5EhXMTT1BMWqUuITFMDMMF10Txtug/aqethVZvRyYDvzkpR2ILFWJz7LF59 EGI+a/95xeTlOeeF412DxmG9ZYJLSw9ltXWwqSOWKk+9Cf5g0Ws2jzb+ukALDtrvrtnd w9GQLUF9urbVB8bGtShXcF3yAETJWkZ1TsROqNl1DtLr+9NyeONGyMzSKRiG1/9NsJHv o/6cqgB3g6oQDHu0Kp8Daj68T0xROdRrsVqu51yZnGtgF5S5E3W0Qjy4JDcHtRKX+Usy 8RrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=r4XyC+5w2S49btR2CrwNd3E7DMZ/stKYlyfPHpipecA=; b=aL38srJcLtbTpwYHE52l7DaqkmCR//3QS+jAHYkwTJXsaZWGdMXKAhoqJ7Db4502sY aYSJU0AZFZ4EJ7gyfF3+zhXIHFevUdGu3TjgDe7+BvilujtdKtHaJFySq4WBi74fkIuQ /Rl8RI8b2EzsRjlufINxvy8LqlTD0loco2XUG+YJhP+Map3/gPMshNqRGOHbsVP3yIuX ZFQE3WaRhn00yxooLATek7VoPZ63D/0D+mOMTidxXMQeO1ASk6btAc16kUH5KxCaE1vR 3wfkEH5WQW7KS8DcRHL9P+wpqpaAfbZw64gypJfx+35WxFTCuUfp8+sPCwZj6U08Ss+b GYOA== X-Gm-Message-State: AOAM531mlbDJ5K6Z06oYjkKAmMrPg2awW51u4nOKeGrpzi3XXYKobz1N 4hggWNbtqIwOFQr6tgrc5XcODDMFvdnSiQhCNIGyCQ== X-Google-Smtp-Source: ABdhPJyrrQy1t/cx5rIl/vngM58fdZgcvX3F8Q49/Y30x7GQCj6mtfn4LkVnNKk1eS/hqQY+MhD/xw== X-Received: by 2002:a05:6a00:22d2:b0:4a0:93a:e165 with SMTP id f18-20020a056a0022d200b004a0093ae165mr32029963pfj.68.1636973519580; Mon, 15 Nov 2021 02:51:59 -0800 (PST) Received: from localhost.localdomain ([159.226.95.43]) by smtp.googlemail.com with ESMTPSA id f7sm13783094pfv.89.2021.11.15.02.51.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Nov 2021 02:51:59 -0800 (PST) From: yuuoniy <linmq006@gmail.com> To: Cc: linmq006@gmail.com, Andrew Lunn <andrew@lunn.ch>, Gregory Clement <gregory.clement@bootlin.com>, Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>, Russell King <linux@armlinux.org.uk>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM/mvebu: Fix possible null dereference in armada_375_380_coherency_init Date: Mon, 15 Nov 2021 10:51:54 +0000 Message-Id: <20211115105154.26714-1-linmq006@gmail.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211115_025202_194560_0B0536CC X-CRM114-Status: GOOD ( 11.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
ARM/mvebu: Fix possible null dereference in armada_375_380_coherency_init
|
expand
|
diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c index 49e3c8d20c2f..4fdb1fae63c5 100644 --- a/arch/arm/mach-mvebu/coherency.c +++ b/arch/arm/mach-mvebu/coherency.c @@ -194,6 +194,8 @@ static void __init armada_375_380_coherency_init(struct device_node *np) struct property *p; p = kzalloc(sizeof(*p), GFP_KERNEL); + if (!p) + return; p->name = kstrdup("arm,io-coherent", GFP_KERNEL); of_add_property(cache_dn, p); }
Prevent potential when access p->name after unsuccessful allocation. Signed-off-by: yuuoniy <linmq006@gmail.com> --- arch/arm/mach-mvebu/coherency.c | 2 ++ 1 file changed, 2 insertions(+)