[PATCH] ARM: mvebu: Add check in coherency.c to prevent null pointer dereference

Russell King (Oracle) linux at armlinux.org.uk
Sun Feb 25 03:30:19 PST 2024


On Sun, Feb 25, 2024 at 02:04:50PM +0800, Duoming Zhou wrote:
> The kzalloc() in armada_375_380_coherency_init() will return
> null if the physical memory has run out. As a result, if we
> dereference the property pointer, the null pointer dereference
> bug will happen.
> 
> This patch adds a check to avoid null pointer dereference.

Again, what if kstrdup() fails?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!



More information about the linux-arm-kernel mailing list