linux/drivers/net/ovpn
Ralf Lici 0c0dddc07d ovpn: disable BHs when updating device stats
ovpn updates dev->dstats from both process and softirq contexts. In
particular, TCP paths may run from socket callbacks, workqueues or
strparser work, while UDP receive and ovpn's ndo_start_xmit path may
update the same per-device dstats from BH context.

Add ovpn device drop-stat helpers that disable BHs around
dev_dstats_rx_dropped() and dev_dstats_tx_dropped(), and use them for
drop accounting.

The successful RX dev_dstats_rx_add() update is already covered by the
BH-disabled section around gro_cells_receive(). For the successful TCP
TX dev_dstats_tx_add() update, replace the existing preempt-disabled
section with a BH-disabled one.

Fixes: 11851cbd60 ("ovpn: implement TCP transport")
Signed-off-by: Ralf Lici <ralf@mandelbit.com>
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
2026-05-15 00:43:55 +02:00
..
bind.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
bind.h ovpn: introduce the ovpn_peer object 2025-04-17 12:30:02 +02:00
crypto_aead.c ovpn: consolidate crypto allocations in one chunk 2026-03-17 11:09:20 +01:00
crypto_aead.h ovpn: implement key add/get/del/swap via netlink 2025-04-17 12:30:03 +02:00
crypto.c ovpn: kill key and notify userspace in case of IV exhaustion 2025-04-17 12:30:03 +02:00
crypto.h ovpn: kill key and notify userspace in case of IV exhaustion 2025-04-17 12:30:03 +02:00
io.c ovpn: disable BHs when updating device stats 2026-05-15 00:43:55 +02:00
io.h ovpn: implement keepalive mechanism 2025-04-17 12:30:03 +02:00
main.c ovpn: fix race between deleting interface and adding new peer 2026-05-14 16:24:45 +02:00
main.h
Makefile ovpn: implement TCP transport 2025-04-17 12:30:03 +02:00
netlink-gen.c ovpn: add support for asymmetric peer IDs 2026-03-17 11:09:05 +01:00
netlink-gen.h ovpn: add support for asymmetric peer IDs 2026-03-17 11:09:05 +01:00
netlink.c ovpn: respect peer refcount in CMD_NEW_PEER error path 2026-05-14 16:24:45 +02:00
netlink.h ovpn: notify userspace on client float event 2026-03-17 11:08:55 +01:00
ovpnpriv.h ovpn: implement keepalive mechanism 2025-04-17 12:30:03 +02:00
peer.c ovpn: fix race between deleting interface and adding new peer 2026-05-14 16:24:45 +02:00
peer.h ovpn: respect peer refcount in CMD_NEW_PEER error path 2026-05-14 16:24:45 +02:00
pktid.c ovpn: pktid: use bitops.h API 2026-03-17 11:08:54 +01:00
pktid.h ovpn: pktid: use bitops.h API 2026-03-17 11:08:54 +01:00
proto.h ovpn: implement packet processing 2025-04-17 12:30:02 +02:00
skb.h ovpn: consolidate crypto allocations in one chunk 2026-03-17 11:09:20 +01:00
socket.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
socket.h ovpn: ensure sk is still valid during cleanup 2025-06-03 13:08:15 +02:00
stats.c ovpn: store tunnel and transport statistics 2025-04-17 12:30:02 +02:00
stats.h ovpn: disable BHs when updating device stats 2026-05-15 00:43:55 +02:00
tcp.c ovpn: disable BHs when updating device stats 2026-05-15 00:43:55 +02:00
tcp.h ovpn: ensure sk is still valid during cleanup 2025-06-03 13:08:15 +02:00
udp.c ovpn: disable BHs when updating device stats 2026-05-15 00:43:55 +02:00
udp.h ovpn: ensure sk is still valid during cleanup 2025-06-03 13:08:15 +02:00