OSDN Git Service

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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Jun 2017 04:41:50 +0000 (06:41 +0200)
commitc1a4306f24a092f55ee9bbdff0c0a8741e9c833c
tree69ac1e24fbacc8241a05005a057a1fac2b7db642
parent7a6fcf38fabb404dd6fa589fa257c104c217c662
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