IPC: Handle unknown mbox messages correctly
authorJuan Gutierrez <jgutierrez@ti.com>
Thu, 3 May 2012 21:31:30 +0000 (16:31 -0500)
committerSuman Anna <s-anna@ti.com>
Sat, 19 May 2012 23:33:44 +0000 (18:33 -0500)
commit0e94266958bf7990f09616f789e22547619b38f6
tree99b19e38ebee7322e8bb6217086f22b914d2c012
parent64f0c45bc7e711784fa803680d27cc04d825fa2d
IPC: Handle unknown mbox messages correctly

The VirtQueue ISR function interprets a certain set of mailbox
messages, and all others as a notification of unprocessed
message(s) on a VirtQueue indicated by the value of the
mailbox message.

A check is added to verify that such index received is within the
valid virtqueue index range. This check prevents any out-of-bound
array accesses and related potential crashes/hangs.

Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
src/ti/ipc/rpmsg/VirtQueue.c