From: Greg Kroah-Hartman Date: Sat, 2 Jun 2018 13:34:56 +0000 (+0200) Subject: 4.16-stable patches X-Git-Tag: v4.9.106~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f908982c77e59083b755922d60e1fca1d5b3f43a;p=thirdparty%2Fkernel%2Fstable-queue.git 4.16-stable patches 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 --- 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 index 00000000000..f0a1a647d14 --- /dev/null +++ b/queue-4.16/cfg80211-further-limit-wiphy-names-to-64-bytes.patch @@ -0,0 +1,41 @@ +From 814596495dd2b9d4aab92d8f89cf19060d25d2ea Mon Sep 17 00:00:00 2001 +From: Eric Biggers +Date: Mon, 14 May 2018 20:09:24 -0700 +Subject: cfg80211: further limit wiphy names to 64 bytes + +From: Eric Biggers + +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 +Signed-off-by: Johannes Berg +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..10e5bd765d5 --- /dev/null +++ b/queue-4.16/drm-amd-powerplay-fix-enum-mismatch.patch @@ -0,0 +1,74 @@ +From 42b5122e828a6ccd9952ad3116343dc032d33efe Mon Sep 17 00:00:00 2001 +From: Matthias Kaehlcke +Date: Wed, 7 Feb 2018 10:58:43 -0800 +Subject: drm/amd/powerplay: Fix enum mismatch + +From: Matthias Kaehlcke + +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 +Signed-off-by: Matthias Kaehlcke +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..70dfa15a225 --- /dev/null +++ b/queue-4.16/rtlwifi-rtl8192cu-remove-variable-self-assignment-in-rf.c.patch @@ -0,0 +1,44 @@ +From fb239c1209bb0f0b4830cc72507cc2f2d63fadbd Mon Sep 17 00:00:00 2001 +From: Matthias Kaehlcke +Date: Thu, 8 Feb 2018 16:57:12 -0800 +Subject: rtlwifi: rtl8192cu: Remove variable self-assignment in rf.c + +From: Matthias Kaehlcke + +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 +Acked-by: Larry Finger +Reviewed-by: Guenter Roeck +Signed-off-by: Kalle Valo +Signed-off-by: Greg Kroah-Hartman + +--- + 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; + } + } diff --git a/queue-4.16/series b/queue-4.16/series index a6330ae4121..8b585cc9133 100644 --- a/queue-4.16/series +++ b/queue-4.16/series @@ -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