Re: [PATCH RESEND] char/hpet: Fix missing TASK_RUNNING before put_user() in hpet_read()

From: Habil Eren Türker

Date: Thu Nov 19 2026 - 13:28:40 EST


On Thu, Nov 19, 2026 at 03:02:07PM +0000, Greg Kroah-Hartman wrote:
> Shouldn't this be set_current_state(TASK_RUNNING) instead?

Thanks for the review.
You're right, set_current_state(TASK_RUNNING) is more appropriate here.
I don't have a specific reason for choosing __set_current_state() in the
original patch. I'll correct it.

> And why hasn't this ever been noticed before, what changed to cause it
> to show up now? And because of that, why is there not a Fixes: tag?

My initial clone was shallow, so I fetched the full history and repeated
the investigation. I traced the history of hpet_read().
The TASK_INTERRUPTIBLE state handling followed by the put_user() call is
already present in the earliest available Git history, in the initial Git
import (1da177e4c3f4). I couldn't identify a later commit that introduced
this behavior.

The 2010 (54066a57c584) and 2024 (4e60131d0d36) changes I examined do not
appear to have introduced the issue. I couldn't identify a suitable commit
for a `Fixes:` tag.

I haven't identified what changed in the testing or execution conditions
that caused this issue to be detected now.

Regards,
Türker