]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: enqueue_to_backlog() change vs not running device
authorEric Dumazet <edumazet@google.com>
Fri, 29 Mar 2024 15:42:20 +0000 (15:42 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 1 Apr 2024 10:28:31 +0000 (11:28 +0100)
commit95e48d862ada73188be6d91a33c49d1712815bd2
treeb8d6429d9e0e50d7a1bc6510e4f2fb8af7b93272
parent2fe50a4d7225cf10748775e290361896637091a9
net: enqueue_to_backlog() change vs not running device

If the device attached to the packet given to enqueue_to_backlog()
is not running, we drop the packet.

But we accidentally increase sd->dropped, giving false signals
to admins: sd->dropped should be reserved to cpu backlog pressure,
not to temporary glitches at device dismantles.

While we are at it, perform the netif_running() test before
we get the rps lock, and use REASON_DEV_READY
drop reason instead of NOT_SPECIFIED.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c