]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: Remove task_struct::bpf_net_context init on fork.
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Fri, 28 Jun 2024 10:18:54 +0000 (12:18 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 2 Jul 2024 13:26:57 +0000 (15:26 +0200)
commit2896624be30b049601ec3ef9b08df184d0c70495
treed33b657120fd2e84f46fd1437ffe7751d2d9c754
parente27d7168f0c8c024344e9541513aa71d921402a5
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>
kernel/fork.c