* [PATCH] net: use umd_cleanup_helper()
@ 2023-05-26 11:21 Jarkko Sakkinen
2023-05-31 11:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Jarkko Sakkinen @ 2023-05-26 11:21 UTC (permalink / raw)
To: David S . Miller; +Cc: Jarkko Sakkinen, bpf, linux-kernel, netdev
bpfilter_umh_cleanup() is the same function as umd_cleanup_helper().
Drop the redundant function.
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
---
include/linux/bpfilter.h | 1 -
net/bpfilter/bpfilter_kern.c | 2 +-
net/ipv4/bpfilter/sockopt.c | 11 +----------
3 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/include/linux/bpfilter.h b/include/linux/bpfilter.h
index 2ae3c8e1d83c..736ded4905e0 100644
--- a/include/linux/bpfilter.h
+++ b/include/linux/bpfilter.h
@@ -11,7 +11,6 @@ int bpfilter_ip_set_sockopt(struct sock *sk, int optname, sockptr_t optval,
unsigned int optlen);
int bpfilter_ip_get_sockopt(struct sock *sk, int optname, char __user *optval,
int __user *optlen);
-void bpfilter_umh_cleanup(struct umd_info *info);
struct bpfilter_umh_ops {
struct umd_info info;
diff --git a/net/bpfilter/bpfilter_kern.c b/net/bpfilter/bpfilter_kern.c
index 422ec6e7ccff..97e129e3f31c 100644
--- a/net/bpfilter/bpfilter_kern.c
+++ b/net/bpfilter/bpfilter_kern.c
@@ -21,7 +21,7 @@ static void shutdown_umh(void)
if (tgid) {
kill_pid(tgid, SIGKILL, 1);
wait_event(tgid->wait_pidfd, thread_group_exited(tgid));
- bpfilter_umh_cleanup(info);
+ umd_cleanup_helper(info);
}
}
diff --git a/net/ipv4/bpfilter/sockopt.c b/net/ipv4/bpfilter/sockopt.c
index 1b34cb9a7708..193bcc2acccc 100644
--- a/net/ipv4/bpfilter/sockopt.c
+++ b/net/ipv4/bpfilter/sockopt.c
@@ -12,15 +12,6 @@
struct bpfilter_umh_ops bpfilter_ops;
EXPORT_SYMBOL_GPL(bpfilter_ops);
-void bpfilter_umh_cleanup(struct umd_info *info)
-{
- fput(info->pipe_to_umh);
- fput(info->pipe_from_umh);
- put_pid(info->tgid);
- info->tgid = NULL;
-}
-EXPORT_SYMBOL_GPL(bpfilter_umh_cleanup);
-
static int bpfilter_mbox_request(struct sock *sk, int optname, sockptr_t optval,
unsigned int optlen, bool is_set)
{
@@ -38,7 +29,7 @@ static int bpfilter_mbox_request(struct sock *sk, int optname, sockptr_t optval,
}
if (bpfilter_ops.info.tgid &&
thread_group_exited(bpfilter_ops.info.tgid))
- bpfilter_umh_cleanup(&bpfilter_ops.info);
+ umd_cleanup_helper(&bpfilter_ops.info);
if (!bpfilter_ops.info.tgid) {
err = bpfilter_ops.start();
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: use umd_cleanup_helper()
2023-05-26 11:21 [PATCH] net: use umd_cleanup_helper() Jarkko Sakkinen
@ 2023-05-31 11:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-05-31 11:10 UTC (permalink / raw)
To: Jarkko Sakkinen; +Cc: davem, bpf, linux-kernel, netdev
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:
On Fri, 26 May 2023 14:21:02 +0300 you wrote:
> bpfilter_umh_cleanup() is the same function as umd_cleanup_helper().
> Drop the redundant function.
>
> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
> ---
> include/linux/bpfilter.h | 1 -
> net/bpfilter/bpfilter_kern.c | 2 +-
> net/ipv4/bpfilter/sockopt.c | 11 +----------
> 3 files changed, 2 insertions(+), 12 deletions(-)
Here is the summary with links:
- net: use umd_cleanup_helper()
https://git.kernel.org/bpf/bpf-next/c/9b68f30b6870
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:[~2023-05-31 11:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-26 11:21 [PATCH] net: use umd_cleanup_helper() Jarkko Sakkinen
2023-05-31 11:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).