lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 21 Nov 2022 18:01:22 +0800
From:   Li zeming <zeming@...china.com>
To:     andrew@...n.ch, gregory.clement@...tlin.com,
        sebastian.hesselbarth@...il.com
Cc:     linux@...linux.org.uk, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, Li zeming <zeming@...china.com>
Subject: [PATCH] mach-mvebu: coherency: Judgment after pointer p increases allocation

Add judgment statements at the position after pointer p allocates memory
to avoid the abnormal impact of low probability allocation failure.

Signed-off-by: Li zeming <zeming@...china.com>
---
 arch/arm/mach-mvebu/coherency.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c
index a6b621ff0b87..2bc69dd059d6 100644
--- a/arch/arm/mach-mvebu/coherency.c
+++ b/arch/arm/mach-mvebu/coherency.c
@@ -191,8 +191,10 @@ static void __init armada_375_380_coherency_init(struct device_node *np)
 		struct property *p;
 
 		p = kzalloc(sizeof(*p), GFP_KERNEL);
-		p->name = kstrdup("arm,io-coherent", GFP_KERNEL);
-		of_add_property(cache_dn, p);
+		if (p) {
+			p->name = kstrdup("arm,io-coherent", GFP_KERNEL);
+			of_add_property(cache_dn, p);
+		}
 	}
 }
 
-- 
2.18.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ