]> git.hungrycats.org Git - linux/commit
xen/events: avoid NULL pointer dereference in dom0 on large machines
authorJuergen Gross <jgross@suse.com>
Thu, 26 Feb 2015 05:52:05 +0000 (06:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Mar 2015 12:59:46 +0000 (13:59 +0100)
commit952b4fea79c26dcec36676d83c8b908c7b150e68
treecbb3283b31f10aac14b26ec895333a9e4436bd34
parent7943518004891dbe06eeb6521f2cfb41c64911b4
xen/events: avoid NULL pointer dereference in dom0 on large machines

commit 85e40b0539b24518c8bdf63e2605c8522377d00f upstream.

Using the pvops kernel a NULL pointer dereference was detected on a
large machine (144 processors) when booting as dom0 in
evtchn_fifo_unmask() during assignment of a pirq.

The event channel in question was the first to need a new entry in
event_array[] in events_fifo.c. Unfortunately xen_irq_info_pirq_setup()
is called with evtchn being 0 for a new pirq and the real event channel
number is assigned to the pirq only during __startup_pirq().

It is mandatory to call xen_evtchn_port_setup() after assigning the
event channel number to the pirq to make sure all memory needed for the
event channel is allocated.

Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/xen/events/events_base.c