kernel-hacking-2024-linux-s.../include
Vlad Buslov dbf47a2a09 net: sched: act_sample: fix psample group handling on overwrite
Action sample doesn't properly handle psample_group pointer in overwrite
case. Following issues need to be fixed:

- In tcf_sample_init() function RCU_INIT_POINTER() is used to set
  s->psample_group, even though we neither setting the pointer to NULL, nor
  preventing concurrent readers from accessing the pointer in some way.
  Use rcu_swap_protected() instead to safely reset the pointer.

- Old value of s->psample_group is not released or deallocated in any way,
  which results resource leak. Use psample_group_put() on non-NULL value
  obtained with rcu_swap_protected().

- The function psample_group_put() that released reference to struct
  psample_group pointed by rcu-pointer s->psample_group doesn't respect rcu
  grace period when deallocating it. Extend struct psample_group with rcu
  head and use kfree_rcu when freeing it.

Fixes: 5c5670fae4 ("net/sched: Introduce sample tc action")
Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-08-28 15:53:51 -07:00
..
acpi
asm-generic include/asm-generic/5level-fixup.h: fix variable 'p4d' set but not used 2019-08-13 16:06:52 -07:00
clocksource
crypto
drm
dt-bindings
keys
kvm
linux Add genphy_c45_config_aneg() function to phy-c45.c 2019-08-27 20:21:15 -07:00
math-emu
media
misc auxdisplay: charlcd: move charlcd.h to drivers/auxdisplay 2019-08-08 19:59:17 +02:00
net net: sched: act_sample: fix psample group handling on overwrite 2019-08-28 15:53:51 -07:00
pcmcia
ras
rdma RDMA/restrack: Rewrite PID namespace check to be reliable 2019-08-20 13:44:44 -04:00
scsi
soc ARC updates for 5.3-rc7 2019-08-27 10:50:27 -07:00
sound sound fixes for 5.3-rc4 2019-08-09 09:21:27 -07:00
target
trace rxrpc: Fix read-after-free in rxrpc_queue_local() 2019-08-14 11:37:51 +01:00
uapi Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-08-27 10:12:48 -07:00
vdso
video
xen
Kbuild