[PATCH v4] Drivers: hv: vmbus: fix the race when querying & updating the percpu list

2016-06-01 Thread Dexuan Cui
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

[PATCH v4] Drivers: hv: vmbus: fix the race when querying & updating the percpu list

2016-06-01 Thread Dexuan Cui
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