From: Greg Kroah-Hartman Date: Thu, 31 Aug 2017 04:41:28 +0000 (+0200) Subject: 4.4-stable patches X-Git-Tag: v3.18.69~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8fdb2bb4a2d59113579b4045fd0fcf30986adb24;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: lightnvm-initialize-ppa_addr-in-dev_to_generic_addr.patch p54-memset-0-whole-array.patch --- 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 index 00000000000..b085f2c5230 --- /dev/null +++ b/queue-4.4/lightnvm-initialize-ppa_addr-in-dev_to_generic_addr.patch @@ -0,0 +1,34 @@ +From 5389a1dfb39786df08d4f6a482bd2734b1b50e33 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Javier=20Gonz=C3=A1lez?= +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 + +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 +Signed-off-by: Matias Bjørling +Signed-off-by: Jens Axboe +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..a150b524b3f --- /dev/null +++ b/queue-4.4/p54-memset-0-whole-array.patch @@ -0,0 +1,37 @@ +From 6f17581788206444cbbcdbc107498f85e9765e3d Mon Sep 17 00:00:00 2001 +From: Jiri Slaby +Date: Fri, 14 Oct 2016 11:23:09 +0200 +Subject: p54: memset(0) whole array + +From: Jiri Slaby + +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 +Cc: Christian Lamparter +Cc: Kalle Valo +Acked-by: Christian Lamparter +Signed-off-by: Kalle Valo +Signed-off-by: Greg Kroah-Hartman + +--- + 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)); diff --git a/queue-4.4/series b/queue-4.4/series index f52822a8b85..501e670ae8a 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -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