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 21:24:59 +0000 (16:24 -0500)
commit5d585e733ae21707dfa86195bf17f49d8d748e2f
tree7b38e0b7cf53ab4f0607e8b4da6f6e702a4ca3af
parent70a7beb334c85f8fcebbf58d2dcc0a80f56443a4
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