Skip to content
Commit fd42bfd1 authored by Paul Durrant's avatar Paul Durrant Committed by Jakub Kicinski
Browse files

xen-netback: avoid race that can lead to NULL pointer dereference



In function xenvif_disconnect_queue(), the value of queue->rx_irq is
zeroed *before* queue->task is stopped. Unfortunately that task may call
notify_remote_via_irq(queue->rx_irq) and calling that function with a
zero value results in a NULL pointer dereference in evtchn_from_irq().

This patch simply re-orders things, stopping all tasks before zero-ing the
irq values, thereby avoiding the possibility of the race.

Fixes: 2ac061ce ("xen/netback: cleanup init and deinit code")
Signed-off-by: default avatarPaul Durrant <pdurrant@amazon.com>
Acked-by: default avatarWei Liu <wei.liu@kernel.org>
Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
parent 858ce8ca
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment