aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-mod.c
diff options
context:
space:
mode:
authorHans Verkuil <[email protected]>2023-04-20 14:47:05 +0200
committerLinus Walleij <[email protected]>2023-04-21 11:00:34 +0200
commitb7badd752de05312fdb1aeb388480f706d0c087f (patch)
treea640b8f2ce0e84937ea799b775bb3da9c7290f11 /lib/mpi/mpi-mod.c
parentb19a1d8f1dbd2410eaa2f4a5f7680197e2647c94 (diff)
pinctrl-bcm2835.c: fix race condition when setting gpio dir
In the past setting the pin direction called pinctrl_gpio_direction() which uses a mutex to serialize this. That was changed to set the direction directly in the pin controller driver, but that lost the serialization mechanism. Since the direction of multiple pins are in the same register you can have a race condition, something that was in fact observed with the cec-gpio driver. Add a new spinlock to serialize writing to the FSEL registers. Signed-off-by: Hans Verkuil <[email protected]> Fixes: 1a4541b68e25 ("pinctrl-bcm2835: don't call pinctrl_gpio_direction()") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mod.c')
0 files changed, 0 insertions, 0 deletions