]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Jan 2020 19:02:25 +0000 (20:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Jan 2020 19:02:25 +0000 (20:02 +0100)
added patches:
cfg80211-check-for-set_wiphy_params.patch
cw1200-fix-a-signedness-bug-in-cw1200_load_firmware.patch
xen-blkfront-adjust-indentation-in-xlvbd_alloc_gendisk.patch

queue-4.9/cfg80211-check-for-set_wiphy_params.patch [new file with mode: 0644]
queue-4.9/cw1200-fix-a-signedness-bug-in-cw1200_load_firmware.patch [new file with mode: 0644]
queue-4.9/series
queue-4.9/xen-blkfront-adjust-indentation-in-xlvbd_alloc_gendisk.patch [new file with mode: 0644]

diff --git a/queue-4.9/cfg80211-check-for-set_wiphy_params.patch b/queue-4.9/cfg80211-check-for-set_wiphy_params.patch
new file mode 100644 (file)
index 0000000..343a812
--- /dev/null
@@ -0,0 +1,37 @@
+From 24953de0a5e31dcca7e82c8a3c79abc2dfe8fb6e Mon Sep 17 00:00:00 2001
+From: Johannes Berg <johannes.berg@intel.com>
+Date: Mon, 13 Jan 2020 12:53:59 +0100
+Subject: cfg80211: check for set_wiphy_params
+
+From: Johannes Berg <johannes.berg@intel.com>
+
+commit 24953de0a5e31dcca7e82c8a3c79abc2dfe8fb6e upstream.
+
+Check if set_wiphy_params is assigned and return an error if not,
+some drivers (e.g. virt_wifi where syzbot reported it) don't have
+it.
+
+Reported-by: syzbot+e8a797964a4180eb57d5@syzkaller.appspotmail.com
+Reported-by: syzbot+34b582cf32c1db008f8e@syzkaller.appspotmail.com
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Link: https://lore.kernel.org/r/20200113125358.ac07f276efff.Ibd85ee1b12e47b9efb00a2adc5cd3fac50da791a@changeid
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/wireless/rdev-ops.h |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/net/wireless/rdev-ops.h
++++ b/net/wireless/rdev-ops.h
+@@ -525,6 +525,10 @@ static inline int
+ rdev_set_wiphy_params(struct cfg80211_registered_device *rdev, u32 changed)
+ {
+       int ret;
++
++      if (!rdev->ops->set_wiphy_params)
++              return -EOPNOTSUPP;
++
+       trace_rdev_set_wiphy_params(&rdev->wiphy, changed);
+       ret = rdev->ops->set_wiphy_params(&rdev->wiphy, changed);
+       trace_rdev_return_int(&rdev->wiphy, ret);
diff --git a/queue-4.9/cw1200-fix-a-signedness-bug-in-cw1200_load_firmware.patch b/queue-4.9/cw1200-fix-a-signedness-bug-in-cw1200_load_firmware.patch
new file mode 100644 (file)
index 0000000..32f6ce4
--- /dev/null
@@ -0,0 +1,39 @@
+From 4a50d454502f1401171ff061a5424583f91266db Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Tue, 1 Oct 2019 14:45:01 +0300
+Subject: cw1200: Fix a signedness bug in cw1200_load_firmware()
+
+From: Dan Carpenter <dan.carpenter@oracle.com>
+
+commit 4a50d454502f1401171ff061a5424583f91266db upstream.
+
+The "priv->hw_type" is an enum and in this context GCC will treat it
+as an unsigned int so the error handling will never trigger.
+
+Fixes: a910e4a94f69 ("cw1200: add driver for the ST-E CW1100 & CW1200 WLAN chipsets")
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/st/cw1200/fwio.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/net/wireless/st/cw1200/fwio.c
++++ b/drivers/net/wireless/st/cw1200/fwio.c
+@@ -323,12 +323,12 @@ int cw1200_load_firmware(struct cw1200_c
+               goto out;
+       }
+-      priv->hw_type = cw1200_get_hw_type(val32, &major_revision);
+-      if (priv->hw_type < 0) {
++      ret = cw1200_get_hw_type(val32, &major_revision);
++      if (ret < 0) {
+               pr_err("Can't deduce hardware type.\n");
+-              ret = -ENOTSUPP;
+               goto out;
+       }
++      priv->hw_type = ret;
+       /* Set DPLL Reg value, and read back to confirm writes work */
+       ret = cw1200_reg_write_32(priv, ST90TDS_TSET_GEN_R_W_REG_ID,
index 559d75357dc6aae864e58652a45ab83f2297b1c4..d28a818b30fe09ed26e96c37752d0529cf4a09e4 100644 (file)
@@ -84,3 +84,6 @@ net-wan-fsl_ucc_hdlc-fix-out-of-bounds-write-on-array-utdm_info.patch
 r8152-add-missing-endpoint-sanity-check.patch
 tcp-fix-marked-lost-packets-not-being-retransmitted.patch
 net-usb-lan78xx-limit-size-of-local-tso-packets.patch
+xen-blkfront-adjust-indentation-in-xlvbd_alloc_gendisk.patch
+cw1200-fix-a-signedness-bug-in-cw1200_load_firmware.patch
+cfg80211-check-for-set_wiphy_params.patch
diff --git a/queue-4.9/xen-blkfront-adjust-indentation-in-xlvbd_alloc_gendisk.patch b/queue-4.9/xen-blkfront-adjust-indentation-in-xlvbd_alloc_gendisk.patch
new file mode 100644 (file)
index 0000000..4577407
--- /dev/null
@@ -0,0 +1,54 @@
+From 589b72894f53124a39d1bb3c0cecaf9dcabac417 Mon Sep 17 00:00:00 2001
+From: Nathan Chancellor <natechancellor@gmail.com>
+Date: Mon, 9 Dec 2019 13:14:44 -0700
+Subject: xen/blkfront: Adjust indentation in xlvbd_alloc_gendisk
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Nathan Chancellor <natechancellor@gmail.com>
+
+commit 589b72894f53124a39d1bb3c0cecaf9dcabac417 upstream.
+
+Clang warns:
+
+../drivers/block/xen-blkfront.c:1117:4: warning: misleading indentation;
+statement is not part of the previous 'if' [-Wmisleading-indentation]
+                nr_parts = PARTS_PER_DISK;
+                ^
+../drivers/block/xen-blkfront.c:1115:3: note: previous statement is here
+                if (err)
+                ^
+
+This is because there is a space at the beginning of this line; remove
+it so that the indentation is consistent according to the Linux kernel
+coding style and clang no longer warns.
+
+While we are here, the previous line has some trailing whitespace; clean
+that up as well.
+
+Fixes: c80a420995e7 ("xen-blkfront: handle Xen major numbers other than XENVBD")
+Link: https://github.com/ClangBuiltLinux/linux/issues/791
+Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
+Reviewed-by: Juergen Gross <jgross@suse.com>
+Acked-by: Roger Pau MonnĂ© <roger.pau@citrix.com>
+Signed-off-by: Juergen Gross <jgross@suse.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/block/xen-blkfront.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/block/xen-blkfront.c
++++ b/drivers/block/xen-blkfront.c
+@@ -1104,8 +1104,8 @@ static int xlvbd_alloc_gendisk(blkif_sec
+       if (!VDEV_IS_EXTENDED(info->vdevice)) {
+               err = xen_translate_vdev(info->vdevice, &minor, &offset);
+               if (err)
+-                      return err;             
+-              nr_parts = PARTS_PER_DISK;
++                      return err;
++              nr_parts = PARTS_PER_DISK;
+       } else {
+               minor = BLKIF_MINOR_EXT(info->vdevice);
+               nr_parts = PARTS_PER_EXT_DISK;