From: Jens Axboe <axboe@kernel.dk>
To: Michael Ellerman <mpe@ellerman.id.au>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH] powerpc: don't try to copy ppc for task with NULL pt_regs
Date: Tue, 28 Mar 2023 06:39:12 -0600 [thread overview]
Message-ID: <6408fa0f-2fa9-f734-e318-fd57b8d31df8@kernel.dk> (raw)
In-Reply-To: <87lejhcdrh.fsf@mpe.ellerman.id.au>
On 3/28/23 5:32?AM, Michael Ellerman wrote:
> Jens Axboe <axboe@kernel.dk> writes:
>> Powerpc sets up PF_KTHREAD and PF_IO_WORKER with a NULL pt_regs, which
>> from my (arguably very short) checking is not commonly done for other
>> archs. This is fine, except when PF_IO_WORKER's have been created and
>> the task does something that causes a coredump to be generated.
>
> Do kthread's ever core dump? I didn't think they did, but I can't find
> any logic to prevent it.
kthreads aren't associated with the original task, they just exist by
themselves. They also can't take signals. Eg they cannot core dump, just
oops :-)
This is different than io workers that do show up as threads, but they
still don't exit to userspace. That is why it ended being a problem.
> As Nick said we should probably have a non-NULL regs for PF_IO_WORKERS,
> but I'll still take this as a nice backportable fix for the immediate
> crash.
>
> I tagged it as Fixes: pointing back at the commit that added ppr_get(),
> even though I don't know for sure the bug was triggerable back then
> (v4.8).
Thanks!
--
Jens Axboe
next prev parent reply other threads:[~2023-03-28 12:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-26 22:15 [PATCH] powerpc: don't try to copy ppc for task with NULL pt_regs Jens Axboe
2023-03-27 6:36 ` Nicholas Piggin
2023-03-27 10:26 ` Christophe Leroy
2023-03-28 6:16 ` Nicholas Piggin
2023-03-28 11:47 ` Michael Ellerman
2023-03-30 8:44 ` Christophe Leroy
2023-03-27 12:42 ` Jens Axboe
2023-03-27 13:54 ` Michael Ellerman
2023-03-27 16:10 ` Jens Axboe
2023-03-28 11:32 ` Michael Ellerman
2023-03-28 12:39 ` Jens Axboe [this message]
2023-04-06 0:26 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6408fa0f-2fa9-f734-e318-fd57b8d31df8@kernel.dk \
--to=axboe@kernel.dk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.