]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Aug 2019 11:24:50 +0000 (13:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Aug 2019 11:24:50 +0000 (13:24 +0200)
added patches:
eeprom-at24-make-spd-world-readable-again.patch

queue-4.14/eeprom-at24-make-spd-world-readable-again.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/eeprom-at24-make-spd-world-readable-again.patch b/queue-4.14/eeprom-at24-make-spd-world-readable-again.patch
new file mode 100644 (file)
index 0000000..b9d4cd6
--- /dev/null
@@ -0,0 +1,40 @@
+From 25e5ef302c24a6fead369c0cfe88c073d7b97ca8 Mon Sep 17 00:00:00 2001
+From: Jean Delvare <jdelvare@suse.de>
+Date: Sun, 28 Jul 2019 18:41:38 +0200
+Subject: eeprom: at24: make spd world-readable again
+
+From: Jean Delvare <jdelvare@suse.de>
+
+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 <jdelvare@suse.de>
+Cc: stable@vger.kernel.org
+Fixes: 57d155506dd5 ("eeprom: at24: extend driver to plug into the NVMEM framework")
+Cc: Andrew Lunn <andrew@lunn.ch>
+Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Cc: Bartosz Golaszewski <brgl@bgdev.pl>
+Cc: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
+[Bartosz: backported the patch to older branches]
+Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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
+@@ -834,7 +834,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;
index 0d92c2e0d2066a1c625efb7a9d297f58d80d4cbc..4aa183f1b772657fd7579df1018201ffbec0ecf4 100644 (file)
@@ -47,3 +47,4 @@ ib-mlx5-use-direct-mkey-destroy-command-upon-umr-unreg-failure.patch
 ib-mlx5-move-mrs-to-a-kernel-pd-when-freeing-them-to-the-mr-cache.patch
 ib-mlx5-fix-rss-toeplitz-setup-to-be-aligned-with-the-hw-specification.patch
 ib-hfi1-check-for-error-on-call-to-alloc_rsm_map_table.patch
+eeprom-at24-make-spd-world-readable-again.patch