summaryrefslogtreecommitdiff
path: root/include/net/phy/git@git.tavy.me:linux-stable.git
diff options
context:
space:
mode:
authorJiexun Wang <wangjiexun2025@gmail.com>2026-04-07 16:00:14 +0800
committerJakub Kicinski <kuba@kernel.org>2026-04-08 19:33:52 -0700
commit39897df386376912d561d4946499379effa1e7ef (patch)
tree2a473c5d11438c9071e90d7fc0804cd900ff6626 /include/net/phy/git@git.tavy.me:linux-stable.git
parent8e2760eaab778494fc1fa257031e0e1799647f46 (diff)
af_unix: read UNIX_DIAG_VFS data under unix_state_lock
Exact UNIX diag lookups hold a reference to the socket, but not to u->path. Meanwhile, unix_release_sock() clears u->path under unix_state_lock() and drops the path reference after unlocking. Read the inode and device numbers for UNIX_DIAG_VFS while holding unix_state_lock(), then emit the netlink attribute after dropping the lock. This keeps the VFS data stable while the reply is being built. Fixes: 5f7b0569460b ("unix_diag: Unix inode info NLA") Reported-by: Yifan Wu <yifanwucs@gmail.com> Reported-by: Juefei Pu <tomapufckgml@gmail.com> Co-developed-by: Yuan Tan <yuantan098@gmail.com> Signed-off-by: Yuan Tan <yuantan098@gmail.com> Suggested-by: Xin Liu <bird@lzu.edu.cn> Tested-by: Ren Wei <enjou1224z@gmail.com> Signed-off-by: Jiexun Wang <wangjiexun2025@gmail.com> Signed-off-by: Ren Wei <n05ec@lzu.edu.cn> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/20260407080015.1744197-1-n05ec@lzu.edu.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/phy/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions