i2c: piix4: Request the SMBUS semaphore inside the mutex
authorRicardo Ribalda <ricardo.ribalda@gmail.com>
Wed, 24 May 2017 01:53:44 +0000 (21:53 -0400)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 23 Jul 2017 02:57:35 +0000 (02:57 +0000)
commit9a56ffbe581718f23dec7e7ddac6c85c6c782dbd
treebb47875e3956cfebb0a20971add60d26ea5294b3
parentbbeba3ef93a5481a5405c34074ad69ac1a9d4135
i2c: piix4: Request the SMBUS semaphore inside the mutex

[ Upstream commit bbb27fc33d44e7b8d96369810654df4ee1837566 ]

SMBSLVCNT must be protected with the piix4_mutex_sb800 in order to avoid
multiple buses accessing to the semaphore at the same time.

Fixes: 701dc207bf55 ("i2c: piix4: Avoid race conditions with IMC")
Reported-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i2c/busses/i2c-piix4.c