]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.16-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 Jun 2018 13:34:56 +0000 (15:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 Jun 2018 13:34:56 +0000 (15:34 +0200)
added patches:
cfg80211-further-limit-wiphy-names-to-64-bytes.patch
drm-amd-powerplay-fix-enum-mismatch.patch
rtlwifi-rtl8192cu-remove-variable-self-assignment-in-rf.c.patch

queue-4.16/cfg80211-further-limit-wiphy-names-to-64-bytes.patch [new file with mode: 0644]
queue-4.16/drm-amd-powerplay-fix-enum-mismatch.patch [new file with mode: 0644]
queue-4.16/rtlwifi-rtl8192cu-remove-variable-self-assignment-in-rf.c.patch [new file with mode: 0644]
queue-4.16/series

diff --git a/queue-4.16/cfg80211-further-limit-wiphy-names-to-64-bytes.patch b/queue-4.16/cfg80211-further-limit-wiphy-names-to-64-bytes.patch
new file mode 100644 (file)
index 0000000..f0a1a64
--- /dev/null
@@ -0,0 +1,41 @@
+From 814596495dd2b9d4aab92d8f89cf19060d25d2ea Mon Sep 17 00:00:00 2001
+From: Eric Biggers <ebiggers@google.com>
+Date: Mon, 14 May 2018 20:09:24 -0700
+Subject: cfg80211: further limit wiphy names to 64 bytes
+
+From: Eric Biggers <ebiggers@google.com>
+
+commit 814596495dd2b9d4aab92d8f89cf19060d25d2ea upstream.
+
+wiphy names were recently limited to 128 bytes by commit a7cfebcb7594
+("cfg80211: limit wiphy names to 128 bytes").  As it turns out though,
+this isn't sufficient because dev_vprintk_emit() needs the syslog header
+string "SUBSYSTEM=ieee80211\0DEVICE=+ieee80211:$devname" to fit into 128
+bytes.  This triggered the "device/subsystem name too long" WARN when
+the device name was >= 90 bytes.  As before, this was reproduced by
+syzbot by sending an HWSIM_CMD_NEW_RADIO command to the MAC80211_HWSIM
+generic netlink family.
+
+Fix it by further limiting wiphy names to 64 bytes.
+
+Reported-by: syzbot+e64565577af34b3768dc@syzkaller.appspotmail.com
+Fixes: a7cfebcb7594 ("cfg80211: limit wiphy names to 128 bytes")
+Signed-off-by: Eric Biggers <ebiggers@google.com>
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ include/uapi/linux/nl80211.h |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/include/uapi/linux/nl80211.h
++++ b/include/uapi/linux/nl80211.h
+@@ -2618,7 +2618,7 @@ enum nl80211_attrs {
+ #define NL80211_ATTR_KEYS NL80211_ATTR_KEYS
+ #define NL80211_ATTR_FEATURE_FLAGS NL80211_ATTR_FEATURE_FLAGS
+-#define NL80211_WIPHY_NAME_MAXLEN             128
++#define NL80211_WIPHY_NAME_MAXLEN             64
+ #define NL80211_MAX_SUPP_RATES                        32
+ #define NL80211_MAX_SUPP_HT_RATES             77
diff --git a/queue-4.16/drm-amd-powerplay-fix-enum-mismatch.patch b/queue-4.16/drm-amd-powerplay-fix-enum-mismatch.patch
new file mode 100644 (file)
index 0000000..10e5bd7
--- /dev/null
@@ -0,0 +1,74 @@
+From 42b5122e828a6ccd9952ad3116343dc032d33efe Mon Sep 17 00:00:00 2001
+From: Matthias Kaehlcke <mka@chromium.org>
+Date: Wed, 7 Feb 2018 10:58:43 -0800
+Subject: drm/amd/powerplay: Fix enum mismatch
+
+From: Matthias Kaehlcke <mka@chromium.org>
+
+commit 42b5122e828a6ccd9952ad3116343dc032d33efe upstream.
+
+In several locations the driver uses AMD_CG_STATE_UNGATE (type enum
+amd_clockgating_state) instead of AMD_PG_STATE_UNGATE (type enum
+amd_powergating_stat) and vice versa. Both constants have the same
+value, so this doesn't cause any problems, but we still want to pass
+the correct type.
+
+Fixing the mismatch resolves multiple warnings like this when building
+with clang:
+
+drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/cz_clockpowergating.c:169:7:
+  error: implicit conversion from enumeration type 'enum
+  amd_powergating_state' to different enumeration type 'enum
+  amd_clockgating_state' [-Werror,-Wenum-conversion]
+    AMD_PG_STATE_UNGATE);
+
+Reviewed-by: Guenter Roeck <groeck@chromium.org>
+Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/amd/powerplay/hwmgr/cz_clockpowergating.c   |    8 ++++----
+ drivers/gpu/drm/amd/powerplay/hwmgr/smu7_clockpowergating.c |    2 +-
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_clockpowergating.c
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/cz_clockpowergating.c
+@@ -166,10 +166,10 @@ void cz_dpm_powergate_uvd(struct pp_hwmg
+               cz_dpm_powerup_uvd(hwmgr);
+               cgs_set_clockgating_state(hwmgr->device,
+                                               AMD_IP_BLOCK_TYPE_UVD,
+-                                              AMD_PG_STATE_UNGATE);
++                                              AMD_CG_STATE_UNGATE);
+               cgs_set_powergating_state(hwmgr->device,
+                                               AMD_IP_BLOCK_TYPE_UVD,
+-                                              AMD_CG_STATE_UNGATE);
++                                              AMD_PG_STATE_UNGATE);
+               cz_dpm_update_uvd_dpm(hwmgr, false);
+       }
+@@ -197,11 +197,11 @@ void cz_dpm_powergate_vce(struct pp_hwmg
+               cgs_set_clockgating_state(
+                                       hwmgr->device,
+                                       AMD_IP_BLOCK_TYPE_VCE,
+-                                      AMD_PG_STATE_UNGATE);
++                                      AMD_CG_STATE_UNGATE);
+               cgs_set_powergating_state(
+                                       hwmgr->device,
+                                       AMD_IP_BLOCK_TYPE_VCE,
+-                                      AMD_CG_STATE_UNGATE);
++                                      AMD_PG_STATE_UNGATE);
+               cz_dpm_update_vce_dpm(hwmgr);
+               cz_enable_disable_vce_dpm(hwmgr, true);
+       }
+--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_clockpowergating.c
++++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_clockpowergating.c
+@@ -162,7 +162,7 @@ void smu7_powergate_uvd(struct pp_hwmgr
+                               AMD_CG_STATE_UNGATE);
+               cgs_set_powergating_state(hwmgr->device,
+                                               AMD_IP_BLOCK_TYPE_UVD,
+-                                              AMD_CG_STATE_UNGATE);
++                                              AMD_PG_STATE_UNGATE);
+               smu7_update_uvd_dpm(hwmgr, false);
+       }
diff --git a/queue-4.16/rtlwifi-rtl8192cu-remove-variable-self-assignment-in-rf.c.patch b/queue-4.16/rtlwifi-rtl8192cu-remove-variable-self-assignment-in-rf.c.patch
new file mode 100644 (file)
index 0000000..70dfa15
--- /dev/null
@@ -0,0 +1,44 @@
+From fb239c1209bb0f0b4830cc72507cc2f2d63fadbd Mon Sep 17 00:00:00 2001
+From: Matthias Kaehlcke <mka@chromium.org>
+Date: Thu, 8 Feb 2018 16:57:12 -0800
+Subject: rtlwifi: rtl8192cu: Remove variable self-assignment in rf.c
+
+From: Matthias Kaehlcke <mka@chromium.org>
+
+commit fb239c1209bb0f0b4830cc72507cc2f2d63fadbd upstream.
+
+In _rtl92c_get_txpower_writeval_by_regulatory() the variable writeVal
+is assigned to itself in an if ... else statement, apparently only to
+document that the branch condition is handled and that a previously read
+value should be returned unmodified. The self-assignment causes clang to
+raise the following warning:
+
+drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.c:304:13:
+  error: explicitly assigning value of variable of type 'u32'
+    (aka 'unsigned int') to itself [-Werror,-Wself-assign]
+  writeVal = writeVal;
+
+Delete the branch with the self-assignment.
+
+Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
+Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
+Reviewed-by: Guenter Roeck <groeck@chromium.org>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.c |    3 ---
+ 1 file changed, 3 deletions(-)
+
+--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.c
++++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/rf.c
+@@ -299,9 +299,6 @@ static void _rtl92c_get_txpower_writeval
+                       writeVal = 0x00000000;
+               if (rtlpriv->dm.dynamic_txhighpower_lvl == TXHIGHPWRLEVEL_BT1)
+                       writeVal = writeVal - 0x06060606;
+-              else if (rtlpriv->dm.dynamic_txhighpower_lvl ==
+-                       TXHIGHPWRLEVEL_BT2)
+-                      writeVal = writeVal;
+               *(p_outwriteval + rf) = writeVal;
+       }
+ }
index a6330ae4121c13527ccf1391fcc57af4210c49b0..8b585cc91335a67c7ae288002bb58c2de694746f 100644 (file)
@@ -19,3 +19,6 @@ tracing-fix-crash-when-freeing-instances-with-event-triggers.patch
 tracing-make-the-snapshot-trigger-work-with-instances.patch
 nvme-fix-extended-data-lba-supported-setting.patch
 selinux-kasan-slab-out-of-bounds-in-xattr_getsecurity.patch
+cfg80211-further-limit-wiphy-names-to-64-bytes.patch
+drm-amd-powerplay-fix-enum-mismatch.patch
+rtlwifi-rtl8192cu-remove-variable-self-assignment-in-rf.c.patch