[PATCH] riscv: kgdb: Fix a missing irq restore issue on an early-return path

Hui Wang hui.wang at canonical.com
Wed May 27 18:28:39 PDT 2026


On 5/28/26 08:20, Paul Walmsley wrote:
> Hi,
>
> On Tue, 26 May 2026, Hui Wang wrote:
>
>> If kgdb_handle_exception() fails, the local_irq_restore() is not
>> called and the function returns to the caller with interrupts still
>> disabled. To fix it, add the missing irq restore here.
>>
>> Fixes: fe89bd2be866 ("riscv: Add KGDB support")
>> Cc: stable at vger.kernel.org
>> Signed-off-by: Hui Wang <hui.wang at canonical.com>
> Was this found using an LLM or some other static analysis tool?  If so,
> please add an Assisted-by: tag, according to the directions documented
> here:
>
>    https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst#n637
>
> and here:
>
>    https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-assistants.rst

Thanks for the reminder. This was found by myself, not by AI or other 
static analysis tool.

Thanks,

Hui.

>
> - Paul
>
>
>



More information about the linux-riscv mailing list