linux-yocto/include
Takamitsu Iwai f8c29fc437 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:30:25 +02:00
..
acpi ACPICA: Avoid sequence overread in call to strncmp() 2025-06-27 11:08:52 +01:00
asm-generic mm: hugetlb: Add huge page size param to huge_ptep_get_and_clear() 2025-03-13 12:58:38 +01:00
clocksource
crypto crypto: ahash - Set default reqsize from ahash_alg 2025-06-04 14:42:06 +02:00
drm drm/framebuffer: Acquire internal references on GEM handles 2025-07-17 18:35:14 +02:00
dt-bindings
keys
kunit
kvm
linux net/mlx5: Add device cap for supporting hot reset in sync reset flow 2025-09-04 15:30:23 +02:00
math-emu
media media: v4l: Memset argument to 0 before calling get_mbus_config pad op 2025-06-04 14:42:09 +02:00
memory
misc
net net: rose: convert 'use' field to refcount_t 2025-09-04 15:30:25 +02:00
pcmcia
ras
rdma RDMA/uverbs: Propagate errors from rdma_lookup_get_uobject() 2025-06-04 14:41:59 +02:00
rv rv: Reset per-task monitors also for idle tasks 2025-02-17 09:40:32 +01:00
scsi
soc net: mscc: ocelot: treat 802.1ad tagged traffic as 802.1Q-untagged 2025-05-09 09:43:58 +02:00
sound ALSA: pcm: Fix race of buffer access at PCM OSS layer 2025-06-04 14:42:19 +02:00
target
trace btrfs: constify more pointer parameters 2025-08-28 16:28:41 +02:00
uapi bonding: Add independent control state machine 2025-08-28 16:28:49 +02:00
ufs scsi: ufs: core: Add OPP support for scaling clocks and regulators 2025-07-10 16:03:14 +02:00
vdso
video
xen xen/mcelog: Add __nonstring annotations for unterminated strings 2025-04-25 10:45:11 +02:00