kernel_optimize_test/drivers/net/xen-netback
Paul Durrant fd42bfd1bb 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: 2ac061ce97 ("xen/netback: cleanup init and deinit code")
Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Acked-by: Wei Liu <wei.liu@kernel.org>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
2019-12-15 11:40:15 -08:00
..
common.h xen-netback: add reference from xenvif to backend_info to facilitate coredump analysis 2019-04-12 10:10:28 -07:00
hash.c xen-netback: don't populate the hash cache on XenBus disconnect 2019-02-28 12:50:37 -08:00
interface.c xen-netback: avoid race that can lead to NULL pointer dereference 2019-12-15 11:40:15 -08:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
netback.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-08-19 11:54:03 -07:00
rx.c
xenbus.c xen-netback: no need to check return value of debugfs_create functions 2019-08-11 21:30:06 -07:00