linux_dsm_epyc7002/drivers/net/xen-netback
Roger Pau Monne 6b53db8c4c xen-netback: take a reference to the RX task thread
commit 107866a8eb0b664675a260f1ba0655010fac1e08 upstream.

Do this in order to prevent the task from being freed if the thread
returns (which can be triggered by the frontend) before the call to
kthread_stop done as part of the backend tear down. Not taking the
reference will lead to a use-after-free in that scenario. Such
reference was taken before but dropped as part of the rework done in
2ac061ce97.

Reintroduce the reference taking and add a comment this time
explaining why it's needed.

This is XSA-374 / CVE-2021-28691.

Fixes: 2ac061ce97 ('xen/netback: cleanup init and deinit code')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: stable@vger.kernel.org
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-10 13:39:29 +02:00
..
common.h xen/netback: use lateeoi irq binding 2020-10-20 10:22:03 +02:00
hash.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
interface.c xen-netback: take a reference to the RX task thread 2021-06-10 13:39:29 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
netback.c xen-netback: respect gnttab_map_refs()'s return value 2021-03-07 12:34:15 +01:00
rx.c xen/netback: avoid race in xenvif_rx_ring_slots_available() 2021-02-17 11:02:26 +01:00
xenbus.c xen-netback: Check for hotplug-status existence before watching 2021-04-28 13:40:02 +02:00