All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Jens Axboe <axboe@kernel.dk>,
	"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 22:32:34 +1100	[thread overview]
Message-ID: <87lejhcdrh.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <d9f63344-fe7c-56ae-b420-4a1a04a2ae4c@kernel.dk>

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.

Maybe it's always been possible but just never happened due to luck.

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).

cheers

  parent reply	other threads:[~2023-03-28 11:33 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 [this message]
2023-03-28 12:39   ` Jens Axboe
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=87lejhcdrh.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=axboe@kernel.dk \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /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.