I2C: Fix race condition in it87 driver
PATCH 1/1 I2C: Fix race condition in it87 driver
Hi Greg,
I noticed a race condition in the it87, affecting the IT8712F chip only. The VRM value is currently initialized *after* creating the vrm and vid sysfs files. This leaves a theorical room for reading from these files and get an invalid value. It's not critical, but let's still fix it.
Please apply, thanks.
Signed-off-by Jean Delvare <[email protected]>
drivers/i2c/chips/it87.c renamed from drivers/i2c/chips/it87.c.orig +1 -1
@@ -889,9 +889,9 @@ }if (data->type = it8712) { + data->vrm =i2c_which_vrm ();device_create_file_vrm (new_client);device_create_file_vid (new_client); - data->vrm =i2c_which_vrm (); }return 0 ;
Signature · 1 line
Jean Delvare
Greg KH
AppliedPATCH 1/1 I2C: Fix race condition in it87 driver
Quoted 10 lines · Jean Delvare
Hi Greg,
I noticed a race condition in the it87, affecting the IT8712F chip only. The VRM value is currently initialized *after* creating the vrm and vid sysfs files. This leaves a theorical room for reading from these files and get an invalid value. It's not critical, but let's still fix it.
Please apply, thanks.
Signed-off-by Jean Delvare <[email protected]>
Applied, thanks.
greg k-h