Skip to contentSkip to conversation

skmsg: make sk_psock_destroy() static

PATCH Applied Cong Wang 2 participants 2 messages Jan 27, 2021

Subsystems (4)
lore
Share & tools
lore

Cong Wang

author
#0 lore raw

PATCH 1/1 skmsg: make sk_psock_destroy() static

From: Cong Wang <[email protected]>

sk_psock_destroy() is a RCU callback, I can't see any reason why it could be used outside.

Cc John Fastabend <[email protected]>
Cc Daniel Borkmann <[email protected]>
Cc Jakub Sitnicki <[email protected]>
Cc Lorenz Bauer <[email protected]>
---
 include/linux/skmsg.h | 1 -
 net/core/skmsg.c      | 3 +--
 2 files changed, 1 insertion(+), 3 deletions(-)
include/linux/skmsg.h +0 -1
index fec0c5ac1c4f..8edbbf5f2f93 100644
@@ -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)
net/core/skmsg.c +1 -2
index 25cdbb20f3a0..1261512d6807 100644
@@ -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)
 {
Signature · 1 line
2.25.1
#1 lore raw
This patch was applied to bpf/bpf-next.git (refs/heads/master):

Hello:

This patch was applied to bpf/bpf-next.git (refs/heads/master):

Quoted 5 lines · On Wed, 27 Jan 2021 14:15:01 -0800 you wrote:

From: Cong Wang <[email protected]>

sk_psock_destroy() is a RCU callback, I can't see any reason why it could be used outside.

Quoted 7 lines
Cc John Fastabend <[email protected]>
Cc Daniel Borkmann <[email protected]>
Cc Jakub Sitnicki <[email protected]>
Cc Lorenz Bauer <[email protected]>

[...]

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