Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Marek Vasut <marex@denx.de>, linux-arm-kernel@lists.infradead.org
Cc: Marc Zyngier <marc.zyngier@arm.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Stephen Boyd <sboyd@codeaurora.org>
Subject: Re: [PATCH] [RFC] genirq: Check irq_data_get_irq_chip() return value before use
Date: Thu, 07 May 2020 23:51:51 +0200	[thread overview]
Message-ID: <875zd7e7m0.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <05c06df8-f871-c20f-3b7e-bcfa0b5d88cd@denx.de>

Marek,

Marek Vasut <marex@denx.de> writes:
> On 5/7/20 7:30 PM, Thomas Gleixner wrote:
>> Marek Vasut <marex@denx.de> writes:
>>> NOTE: I don't know whether this is a correct fix. Maybe the
>>>       irq_data_get_irq_chip() should never return NULL, and
>>>       I have some other issue?
>> 
>> What's the callchain?
>
> Hmm, I'm currently unable to replicate it on linux-next, but on 5.4.39 I
> get what's at the end of the email.
>
> On next I just noticed I get i2c: Transfer while suspended, which is
> what I suspect would be the real root cause of my problem, and why
> irq_data_get_irq_chip() returns NULL?

Looks like.

>  Unable to handle kernel NULL pointer dereference at virtual address 00000070
>  PC is at __irq_get_irqchip_state+0x4/0x30
>  LR is at __synchronize_hardirq+0x7c/0xe8
>  [<c0166758>] (__irq_get_irqchip_state) from [<c0166800>] (__synchronize_hardirq+0x7c/0xe8)
>  [<c0166800>] (__synchronize_hardirq) from [<c01668f0>] (synchronize_irq+0x2c/0x9c)
>  [<c01668f0>] (synchronize_irq) from [<c016cba0>] (suspend_device_irqs+0xd8/0xf4)
>  [<c016cba0>] (suspend_device_irqs) from [<c04e3388>] (dpm_suspend_noirq+0x18/0x194)
>  [<c04e3388>] (dpm_suspend_noirq) from [<c015f174>] (suspend_devices_and_enter+0x170/0x514)
>  [<c015f174>] (suspend_devices_and_enter) from [<c015f6f4>] (pm_suspend+0x1dc/0x278)
>  [<c015f6f4>] (pm_suspend) from [<c015e100>] (state_store+0x9c/0xcc)
>  [<c015e100>] (state_store) from [<c029a424>] (kernfs_fop_write+0x124/0x1e0)
>  [<c029a424>] (kernfs_fop_write) from [<c02301c8>] (__vfs_write+0x2c/0xe8)
>  [<c02301c8>] (__vfs_write) from [<c0231658>] (vfs_write+0x98/0xbc)
>  [<c0231658>] (vfs_write) from [<c02317fc>] (ksys_write+0x74/0xc4)
>  [<c02317fc>] (ksys_write) from [<c0101000>] (ret_fast_syscall+0x0/0x54)

I assume that the i2c controller in question tears down the interrupt on
suspend. The changelog of that i2c driver should give you a few hints.

Thanks,

        tglx


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-05-07 21:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-07 15:07 [PATCH] [RFC] genirq: Check irq_data_get_irq_chip() return value before use Marek Vasut
2020-05-07 17:30 ` Thomas Gleixner
2020-05-07 18:29   ` Marek Vasut
2020-05-07 21:51     ` Thomas Gleixner [this message]
2020-05-10 14:49       ` Marek Vasut
2020-05-13 20:49         ` Thomas Gleixner
2020-05-14  0:26           ` Marek Vasut
2020-05-14 12:16         ` Alexandre Torgue

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=875zd7e7m0.fsf@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=marc.zyngier@arm.com \
    --cc=marex@denx.de \
    --cc=sboyd@codeaurora.org \
    /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