[RESEND PATCH v1] spi: uniphier: Fix completion initialization order before devm_request_irq()
Kunihiko Hayashi
hayashi.kunihiko at socionext.com
Mon Jun 15 17:55:22 PDT 2026
On 2026/06/15 20:45, Mark Brown wrote:
> On Mon, Jun 15, 2026 at 11:34:15AM +0900, Kunihiko Hayashi wrote:
>> The driver calls devm_request_irq() before initializing the completion
>> used by the interrupt handler. Because the interrupt may occur immediately
>> after devm_request_irq(), the handler may execute before init_completion().
>>
>> This may result in calling complete() on an uninitialized completion,
>> causing undefined behavior. This has been observed with KASAN.
>>
>> Fix this by initializing the completion before registering the IRQ.
>
> I thought you were going to rebase this, why resend the same version?
Sorry for confusion.
The patch was rebased due to upstream changes.
I'll resend it as v2 with a change comment.
Thank you,
---
Best Regards
Kunihiko Hayashi
More information about the linux-arm-kernel
mailing list