[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2bd2c4a8-456e-426a-aece-6d21afe80643@linux.dev>
Date: Wed, 8 Oct 2025 15:23:05 +0800
From: Lance Yang <lance.yang@...ux.dev>
To: Finn Thain <fthain@...ux-m68k.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>, Eero Tamminen
<oak@...sinkinet.fi>, Kent Overstreet <kent.overstreet@...ux.dev>,
amaindex@...look.com, anna.schumaker@...cle.com, boqun.feng@...il.com,
ioworker0@...il.com, joel.granados@...nel.org, jstultz@...gle.com,
leonylgao@...cent.com, linux-kernel@...r.kernel.org,
linux-m68k@...ts.linux-m68k.org, longman@...hat.com, mhiramat@...nel.org,
mingo@...hat.com, mingzhe.yang@...com, peterz@...radead.org,
rostedt@...dmis.org, senozhatsky@...omium.org, tfiga@...omium.org,
will@...nel.org, stable@...r.kernel.org
Subject: Re: [PATCH v2 1/1] hung_task: fix warnings caused by unaligned lock
pointers
On 2025/10/8 15:09, Lance Yang wrote:
>
>
> On 2025/10/8 14:14, Finn Thain wrote:
>>
>> On Wed, 8 Oct 2025, Lance Yang wrote:
>>
>>> On 2025/10/8 08:40, Finn Thain wrote:
>>>>
>>>> On Tue, 7 Oct 2025, Andrew Morton wrote:
>>>>
>>>>> Getting back to the $Subject at hand, are people OK with proceeding
>>>>> with Lance's original fix?
>>>>>
>>>>
>>>> Lance's patch is probably more appropriate for -stable than the patch I
>>>> proposed -- assuming a fix is needed for -stable.
>>>
>>> Thanks!
>>>
>>> Apart from that, I believe this fix is still needed for the hung task
>>> detector itself, to prevent unnecessary warnings in a few unexpected
>>> cases.
>>>
>>
>> Can you be more specific about those cases? A fix for a theoretical bug
>> doesn't qualify for -stable branches. But if it's a fix for a real bug, I
>> have misunderstood Andrew's question...
>
> I believe it is a real bug, as it was reported by Eero and Geert[1].
>
> The blocker tracking mechanism in -stable assumes that lock pointers
> are at least 4-byte aligned. As I mentioned previously[2], this
> assumption fails for packed structs on architectures that don't trap
> on unaligned access.
>
> Of course, we could always improve the mechanism to not make
> assumptions. But for -stable, this fix completely resolves the issue
> by ignoring any unaligned pointer, whatever the cause (e.g., packed
> structs, non-native alignment, etc.).
>
> So we can all sleep well at night again :)
>
> [1] https://lore.kernel.org/lkml/
> CAMuHMdW7Ab13DdGs2acMQcix5ObJK0O2dG_Fxzr8_g58Rc1_0g@...l.gmail.com/
> [2] https://lore.kernel.org/lkml/cfb62b9d-9cbd-47dd-
> a894-3357027e2a50@...ux.dev/
Forgot to add:
In other words, we are not just fixing the bug reported by Eero
and Geert, but correcting the blocker tracking mechanism's flawed
assumption for -stable ;)
If you feel this doesn't qualify as a fix, I can change the Fixes:
tag to point to the original commit that introduced this flawed
mechanism instead.
>
>>
>>>>
>>>> Besides those two alternatives, there is also a workaround:
>>>> $ ./scripts/config -d DETECT_HUNG_TASK_BLOCKER
>>>> which may be acceptable to the interested parties (i.e. m68k users).
>>>>
>>>> I don't have a preference. I'll leave it up to the bug reporters (Eero
>>>> and Geert).
>>>
>
Powered by blists - more mailing lists