i2c: i801: Use PCI bus rescan mutex to protect P2SB access
authorHeiner Kallweit <hkallweit1@gmail.com>
Sun, 5 Sep 2021 15:59:42 +0000 (17:59 +0200)
committerWolfram Sang <wsa@kernel.org>
Wed, 29 Sep 2021 20:12:44 +0000 (22:12 +0200)
commit7d6b61c394a42b8385858bb9e306d48a0112823c
tree7e20cf7e6f7962a706edd195bbc6a1dc675e30c3
parent4c5910631cc1a9c3b8d34ebb0048727eded9148c
i2c: i801: Use PCI bus rescan mutex to protect P2SB access

As pointed out by Andy in [0] using a local mutex here isn't strictly
wrong but not sufficient. We should hold the PCI rescan lock for P2SB
operations.

[0] https://www.spinics.net/lists/linux-i2c/msg52717.html

Fixes: 1a987c69ce2c ("i2c: i801: make p2sb_spinlock a mutex")
Reported-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-i801.c