Re: [PATCH -mm 1/1] signal: avoid unconditional siginfo copy in send_signal_locked()
From: Christian Brauner
Date: Mon Jul 06 2026 - 07:27:20 EST
On Sat, Jul 04, 2026 at 04:34:42PM +0200, Oleg Nesterov wrote:
> send_signal_locked() unconditionally copies siginfo before the namespace
> translation to avoid corrupting a shared siginfo.
>
> Not that I think this can actually hurt performance-wise, just it doesn't
> look clean to me; the copy is only needed in the unlikely case when the
> translation will actually change something.
>
> Defer it to the two cases where si_pid/si_uid are rewritten, and while at
> it add #ifdef's just for completeness.
>
> Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>
> ---
Reviewed-by: Christian Brauner (Amutable) <brauner@xxxxxxxxxx>