lkml.org 
[lkml]   [2022]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] signal: fix deadlock caused by calling printk() under sighand->siglock
From
Date

On 2022/8/27 5:23, Eric W. Biederman wrote:
> While the patch below will in theory fix the reported deadlock, I don't
> think it is a good choice of fix. As a rule we want to allow printk to
> be callable in as many places as possible, so that it can be used for
> debugging. There are enough places that take siglock that outlawing
> printk under siglock will make the kernel unstable.
>
> I tried to read the current kernel and verify this deadlock to see if I
> could suggest a better location to change the code to fix the deadlock.
> Say modifying task_work_add to not take siglock. The current
> task_work_add does not take siglock. I encountered a few other
> significant function differences as well. One significant difference is
> that io_poll_double_wake no longer exists.
>
> I think the amb-pl011.c driver might even be more different yet.
>
> Can you reproduce this on current kernels?
>
> Reading the code I think this is already fixed.
>
> Perhaps you want to read the code of the affected subsystems and pick
> some appropriate changes to backport to 5.10?
>
> Eric
>
> .

Thank you for your reply.


I tested it on the current version for a few days using the same case
and the

problem didn't occur again. You're right, the problem has been fixed.
I've read

some of the code and learned about some of the changes, and I'll try to
backport

the relevant patches to the problem version later.

\
 
 \ /
  Last update: 2022-09-05 08:31    [W:0.242 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site