[PATCH] powerpc: don't try to copy ppc for task with NULL pt_regs

Jens Axboe axboe at kernel.dk
Tue Mar 28 03:10:06 AEDT 2023


On 3/27/23 7:54?AM, Michael Ellerman wrote:
> "Nicholas Piggin" <npiggin at gmail.com> writes:
>> On Mon Mar 27, 2023 at 8:15 AM AEST, Jens Axboe wrote:
>>> 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. Then we
>>> get this crash:
>>
>> Hey Jens,
>>
>> Thanks for the testing and the patch.
>>
>> I think your patch would work, but I'd be inclined to give the IO worker
>> a pt_regs so it looks more like other archs and a regular user thread.
>>
>> Your IO worker bug reminded me to resurrect some copy_thread patches I
>> had and I think they should do that
>>
>> https://lists.ozlabs.org/pipermail/linuxppc-dev/2023-March/256271.html
>>
>> I wouldn't ask you to test it until I've at least tried, do you have a
>> test case that triggers this?
> 
> I hit it once on one machine while running the mtr test from the other
> thread. I'm not sure what leads to it failing that way rather than the
> usual case of the mariadb test just printing an error.

That's how I hit it first too, then I wrote the reproducer to verify and
be able to test a patch.

-- 
Jens Axboe



More information about the Linuxppc-dev mailing list