Skip to content

net: drop_monitor: fix concurrency issues, preemption warning, and buffer overrun

Eric Dumazet netdev 1 version Applied

Status from this message: This series was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 4 repliesApplied 4/4

Patches in v1 All 4 applied

#Subject and filesSizeRepliesApplied
1/4drop_monitor: synchronize tracepoint unregistration on error pathnet/core/drop_monitor.c+1 -01 replyApplied
2/4drop_monitor: use timer_shutdown_sync() to prevent timer rearming during teardownnet/core/drop_monitor.c+4 -41 replyApplied
3/4drop_monitor: use raw_cpu_ptr() in tracepoint probesnet/core/drop_monitor.c+3 -30 repliesApplied
4/4drop_monitor: fix out-of-bounds write in reset_per_cpu_data()net/core/drop_monitor.c+1 -22 repliesApplied

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchHangbin Liu
1/4R-b
2/4
3/4
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net 0/4] net: drop_monitor: fix concurrency issues, preemption warning, and buffer overrun

This series addresses several issues discovered in the drop_monitor subsystem:

Patch 1 adds missing tracepoint unregistration synchronization to the net_dm_trace_on_set() error unwind path, preventing in-flight probes from scheduling work after the module reference has been dropped.

Patch 2 resolves a race condition during monitoring teardown where per-CPU timers can be re-armed after deletion if a concurrent worker encounters a memory allocation failure, switching to timer_shutdown_sync().

Patch 3 fixes a CONFIG_DEBUG_PREEMPT warning reported by syzbot when kfree_skb() is invoked from preemptible process context, using raw_cpu_ptr() since each per-CPU queue is safely protected by its own spinlock.

Patch 4 fixes an out-of-bounds write in reset_per_cpu_data() where memset() overwrote the allocated SKB tailroom by sizeof(struct nlattr) bytes.

Eric Dumazet (4):
drop_monitor: synchronize tracepoint unregistration on error path
drop_monitor: use timer_shutdown_sync() to prevent timer rearming
during teardown
drop_monitor: use raw_cpu_ptr() in tracepoint probes
drop_monitor: fix out-of-bounds write in reset_per_cpu_data()

 net/core/drop_monitor.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
Signature · 1 line
2.55.0.1007.g17ff1f9808-goog