aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2024-06-28 12:18:54 +0200
committerPaolo Abeni <pabeni@redhat.com>2024-07-02 15:26:57 +0200
commit2896624be30b049601ec3ef9b08df184d0c70495 (patch)
treed33b657120fd2e84f46fd1437ffe7751d2d9c754 /kernel
parentMerge branch 'page_pool-bnxt_en-unlink-old-page-pool-in-queue-api-using-helper' (diff)
downloadlinux-2896624be30b049601ec3ef9b08df184d0c70495.tar.gz
linux-2896624be30b049601ec3ef9b08df184d0c70495.zip
net: Remove task_struct::bpf_net_context init on fork.
There is no clone() invocation within a bpf_net_ctx_…() block. Therefore the task_struct::bpf_net_context has always to be NULL and an explicit initialisation is not required. Remove the NULL assignment in the clone() path. Suggested-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/fork.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index f314bdd7e610..99076dbe27d8 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -2355,7 +2355,6 @@ __latent_entropy struct task_struct *copy_process(
RCU_INIT_POINTER(p->bpf_storage, NULL);
p->bpf_ctx = NULL;
#endif
- p->bpf_net_context = NULL;
/* Perform scheduler related setup. Assign this task to a CPU. */
retval = sched_fork(clone_flags, p);