linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Nam Cao <namcao@linutronix.de>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Marc Zyngier <maz@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Richard Weinberger <richard@nod.at>,
	Anton Ivanov <anton.ivanov@cambridgegreys.com>,
	linux-um@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] um: virt-pci: Switch to msi_create_parent_irq_domain()
Date: Fri, 27 Jun 2025 11:49:01 +0200	[thread overview]
Message-ID: <20250627094901.bkxjYmHj@linutronix.de> (raw)
In-Reply-To: <94de787f4c3ad6fc3a44c50c2a5d5311861ddd6c.camel@sipsolutions.net>

On Fri, Jun 27, 2025 at 11:23:58AM +0200, Johannes Berg wrote:
> On Fri, 2025-06-27 at 10:49 +0200, Nam Cao wrote:
> > 
> > Thanks for testing! The later kernel crash should be fixed with:
> > 
> > diff --git a/arch/um/drivers/virt-pci.c b/arch/um/drivers/virt-pci.c
> > index e51a9357934da..557d93aea00a1 100644
> > --- a/arch/um/drivers/virt-pci.c
> > +++ b/arch/um/drivers/virt-pci.c
> > @@ -407,7 +407,6 @@ static const struct irq_domain_ops um_pci_inner_domain_ops = {
> >  
> >  #define UM_PCI_MSI_FLAGS_REQUIRED (MSI_FLAG_USE_DEF_DOM_OPS		| \
> >  				   MSI_FLAG_USE_DEF_CHIP_OPS		| \
> > -				   MSI_FLAG_PCI_MSI_MASK_PARENT		| \
> >  				   MSI_FLAG_NO_AFFINITY)
> 
> Can confirm that.
> 
> > I have no immediate idea about the lockdep warn, I don't see how the
> > MSI_FLAG_PCI_MSI_MASK_PARENT flag can be related to that. Probably there's
> > another problem, let me stare at it..

My understanding of UM is limited, but I think I get it. We dereference a
NULL pointer and get SIGSEGV. We go into that code path and lockdep yells.

With the NULL pointer deref removed, we won't go into that path, so it
should be good.

> Seems to go away as well, perhaps it's due to taking some wrong path
> with the flag just prior to the crash?
> 
> IOW, works for me with the above change with no crash and no lockdep
> warning either.

I will send v2.

Nam


  reply	other threads:[~2025-06-27  9:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-26 14:47 [PATCH 0/1] um: MSI parent domain conversion Nam Cao
2025-06-26 14:47 ` [PATCH 1/1] um: virt-pci: Switch to msi_create_parent_irq_domain() Nam Cao
2025-06-27  8:24   ` Johannes Berg
2025-06-27  8:49     ` Nam Cao
2025-06-27  9:23       ` Johannes Berg
2025-06-27  9:49         ` Nam Cao [this message]
2025-06-27  9:53           ` Nam Cao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250627094901.bkxjYmHj@linutronix.de \
    --to=namcao@linutronix.de \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=maz@kernel.org \
    --cc=richard@nod.at \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).