From nobody Mon Apr 6 19:59:50 2026 Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E188436D4F0 for ; Wed, 18 Mar 2026 07:53:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=124.126.103.232 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773820432; cv=none; b=RLSJuzdA5TZhOZijjVNPsiOHJUH6BWV8Uox8Au5FlcOHZ1cLJB/HZRMafbiqIeajXs390zKRcpcbso43tHLMbf/MnLNoiBcwCqzxK60Ekwpvt6nNz1cqMGTG6xe9g7WKvdx03xjHITPoL/tu30H9W3UOv1ilp87iiaJO1UcS29Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773820432; c=relaxed/simple; bh=SSYh1LQVWcb3a4l5UsqA2D7gd4jhMENasnYWYyseudc=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=WZJB1Qy8VC7Np0iitpn50eyf09h4j1NlhSmSzPY/d2tLmmNAkzqzUAMfXz+SJQHUdsiVtAzY6xinsHE3KiLdY8REcYLN1t5ShjBK57jyj4TSxLWYeCBsL1d1DfQd+ryjKpRkFU+uhRt8QFwQa9OdzvNwsu6Sf+tnYp9ct09W8lY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn; spf=pass smtp.mailfrom=kylinos.cn; arc=none smtp.client-ip=124.126.103.232 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kylinos.cn X-UUID: 8f4a428e229f11f1a21c59e7364eecb8-20260318 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.11,REQID:aef8549d-e582-4cad-8ce5-95983ea814d1,IP:0,U RL:0,TC:0,Content:-5,EDM:25,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:20 X-CID-META: VersionHash:89c9d04,CLOUDID:315cd026318ef31811496fbe943e4f31,BulkI D:nil,BulkQuantity:0,Recheck:0,SF:102|850|898,TC:nil,Content:0|15|50,EDM:5 ,IP:nil,URL:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV :0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 2,SSN|SDN X-CID-BAS: 2,SSN|SDN,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-CID-RHF: D41D8CD98F00B204E9800998ECF8427E X-UUID: 8f4a428e229f11f1a21c59e7364eecb8-20260318 X-User: lijun01@kylinos.cn Received: from localhost.localdomain [(10.44.16.150)] by mailgw.kylinos.cn (envelope-from ) (Generic MTA with TLSv1.3 TLS_AES_256_GCM_SHA384 256/256) with ESMTP id 281637562; Wed, 18 Mar 2026 15:53:32 +0800 From: Li Jun To: andrew@lunn.ch, gregory.clement@bootlin.com, sebastian.hesselbarth@gmail.com, linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, lijun01@kylinos.cn Subject: [PATCH] arm: mvebu: fix null pointer when access Date: Wed, 18 Mar 2026 15:53:24 +0800 Message-Id: <20260318075324.2477118-1-lijun01@kylinos.cn> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" the kzalloc may return null pointer, will cause kernel panic. Signed-off-by: Li Jun --- arch/arm/mach-mvebu/coherency.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherenc= y.c index a6b621ff0b87..beba8ed9fa15 100644 --- a/arch/arm/mach-mvebu/coherency.c +++ b/arch/arm/mach-mvebu/coherency.c @@ -191,6 +191,8 @@ static void __init armada_375_380_coherency_init(struct= device_node *np) struct property *p; =20 p =3D kzalloc(sizeof(*p), GFP_KERNEL); + if (!p) + return; p->name =3D kstrdup("arm,io-coherent", GFP_KERNEL); of_add_property(cache_dn, p); } --=20 2.25.1