From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Hector Martin <marcan@marcan.st>
Subject: Re: [PATCH] nvmem: fix registration vs use race
Date: Tue, 3 Jan 2023 11:46:15 +0000 [thread overview]
Message-ID: <Y7QVh8/LPQ7H8ehp@shell.armlinux.org.uk> (raw)
In-Reply-To: <bad6a162-3e82-2f5e-1822-23951b61450b@linaro.org>
On Tue, Jan 03, 2023 at 11:30:36AM +0000, Srinivas Kandagatla wrote:
>
>
> On 03/01/2023 09:42, Russell King (Oracle) wrote:
> > The i.MX6 CPU frequency driver sometimes fails to register at boot time
> > due to nvmem_cell_read_u32() sporadically returning -ENOENT.
> >
> > This happens because there is a window where __nvmem_device_get() in
> > of_nvmem_cell_get() is able to return the nvmem device, but as cells
> > have been setup, nvmem_find_cell_entry_by_node() returns NULL.
> >
> > The occurs because the nvmem core registration code violates one of the
> > fundamental principles of kernel programming: do not publish data
> > structures before their setup is complete.
> >
> > Fix this by making nvmem core code conform with this principle.
> >
> how about a Fixes tag and Cc stable?
Which commit do you suggest? This error goes all the way back to the
inception of nvmem, commit
eace75cfdcf7 ("nvmem: Add a simple NVMEM framework for nvmem providers")
but clearly its going to be a lot of effort to backport it all the
way due to all the changes.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Hector Martin <marcan@marcan.st>
Subject: Re: [PATCH] nvmem: fix registration vs use race
Date: Tue, 3 Jan 2023 11:46:15 +0000 [thread overview]
Message-ID: <Y7QVh8/LPQ7H8ehp@shell.armlinux.org.uk> (raw)
In-Reply-To: <bad6a162-3e82-2f5e-1822-23951b61450b@linaro.org>
On Tue, Jan 03, 2023 at 11:30:36AM +0000, Srinivas Kandagatla wrote:
>
>
> On 03/01/2023 09:42, Russell King (Oracle) wrote:
> > The i.MX6 CPU frequency driver sometimes fails to register at boot time
> > due to nvmem_cell_read_u32() sporadically returning -ENOENT.
> >
> > This happens because there is a window where __nvmem_device_get() in
> > of_nvmem_cell_get() is able to return the nvmem device, but as cells
> > have been setup, nvmem_find_cell_entry_by_node() returns NULL.
> >
> > The occurs because the nvmem core registration code violates one of the
> > fundamental principles of kernel programming: do not publish data
> > structures before their setup is complete.
> >
> > Fix this by making nvmem core code conform with this principle.
> >
> how about a Fixes tag and Cc stable?
Which commit do you suggest? This error goes all the way back to the
inception of nvmem, commit
eace75cfdcf7 ("nvmem: Add a simple NVMEM framework for nvmem providers")
but clearly its going to be a lot of effort to backport it all the
way due to all the changes.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2023-01-03 14:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-03 9:42 [PATCH] nvmem: fix registration vs use race Russell King (Oracle)
2023-01-03 9:42 ` Russell King (Oracle)
2023-01-03 11:30 ` Srinivas Kandagatla
2023-01-03 11:30 ` Srinivas Kandagatla
2023-01-03 11:46 ` Russell King (Oracle) [this message]
2023-01-03 11:46 ` Russell King (Oracle)
2023-01-03 12:42 ` Srinivas Kandagatla
2023-01-03 12:42 ` Srinivas Kandagatla
2023-01-03 12:48 ` Russell King (Oracle)
2023-01-03 12:48 ` Russell King (Oracle)
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=Y7QVh8/LPQ7H8ehp@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcan@marcan.st \
--cc=srinivas.kandagatla@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.