xen/events: prevent calling evtchn_get on invalid channels
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>
Mon, 28 Nov 2011 16:49:09 +0000 (11:49 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 16 Dec 2011 16:25:54 +0000 (11:25 -0500)
commitc3b3f16d1bceb5ac5f21528f889810b4ac5a3596
tree1447aa5bd9e3ff8e682dde597485cbfc857e054f
parent9438ce9dbbf512fd717051284f568d5cb35e5cf1
xen/events: prevent calling evtchn_get on invalid channels

The event channel number provided to evtchn_get can be provided by
userspace, so needs to be checked against the maximum number of event
channels prior to using it to index into evtchn_to_irq.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
drivers/xen/events.c