aboutsummaryrefslogtreecommitdiff
path: root/fs/jbd2/commit.c
diff options
context:
space:
mode:
authorRussell King (Oracle) <[email protected]>2023-01-27 10:40:11 +0000
committerGreg Kroah-Hartman <[email protected]>2023-01-28 14:36:29 +0100
commitab3428cfd9aa2f3463ee4b2909b5bb2193bd0c4a (patch)
tree6bf1715c7bd64f86793fd75d26b04d4fcc3ce489 /fs/jbd2/commit.c
parent560181d3ace61825f4ca9dd3481d6c0ee6709fa8 (diff)
nvmem: core: fix registration vs use race
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. Fixes: eace75cfdcf7 ("nvmem: Add a simple NVMEM framework for nvmem providers") Cc: [email protected] Signed-off-by: Russell King (Oracle) <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'fs/jbd2/commit.c')
0 files changed, 0 insertions, 0 deletions