linux-brain/drivers/mailbox
Gustavo A. R. Silva 0fdb739af2 mailbox: xgene-slimpro: Fix potential NULL pointer dereference
commit 3512a18cbd upstream.

There is a potential execution path in which function
platform_get_resource() returns NULL. If this happens,
we will end up having a NULL pointer dereference.

Fix this by replacing devm_ioremap with devm_ioremap_resource,
which has the NULL check and the memory region request.

This code was detected with the help of Coccinelle.

Cc: stable@vger.kernel.org
Fixes: f700e84f41 ("mailbox: Add support for APM X-Gene platform mailbox driver")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-09 20:01:19 +02:00
..
arm_mhu.c Merge branch 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration 2015-09-05 18:11:04 -07:00
bcm-pdc-mailbox.c fix📫bcm-pdc-mailbox:mark symbols static where possible 2016-08-29 18:43:39 +05:30
bcm2835-mailbox.c mailbox: Drop owner assignment from platform_driver 2015-08-05 17:20:53 +05:30
hi6220-mailbox.c mailbox: Hi6220: add mailbox driver 2016-03-04 12:32:20 +05:30
Kconfig mailbox: Add Platform Message-Handling-Unit variant driver 2016-09-07 13:07:17 +05:30
mailbox-altera.c mailbox: Make mbox_chan_ops const 2015-05-12 09:18:16 +05:30
mailbox-sti.c mailbox: Fix devm_ioremap_resource error detection code 2016-05-08 22:44:46 +05:30
mailbox-test.c mailbox: mailbox-test: set tdev->signal to NULL after freeing 2016-06-12 15:13:04 +05:30
mailbox-xgene-slimpro.c mailbox: xgene-slimpro: Fix potential NULL pointer dereference 2018-09-09 20:01:19 +02:00
mailbox.c mailbox: handle empty message in tx_tick 2017-08-06 18:59:42 -07:00
mailbox.h Mailbox: Add support for Platform Communication Channel 2014-11-27 12:51:09 +05:30
Makefile mailbox: Add Platform Message-Handling-Unit variant driver 2016-09-07 13:07:17 +05:30
omap-mailbox.c mailbox/omap: kill omap_mbox_{save/restore}_ctx() functions 2016-04-26 10:19:38 +05:30
pcc.c mailbox: PCC: Fix lockdep warning when request PCC channel 2016-11-14 22:07:38 +01:00
pl320-ipc.c mailbox: pl320: remove __raw IO 2016-06-24 13:32:31 +05:30
platform_mhu.c mailbox: Add Platform Message-Handling-Unit variant driver 2016-09-07 13:07:17 +05:30
rockchip-mailbox.c mailbox: rockchip: avoid 64-bit division 2016-03-16 09:18:15 +05:30
ti-msgmgr.c mailbox: Introduce TI message manager driver 2016-03-21 20:33:15 +05:30