linux-stable/drivers/base
Han Nandor 8b9f9d4dc5
regmap: verify if register is writeable before writing operations
regmap provides a couple of ways to validate the register range used.
a) maxim allowed register, b) writable/readable register tables,
c) callback function that can be provided by the driver to validate
a register. regmap framework should verify if registers
are writeable before every write operation. However this doesn't
seems to happen in every situation.

The method `_regmap_raw_write_impl` is only using the `writeable_reg`
callback to verify if register is writeable, ignoring the other two.
This can lead to undefined behaviour since this allows to write to
registers that could be declared un-writeable by using any other
option.

Change `_regmap_raw_write_impl` to use the `regmap_writeable` method
to verify if registers are writable before the write operation.

Signed-off-by: Nandor Han <nandor.han@vaisala.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-03 11:08:11 +07:00
..
firmware_loader firmware: hardcode the debug message for -ENOENT 2019-02-26 11:59:43 +01:00
power Additional power management updates for 5.1-rc1 2019-03-14 10:30:06 -07:00
regmap regmap: verify if register is writeable before writing operations 2019-04-03 11:08:11 +07:00
test driver core: Rewrite test_async_driver_probe to cover serialization and NUMA affinity 2019-01-31 14:20:54 +01:00
Kconfig dma-mapping: move CONFIG_DMA_CMA to kernel/dma/Kconfig 2019-02-20 07:27:00 -07:00
Makefile drivers: base: Introducing software nodes to the firmware node framework 2018-11-26 18:19:11 +01:00
arch_topology.c sched/topology, drivers/base/arch_topology: Rebuild the sched_domain hierarchy when capacities change 2018-09-10 11:05:47 +02:00
attribute_container.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
base.h driver core: Probe devices asynchronously instead of the driver 2019-01-31 14:20:53 +01:00
bus.c driver core: Probe devices asynchronously instead of the driver 2019-01-31 14:20:53 +01:00
cacheinfo.c cacheinfo: Keep the old value if of_property_read_u32 fails 2019-01-22 13:50:31 +01:00
class.c driver core: move device->knode_class to device_private 2019-01-18 16:55:48 +01:00
component.c drivers/component: kerneldoc polish 2019-02-19 13:20:35 +01:00
container.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
core.c driver core: Fix PM-runtime for links added during consumer probe 2019-02-20 11:18:07 +01:00
cpu.c Driver core patches for 5.1-rc1 2019-03-06 14:52:48 -08:00
dd.c async: Add cmdline option to specify drivers to be async probed 2019-02-14 10:51:39 +01:00
devcon.c device connection: Find device connections also from device graphs 2019-02-14 10:52:25 +01:00
devcoredump.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
devres.c devres: Align data[] to ARCH_KMALLOC_MINALIGN 2018-11-11 11:40:04 -08:00
devtmpfs.c vfs: Suppress MS_* flag defs within the kernel unless explicitly enabled 2018-12-20 16:32:56 +00:00
driver.c driver-core: return EINVAL error instead of BUG_ON() 2018-05-25 18:18:45 +02:00
firmware.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
hypervisor.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
init.c base: fix order of OF initialization 2018-07-07 17:54:29 +02:00
isa.c Merge 4.15-rc3 into driver-core-next 2017-12-11 08:50:05 +01:00
map.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
memory.c device-dax: "Hotplug" persistent memory for use like normal RAM 2019-02-28 10:41:23 -08:00
module.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
node.c mm, proc: add KReclaimable to /proc/meminfo 2018-10-26 16:26:32 -07:00
pinctrl.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
platform-msi.c platform-msi: Free descriptors in platform_msi_domain_free() 2018-12-13 09:35:31 +00:00
platform.c This is the bulk of GPIO changes for the v5.1 cycle: 2019-03-08 10:09:53 -08:00
property.c device property: fix fwnode_graph_get_next_endpoint() documentation 2018-12-18 23:39:45 +01:00
soc.c base: soc: use put_device() instead of kfree() 2018-03-15 14:37:03 +01:00
swnode.c software node: Implement get_named_child_node fwnode callback 2019-02-14 11:33:15 +01:00
syscore.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
topology.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00
transport_class.c driver core: Remove redundant license text 2017-12-07 18:36:44 +01:00