Re: commit 7b025f3f85ed causes NULL pointer dereference

Andy Shevchenko
2025-04-09T11:49:09Z

On Tue, Apr 08, 2025 at 10:46:12PM +0200, Thomas Gleixner wrote:
> On Tue, Apr 08 2025 at 18:20, Bert Karwatzki wrote:
> > Am Dienstag, dem 08.04.2025 um 17:29 +0200 schrieb Thomas Gleixner:
> >> > Can you please decode the lines please via:
> >> >
> >> > scripts/faddr2line vmlinux msi_domain_first_desc+0x4/0x30
> >> > scripts/faddr2line vmlinux msix_setup_interrupts+0x23b/0x280

Also hit this, bisected to this change and in my case it's Clang 19.

> > I had to recompile with CONFIG_DEBUG_INFO=Y, and reran the test, the calltrace
> > is identical.
> >
> > $ scripts/faddr2line vmlinux msi_domain_first_desc+0x4/0x30
> > msi_domain_first_desc+0x4/0x30:
> > msi_domain_first_desc at kernel/irq/msi.c:400
> >
> > So it seems msi_domain_first_desc() is called with dev = NULL.
>
> Yup
>
> > $ scripts/faddr2line vmlinux msix_setup_interrupts+0x23b/0x280
> > msix_setup_interrupts+0x23b/0x280:
> > msix_update_entries at drivers/pci/msi/msi.c:647 (discriminator 1)
>
> Aaarg. The patch below should fix that.

Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

--
With Best Regards,
Andy Shevchenko