Re: [PATCH] coredump: Do not lock during 'comm' reporting
From: Andrew Morton
Date: Sat Sep 28 2024 - 17:35:41 EST
On Sat, 28 Sep 2024 14:08:31 -0700 Kees Cook <kees@xxxxxxxxxx> wrote:
> The 'comm' member will always be NUL terminated,
Why is this? I thought this is only true if the caller holds task_lock()?
> and this is not
> fast-path, so we can just perform a direct memcpy during a coredump
> instead of potentially deadlocking while holding the task struct lock.
>