Patch "gpio: pca953x: Move memcpy into mutex lock for set multiple" has been added to the 4.8-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
gpio: pca953x: Move memcpy into mutex lock for set multiple
to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
gpio-pca953x-move-memcpy-into-mutex-lock-for-set-multiple.patch
and it can be found in the queue-4.8 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
386377b5473043c09b2de40bfe5abfb0fc87e1b4Mon Sep 17 00:00:00 2001
From: Phil Reid <[email protected]>
Date: Tue, 8 Nov 2016 13:18:11 +0800
Subject: gpio: pca953x: Move memcpy into mutex lock for set multiple
From: Phil Reid <[email protected]>
commit 386377b5473043c09b2de40bfe5abfb0fc87e1b4 upstream.
Need to ensure that reg_output is not updated while setting multiple bits. This makes the mutex locking behaviour for the set_multiple call consistent with that of the set_value call.
--- drivers/gpio/gpio-pca953x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-pca953x.c +1 -1
@@ -372,8 +372,8 @@ static void pca953x_gpio_set_multiple(stbreak ; } -memcpy (reg_val, chip->reg_output,NBANK (chip));mutex_lock (&chip->i2c_lock); +memcpy (reg_val, chip->reg_output,NBANK (chip));for (bank=0 ; bank<NBANK (chip); bank++) {unsigned bankmask = mask[bank /sizeof (*mask)] >> ((bank %sizeof (*mask)) *8 );
Patches currently in stable-queue which might be from [email protected] are
queue-4.8/gpio-pca953x-move-memcpy-into-mutex-lock-for-set-multiple.patch queue-4.8/gpio-pca953x-fix-corruption-of-other-gpios-in-set_multiple.patch