]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: OCTEON: irq: Fix potential NULL pointer dereference
authorGustavo A. R. Silva <gustavo@embeddedor.com>
Tue, 22 Jan 2019 20:18:42 +0000 (14:18 -0600)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Wed, 4 Mar 2020 20:46:11 +0000 (21:46 +0100)
commit4742061c29792f396a6d70d4161588c8cd30a186
treea8706dac3da5bbdef7445bd5c0e1866cfb7b0c6d
parent3ed97320ffcfb10c2bef8ea4c7e5353bdffe1968
MIPS: OCTEON: irq: Fix potential NULL pointer dereference

There is a potential NULL pointer dereference in case kzalloc()
fails and returns NULL.

Fix this by adding a NULL check on *cd*

This bug was detected with the help of Coccinelle.

Fixes: c736ca46ffa0 ("MIPS: OCTEON: irq: add CIB and other fixes")
Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/cavium-octeon/octeon-irq.c