-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mptcp: initialize sock lock with its own lockdep keys
In mptcp_pm_nl_create_listen_socket(), we already initialize mptcp sock lock with mptcp_slock_keys and mptcp_keys. But that is not sufficient, at least mptcp_init_sock() and mptcp_sk_clone_init() still miss it. As reported by syzbot, mptcp_sk_clone_init() is challenging due to that sk_clone_lock() immediately locks the new sock after preliminary initialization. To amend that, introduce ->init_clone() for struct proto and call it right after the sock_lock_init(), so now mptcp sock could initialize the sock lock again with its own lockdep keys. This patch does not fix any real deadlock, it only makes lockdep happy. Fixes: 58b0991 ("mptcp: create msk early") Reported-by: syzbot+f4aacdfef2c6a6529c3e@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=f4aacdfef2c6a6529c3e Cc: Matthieu Baerts <matttbe@kernel.org> Cc: Mat Martineau <martineau@kernel.org> Cc: Geliang Tang <geliang@kernel.org> Signed-off-by: Cong Wang <cong.wang@bytedance.com> Message-Id: <20240911042425.978665-1-xiyou.wangcong@gmail.com>
- Loading branch information
Cong Wang
authored and
Patchew Applier
committed
Sep 11, 2024
1 parent
242ed77
commit cff8cdc
Showing
5 changed files
with
27 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters