* [Patch bpf-next] skmsg: make sk_psock_destroy() static
@ 2021-01-27 22:15 Cong Wang
2021-01-27 23:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Cong Wang @ 2021-01-27 22:15 UTC (permalink / raw)
To: netdev
Cc: bpf, Cong Wang, John Fastabend, Daniel Borkmann, Jakub Sitnicki,
Lorenz Bauer
From: Cong Wang <cong.wang@bytedance.com>
sk_psock_destroy() is a RCU callback, I can't see any reason why
it could be used outside.
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>
---
include/linux/skmsg.h | 1 -
net/core/skmsg.c | 3 +--
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/include/linux/skmsg.h b/include/linux/skmsg.h
index fec0c5ac1c4f..8edbbf5f2f93 100644
--- a/include/linux/skmsg.h
+++ b/include/linux/skmsg.h
@@ -390,7 +390,6 @@ static inline struct sk_psock *sk_psock_get(struct sock *sk)
}
void sk_psock_stop(struct sock *sk, struct sk_psock *psock);
-void sk_psock_destroy(struct rcu_head *rcu);
void sk_psock_drop(struct sock *sk, struct sk_psock *psock);
static inline void sk_psock_put(struct sock *sk, struct sk_psock *psock)
diff --git a/net/core/skmsg.c b/net/core/skmsg.c
index 25cdbb20f3a0..1261512d6807 100644
--- a/net/core/skmsg.c
+++ b/net/core/skmsg.c
@@ -669,14 +669,13 @@ static void sk_psock_destroy_deferred(struct work_struct *gc)
kfree(psock);
}
-void sk_psock_destroy(struct rcu_head *rcu)
+static void sk_psock_destroy(struct rcu_head *rcu)
{
struct sk_psock *psock = container_of(rcu, struct sk_psock, rcu);
INIT_WORK(&psock->gc, sk_psock_destroy_deferred);
schedule_work(&psock->gc);
}
-EXPORT_SYMBOL_GPL(sk_psock_destroy);
void sk_psock_drop(struct sock *sk, struct sk_psock *psock)
{
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Patch bpf-next] skmsg: make sk_psock_destroy() static
2021-01-27 22:15 [Patch bpf-next] skmsg: make sk_psock_destroy() static Cong Wang
@ 2021-01-27 23:40 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-01-27 23:40 UTC (permalink / raw)
To: Cong Wang; +Cc: netdev, bpf, cong.wang, john.fastabend, daniel, jakub, lmb
Hello:
This patch was applied to bpf/bpf-next.git (refs/heads/master):
On Wed, 27 Jan 2021 14:15:01 -0800 you wrote:
> From: Cong Wang <cong.wang@bytedance.com>
>
> sk_psock_destroy() is a RCU callback, I can't see any reason why
> it could be used outside.
>
> 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>
>
> [...]
Here is the summary with links:
- [bpf-next] skmsg: make sk_psock_destroy() static
https://git.kernel.org/bpf/bpf-next/c/8063e184e490
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-27 23:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-27 22:15 [Patch bpf-next] skmsg: make sk_psock_destroy() static Cong Wang
2021-01-27 23:40 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.