forked from torvalds/linux
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
skmsg: introduce sk_psock_get_checked()
Although we have sk_psock_get(), it assumes the psock retrieved from sk_user_data is for sockmap, this is not sufficient if we call it outside of sockmap, for example, reuseport_array. Fortunately sock_map_psock_get_checked() is more strict and checks for sock_map_close before using psock. So we can refactor it and rename it to sk_psock_get_checked(), which can be safely called outside of sockmap. Cc: John Fastabend <john.fastabend@gmail.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Jakub Sitnicki <jakub@cloudflare.com> Cc: Lorenz Bauer <lmb@cloudflare.com> Signed-off-by: Cong Wang <cong.wang@bytedance.com>
- Loading branch information
Cong Wang
committed
Sep 27, 2021
1 parent
2248c2f
commit 2efd723
Showing
2 changed files
with
21 additions
and
21 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