]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Aug 2017 04:41:28 +0000 (06:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Aug 2017 04:41:28 +0000 (06:41 +0200)
added patches:
lightnvm-initialize-ppa_addr-in-dev_to_generic_addr.patch
p54-memset-0-whole-array.patch

queue-4.4/lightnvm-initialize-ppa_addr-in-dev_to_generic_addr.patch [new file with mode: 0644]
queue-4.4/p54-memset-0-whole-array.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/lightnvm-initialize-ppa_addr-in-dev_to_generic_addr.patch b/queue-4.4/lightnvm-initialize-ppa_addr-in-dev_to_generic_addr.patch
new file mode 100644 (file)
index 0000000..b085f2c
--- /dev/null
@@ -0,0 +1,34 @@
+From 5389a1dfb39786df08d4f6a482bd2734b1b50e33 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Javier=20Gonz=C3=A1lez?= <javier@cnexlabs.com>
+Date: Thu, 7 Jul 2016 09:54:09 +0200
+Subject: lightnvm: initialize ppa_addr in dev_to_generic_addr()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Javier González <javier@cnexlabs.com>
+
+commit 5389a1dfb39786df08d4f6a482bd2734b1b50e33 upstream.
+
+The ->reserved bit is not initialized when allocated on stack.
+This may lead targets to misinterpret the PPA as cached.
+
+Signed-off-by: Javier González <javier@cnexlabs.com>
+Signed-off-by: Matias Bjørling <m@bjorling.me>
+Signed-off-by: Jens Axboe <axboe@fb.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ include/linux/lightnvm.h |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/include/linux/lightnvm.h
++++ b/include/linux/lightnvm.h
+@@ -310,6 +310,7 @@ static inline struct ppa_addr dev_to_gen
+ {
+       struct ppa_addr l;
++      l.ppa = 0;
+       /*
+        * (r.ppa << X offset) & X len bitmask. X eq. blk, pg, etc.
+        */
diff --git a/queue-4.4/p54-memset-0-whole-array.patch b/queue-4.4/p54-memset-0-whole-array.patch
new file mode 100644 (file)
index 0000000..a150b52
--- /dev/null
@@ -0,0 +1,37 @@
+From 6f17581788206444cbbcdbc107498f85e9765e3d Mon Sep 17 00:00:00 2001
+From: Jiri Slaby <jslaby@suse.cz>
+Date: Fri, 14 Oct 2016 11:23:09 +0200
+Subject: p54: memset(0) whole array
+
+From: Jiri Slaby <jslaby@suse.cz>
+
+commit 6f17581788206444cbbcdbc107498f85e9765e3d upstream.
+
+gcc 7 complains:
+drivers/net/wireless/intersil/p54/fwio.c: In function 'p54_scan':
+drivers/net/wireless/intersil/p54/fwio.c:491:4: warning: 'memset' used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size]
+
+Fix that by passing the correct size to memset.
+
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+Cc: Christian Lamparter <chunkeey@googlemail.com>
+Cc: Kalle Valo <kvalo@codeaurora.org>
+Acked-by: Christian Lamparter <chunkeey@googlemail.com>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/p54/fwio.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/wireless/p54/fwio.c
++++ b/drivers/net/wireless/p54/fwio.c
+@@ -488,7 +488,7 @@ int p54_scan(struct p54_common *priv, u1
+                       entry += sizeof(__le16);
+                       chan->pa_points_per_curve = 8;
+-                      memset(chan->curve_data, 0, sizeof(*chan->curve_data));
++                      memset(chan->curve_data, 0, sizeof(chan->curve_data));
+                       memcpy(chan->curve_data, entry,
+                              sizeof(struct p54_pa_curve_data_sample) *
+                              min((u8)8, curve_data->points_per_channel));
index f52822a8b85b83db659fb24eb0ea9b64ab5762b2..501e670ae8ab660c6861585061710d7d03489e5c 100644 (file)
@@ -4,3 +4,5 @@ btrfs-remove-duplicate-const-specifier.patch
 i2c-jz4780-drop-superfluous-init.patch
 gcov-add-support-for-gcc-version-6.patch
 gcov-support-gcc-7.1.patch
+lightnvm-initialize-ppa_addr-in-dev_to_generic_addr.patch
+p54-memset-0-whole-array.patch