From 3f4480d0692be906df9158acbd2987f2e5693ffe Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 5 Aug 2019 13:18:48 +0200 Subject: [PATCH] 4.9-stable patches added patches: eeprom-at24-make-spd-world-readable-again.patch --- ...m-at24-make-spd-world-readable-again.patch | 40 +++++++++++++++++++ queue-4.9/series | 1 + 2 files changed, 41 insertions(+) create mode 100644 queue-4.9/eeprom-at24-make-spd-world-readable-again.patch diff --git a/queue-4.9/eeprom-at24-make-spd-world-readable-again.patch b/queue-4.9/eeprom-at24-make-spd-world-readable-again.patch new file mode 100644 index 00000000000..5db335e9202 --- /dev/null +++ b/queue-4.9/eeprom-at24-make-spd-world-readable-again.patch @@ -0,0 +1,40 @@ +From 25e5ef302c24a6fead369c0cfe88c073d7b97ca8 Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Sun, 28 Jul 2019 18:41:38 +0200 +Subject: eeprom: at24: make spd world-readable again + +From: Jean Delvare + +commit 25e5ef302c24a6fead369c0cfe88c073d7b97ca8 upstream. + +The integration of the at24 driver into the nvmem framework broke the +world-readability of spd EEPROMs. Fix it. + +Signed-off-by: Jean Delvare +Cc: stable@vger.kernel.org +Fixes: 57d155506dd5 ("eeprom: at24: extend driver to plug into the NVMEM framework") +Cc: Andrew Lunn +Cc: Srinivas Kandagatla +Cc: Greg Kroah-Hartman +Cc: Bartosz Golaszewski +Cc: Arnd Bergmann +Signed-off-by: Bartosz Golaszewski +[Bartosz: backported the patch to older branches] +Signed-off-by: Bartosz Golaszewski +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/misc/eeprom/at24.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/misc/eeprom/at24.c ++++ b/drivers/misc/eeprom/at24.c +@@ -777,7 +777,7 @@ static int at24_probe(struct i2c_client + at24->nvmem_config.name = dev_name(&client->dev); + at24->nvmem_config.dev = &client->dev; + at24->nvmem_config.read_only = !writable; +- at24->nvmem_config.root_only = true; ++ at24->nvmem_config.root_only = !(chip.flags & AT24_FLAG_IRUGO); + at24->nvmem_config.owner = THIS_MODULE; + at24->nvmem_config.compat = true; + at24->nvmem_config.base_dev = &client->dev; diff --git a/queue-4.9/series b/queue-4.9/series index 70662e29a32..fb17a087463 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -35,3 +35,4 @@ ib-mlx5-fix-rss-toeplitz-setup-to-be-aligned-with-the-hw-specification.patch coredump-fix-race-condition-between-mmget_not_zero-get_task_mm-and-core-dumping.patch infiniband-fix-race-condition-between-infiniband-mlx4-mlx5-driver-and-core-dumping.patch coredump-fix-race-condition-between-collapse_huge_page-and-core-dumping.patch +eeprom-at24-make-spd-world-readable-again.patch -- 2.47.3