]> git.baikalelectronics.ru Git - kernel.git/commit
mailbox: ti-msgmgr: Off by one in ti_msgmgr_of_xlate()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 3 Dec 2018 14:50:11 +0000 (17:50 +0300)
committerJassi Brar <jaswinder.singh@linaro.org>
Wed, 12 Dec 2018 02:32:45 +0000 (08:02 +0530)
commit50cf885ad3bea0fe4598b85e0f85fcdd36ef5e50
tree71056372c0fe21c69a9e79ef445fbdd5a1f1279e
parent960300c514ce2a81300a9f7c48512e1b70a2fd9c
mailbox: ti-msgmgr: Off by one in ti_msgmgr_of_xlate()

The > comparison should be >= or we access one element beyond the end
of the array.

(The inst->qinsts[] array is allocated in the ti_msgmgr_probe() function
and it has ->num_valid_queues elements.)

Fixes: fcdad9a3b360 ("mailbox: ti-msgmgr: Add support for Secure Proxy")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
drivers/mailbox/ti-msgmgr.c