linux-yocto/include
Takamitsu Iwai 0085b250fc net: rose: convert 'use' field to refcount_t
[ Upstream commit d860d1faa6b2ce3becfdb8b0c2b048ad31800061 ]

The 'use' field in struct rose_neigh is used as a reference counter but
lacks atomicity. This can lead to race conditions where a rose_neigh
structure is freed while still being referenced by other code paths.

For example, when rose_neigh->use becomes zero during an ioctl operation
via rose_rt_ioctl(), the structure may be removed while its timer is
still active, potentially causing use-after-free issues.

This patch changes the type of 'use' from unsigned short to refcount_t and
updates all code paths to use rose_neigh_hold() and rose_neigh_put() which
operate reference counts atomically.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Takamitsu Iwai <takamitz@amazon.co.jp>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20250823085857.47674-3-takamitz@amazon.co.jp
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-09-04 15:31:51 +02:00
..
acpi ACPICA: Avoid sequence overread in call to strncmp() 2025-06-27 11:11:26 +01:00
asm-generic
clocksource
crypto
cxl
drm drm/tests: Do not use drm_fb_blit() in format-helper tests 2025-08-28 16:31:12 +02:00
dt-bindings
keys
kunit
kvm
linux atm: atmtcp: Prevent arbitrary write in atmtcp_recv_control(). 2025-09-04 15:31:47 +02:00
math-emu
media media: v4l: Memset argument to 0 before calling get_mbus_config pad op 2025-05-29 11:02:49 +02:00
memory
misc
net net: rose: convert 'use' field to refcount_t 2025-09-04 15:31:51 +02:00
pcmcia
ras
rdma
rv
scsi
soc
sound ASoC: tas2781: Fix the wrong step for TLV on tas2781 2025-08-15 12:14:06 +02:00
target
trace powerpc/thp: tracing: Hide hugepage events under CONFIG_PPC_BOOK3S_64 2025-08-20 18:30:28 +02:00
uapi vhost: Fix ioctl # for VHOST_[GS]ET_FORK_FROM_OWNER 2025-09-04 15:31:43 +02:00
ufs
vdso
video
xen