]> git.baikalelectronics.ru Git - kernel.git/commit
regmap: fix alignment issue
authorJens Thoms Toerring <jt@toerring.de>
Sun, 31 May 2020 09:53:00 +0000 (11:53 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 1 Jun 2020 11:31:36 +0000 (12:31 +0100)
commit81067cca6c2d1ac307bbf62ee8e164174194d9c0
treef5e17c68e2d2f392f43dc4fabc850c7f2bb2b57a
parentbac97f083d6e0ef7a8bea2cef9ea8102caa02dd2
regmap: fix alignment issue

The assembly and disassembly of data to be sent to or received from
a device invoke functions regmap_format_XX() and regmap_parse_XX()
that extract or insert data items from or into a buffer, using
assignments. In some cases the functions are called with a buffer
pointer with an odd address. On architectures with strict alignment
requirements this can result in a kernel crash. The assignments
have been replaced by functions that take alignment into account.

Signed-off-by: Jens Thoms Toerring <jt@toerring.de>
Link: https://lore.kernel.org/r/20200531095300.GA27570@toerring.de
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap.c