remarkable-linux/drivers/hv
Dexuan Cui 638fea33ae Drivers: hv: vmbus: fix the race when querying & updating the percpu list
There is a rare race when we remove an entry from the global list
hv_context.percpu_list[cpu] in hv_process_channel_removal() ->
percpu_channel_deq() -> list_del(): at this time, if vmbus_on_event() ->
process_chn_event() -> pcpu_relid2channel() is trying to query the list,
we can get the kernel fault.

Similarly, we also have the issue in the code path: vmbus_process_offer() ->
percpu_channel_enq().

We can resolve the issue by disabling the tasklet when updating the list.

The patch also moves vmbus_release_relid() to a later place where
the channel has been removed from the per-cpu and the global lists.

Reported-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-31 13:05:41 +02:00
..
channel.c Drivers: hv: vmbus: fix the race when querying & updating the percpu list 2016-08-31 13:05:41 +02:00
channel_mgmt.c Drivers: hv: vmbus: fix the race when querying & updating the percpu list 2016-08-31 13:05:41 +02:00
connection.c Drivers: hv: vmbus: Export the vmbus_set_event() API 2016-04-30 14:00:19 -07:00
hv.c Drivers: hv: avoid vfree() on crash 2016-08-31 13:05:40 +02:00
hv_balloon.c Drivers: hv: balloon: reset host_specified_ha_region 2016-05-01 09:23:14 -07:00
hv_fcopy.c Drivers: hv: utils: fix a race on userspace daemons registration 2016-08-31 13:05:41 +02:00
hv_kvp.c Drivers: hv: utils: fix a race on userspace daemons registration 2016-08-31 13:05:41 +02:00
hv_snapshot.c Drivers: hv: utils: fix a race on userspace daemons registration 2016-08-31 13:05:41 +02:00
hv_util.c Drivers: hv: util: Pass the channel information during the init call 2016-03-01 16:57:20 -08:00
hv_utils_transport.c Drivers: hv: utils: fix a race on userspace daemons registration 2016-08-31 13:05:41 +02:00
hv_utils_transport.h Drivers: hv: utils: fix a race on userspace daemons registration 2016-08-31 13:05:41 +02:00
hyperv_vmbus.h Drivers: hv: avoid vfree() on crash 2016-08-31 13:05:40 +02:00
Kconfig
Makefile Drivers: hv: util: introduce hv_utils_transport abstraction 2015-05-24 12:17:41 -07:00
ring_buffer.c Drivers: hv: vmbus: Implement APIs to support "in place" consumption of vmbus packets 2016-04-30 14:00:19 -07:00
vmbus_drv.c Drivers: hv: avoid vfree() on crash 2016-08-31 13:05:40 +02:00