aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorTakamitsu Iwai <takamitz@amazon.co.jp>2025-08-23 17:58:56 +0900
committerJakub Kicinski <kuba@kernel.org>2025-08-27 07:43:08 -0700
commitd860d1faa6b2ce3becfdb8b0c2b048ad31800061 (patch)
treea27770249cfd5066696f5bc917acf37170a632d1 /tools/perf/scripts/python
parentnet: rose: split remove and free operations in rose_remove_neigh() (diff)
downloadwireguard-linux-d860d1faa6b2ce3becfdb8b0c2b048ad31800061.tar.xz
wireguard-linux-d860d1faa6b2ce3becfdb8b0c2b048ad31800061.zip
net: rose: convert 'use' field to refcount_t
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: 1da177e4c3f4 ("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>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions