linux-stable/drivers/net/xen-netback
Juergen Gross 0d99b3c6bd xen/netback: don't queue unlimited number of packages
commit be81992f90 upstream.

In case a guest isn't consuming incoming network traffic as fast as it
is coming in, xen-netback is buffering network packages in unlimited
numbers today. This can result in host OOM situations.

Commit f48da8b14d ("xen-netback: fix unlimited guest Rx internal
queue and carrier flapping") meant to introduce a mechanism to limit
the amount of buffered data by stopping the Tx queue when reaching the
data limit, but this doesn't work for cases like UDP.

When hitting the limit don't queue further SKBs, but drop them instead.
In order to be able to tell Rx packages have been dropped increment the
rx_dropped statistics counter in this case.

It should be noted that the old solution to continue queueing SKBs had
the additional problem of an overflow of the 32-bit rx_queue_len value
would result in intermittent Tx queue enabling.

This is part of XSA-392

Fixes: f48da8b14d ("xen-netback: fix unlimited guest Rx internal queue and carrier flapping")
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-12-22 09:29:41 +01:00
..
common.h xen/netback: fix rx queue stall detection 2021-12-22 09:29:41 +01:00
hash.c
interface.c xen/netback: fix spurious event detection for common event case 2021-03-04 10:26:17 +01:00
Makefile
netback.c xen-netback: correct success/error reporting for the SKB-with-fraglist case 2021-10-09 14:39:49 +02:00
rx.c xen/netback: don't queue unlimited number of packages 2021-12-22 09:29:41 +01:00
xenbus.c xen-netback: Check for hotplug-status existence before watching 2021-04-28 13:19:15 +02:00