Re: [regression] Bug 216856 - [ptdma] NULL pointer dereference in pt_cmd_callback during server shutdown

From: Linux regression tracking #update (Thorsten Leemhuis)
Date: Sat Feb 11 2023 - 09:30:47 EST


[TLDR: This mail in primarily relevant for Linux regression tracking. A
change or fix related to the regression discussed in this thread was
posted or applied, but it did not use a Link: tag to point to the
report, as Linus and the documentation call for. Things happen, no
worries -- but now the regression tracking bot needs to be told manually
about the fix. See link in footer if these mails annoy you.]

On 30.12.22 09:27, Thorsten Leemhuis wrote:

> I noticed a bug report in bugzilla.kernel.org that looks a lot like a
> regression to my untrained eyes (it's not entirely clear). As many
> (most?) kernel developer don't keep an eye on it, I decided to forward
> it by mail. Quoting from
> https://bugzilla.kernel.org/show_bug.cgi?id=216856 :
>
>> Eric Pilmore 2022-12-27 22:23:50 UTC
>>
>> Observed kernel panic during host shutdown on a AMD (Milan CPU) based
>> server. The issue ended up being a NULL pointer dereference in
>> pt_cmd_callback() when
>> called from pt_issue_pending(). If you follow the flow in
>> pt_issue_pending() you will note that if pt_next_dma_desc() returns
>> NULL, then engine_is_idle will remain as TRUE, including if
>> pt_next_dma_desc() is still returning NULL in the 2nd call just prior to
>> doing the call to pt_cmd_callback().
> [...]
> #regzbot introduced: v6.1..v6.2-rc1
> https://bugzilla.kernel.org/show_bug.cgi?id=216856
> #regzbot title: ptdma: kernel panic during host shutdown
> #regzbot ignore-activity

#regzbot introduced: 6fa7e0e836e2
#regzbot monitor:
https://lore.kernel.org/all/20230210075142.58253-1-epilmore@xxxxxxxxxx/
#regzbot fix: dmaengine: ptdma: check for null desc before calling
pt_cmd_callback
#regzbot ignore-activity

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
--
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
That page also explains what to do if mails like this annoy you.