linux/drivers/mailbox
Alexey Klimov e9c8dc8ba9 mailbox: pcc: fix channel calculation in get_pcc_channel()
This patch fixes the calculation of pcc_chan for non-zero id.
After the compiler ignores the (unsigned long) cast the
pcc_mbox_channels pointer is type-cast and then the type-cast
offset is added which results in address outside of the range
leading to the kernel crashing.

We might add braces and make it:

pcc_chan = (struct mbox_chan *)
		((unsigned long) pcc_mbox_channels +
		(id * sizeof(*pcc_chan)));

but let's go with array approach here and use id as index.

Tested on Juno board.

Signed-off-by: Alexey Klimov <alexey.klimov@arm.com>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Ashwin Chaugule <ashwin.chaugule@linaro.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
2016-02-02 16:39:13 +05:30
..
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
bcm2835-mailbox.c mailbox: Drop owner assignment from platform_driver 2015-08-05 17:20:53 +05:30
Kconfig mailbox: Add generic mechanism for testing Mailbox Controllers 2015-10-17 10:36:56 +05:30
mailbox-altera.c
mailbox-sti.c mailbox: constify mbox_chan_ops structure 2015-11-30 21:12:05 +05:30
mailbox-test.c mailbox: mailbox-test: avoid reading iomem twice 2015-11-04 14:03:04 +05:30
mailbox.c mailbox: switch to hrtimer for tx_complete polling 2015-08-10 14:29:27 +05:30
mailbox.h
Makefile mailbox: Add generic mechanism for testing Mailbox Controllers 2015-10-17 10:36:56 +05:30
omap-mailbox.c mailbox/omap: Add ti,mbox-send-noirq quirk to fix AM33xx CPU Idle 2015-10-23 11:19:27 +05:30
pcc.c mailbox: pcc: fix channel calculation in get_pcc_channel() 2016-02-02 16:39:13 +05:30
pl320-ipc.c