From 9737d5f55a1a1a77a49e447f963bcbd2b02584de Mon Sep 17 00:00:00 2001 From: Ivan T. Ivanov Date: May 03 2023 12:59:42 +0000 Subject: Merge branch 'users/jslaby/SLE12-SP5/for-next' into SLE12-SP5 Fix conflict in blacklist.conf --- diff --git a/blacklist.conf b/blacklist.conf index 83551fc..3efde30 100644 --- a/blacklist.conf +++ b/blacklist.conf @@ -2797,3 +2797,4 @@ a157802359f7451ed8046b2b6dbaca187797e062 # build cleanup 7e7e1541c91615e9950d0b96bcd1806d297e970e # build cleanup b648ab487f31bc4c38941bc770ea97fe394304bb # we don't have the original commit, nor do we care for 32bit a1ae8d4d9be0178132df7c4931a1ba77d0e76039 # no nvme core/fabric fixes to missing infrastructure +2a587b9ad052e7e92e508aea90c1e2ae433c1908 # ARCH_ASPEED=n diff --git a/patches.suse/ipmi-fix-SSIF-not-responding-under-certain-cond.patch b/patches.suse/ipmi-fix-SSIF-not-responding-under-certain-cond.patch new file mode 100644 index 0000000..4e22b5b --- /dev/null +++ b/patches.suse/ipmi-fix-SSIF-not-responding-under-certain-cond.patch @@ -0,0 +1,73 @@ +From: Zhang Yuchen +Date: Wed, 12 Apr 2023 15:49:07 +0800 +Subject: ipmi: fix SSIF not responding under certain cond. +Git-commit: 6d2555cde2918409b0331560e66f84a0ad4849c6 +Patch-mainline: v6.4-rc1 +References: git-fixes + +The ipmi communication is not restored after a specific version of BMC is +upgraded on our server. +The ipmi driver does not respond after printing the following log: + + ipmi_ssif: Invalid response getting flags: 1c 1 + +I found that after entering this branch, ssif_info->ssif_state always +holds SSIF_GETTING_FLAGS and never return to IDLE. + +As a result, the driver cannot be loaded, because the driver status is +checked during the unload process and must be IDLE in shutdown_ssif(): + + while (ssif_info->ssif_state != SSIF_IDLE) + schedule_timeout(1); + +The process trigger this problem is: + +1. One msg timeout and next msg start send, and call +ssif_set_need_watch(). + +2. ssif_set_need_watch()->watch_timeout()->start_flag_fetch() change +ssif_state to SSIF_GETTING_FLAGS. + +3. In msg_done_handler() ssif_state == SSIF_GETTING_FLAGS, if an error +message is received, the second branch does not modify the ssif_state. + +4. All retry action need IS_SSIF_IDLE() == True. Include retry action in +watch_timeout(), msg_done_handler(). Sending msg does not work either. +SSIF_IDLE is also checked in start_next_msg(). + +5. The only thing that can be triggered in the SSIF driver is +watch_timeout(), after destory_user(), this timer will stop too. + +So, if enter this branch, the ssif_state will remain SSIF_GETTING_FLAGS +and can't send msg, no timer started, can't unload. + +We did a comparative test before and after adding this patch, and the +result is effective. + +Fixes: 259307074bfc ("ipmi: Add SMBus interface driver (SSIF)") + +[js] the constant is named SSIF_NORMAL in 4.* + +Cc: stable@vger.kernel.org +Signed-off-by: Zhang Yuchen +Message-Id: <20230412074907.80046-1-zhangyuchen.lcr@bytedance.com> +Signed-off-by: Corey Minyard +Signed-off-by: Jiri Slaby +--- + drivers/char/ipmi/ipmi_ssif.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/char/ipmi/ipmi_ssif.c ++++ b/drivers/char/ipmi/ipmi_ssif.c +@@ -774,9 +774,9 @@ static void msg_done_handler(struct ssif + } else if (data[0] != (IPMI_NETFN_APP_REQUEST | 1) << 2 + || data[1] != IPMI_GET_MSG_FLAGS_CMD) { + /* +- * Don't abort here, maybe it was a queued +- * response to a previous command. ++ * Recv error response, give up. + */ ++ ssif_info->ssif_state = SSIF_NORMAL; + ipmi_ssif_unlock_cond(ssif_info, flags); + pr_warn(PFX "Invalid response getting flags: %x %x\n", + data[0], data[1]); diff --git a/patches.suse/wifi-ath5k-fix-an-off-by-one-check-in-ath5k_eeprom_r.patch b/patches.suse/wifi-ath5k-fix-an-off-by-one-check-in-ath5k_eeprom_r.patch new file mode 100644 index 0000000..003f84a --- /dev/null +++ b/patches.suse/wifi-ath5k-fix-an-off-by-one-check-in-ath5k_eeprom_r.patch @@ -0,0 +1,32 @@ +From: Dan Carpenter +Date: Mon, 6 Feb 2023 16:15:48 +0300 +Subject: wifi: ath5k: fix an off by one check in ath5k_eeprom_read_freq_list() +Git-commit: 4c856ee12df85aabd437c3836ed9f68d94268358 +Patch-mainline: v6.4-rc1 +References: git-fixes + +This loop checks that i < max at the start of loop but then it does +i++ which could put it past the end of the array. It's harmless to +check again and prevent a potential out of bounds. + +Fixes: 1048643ea94d ("ath5k: Clean up eeprom parsing and add missing calibration data") +Signed-off-by: Dan Carpenter +Reviewed-by: Luis Chamberlain +Signed-off-by: Kalle Valo +Link: https://lore.kernel.org/r/Y+D9hPQrHfWBJhXz@kili +Signed-off-by: Jiri Slaby +--- + drivers/net/wireless/ath/ath5k/eeprom.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/wireless/ath/ath5k/eeprom.c ++++ b/drivers/net/wireless/ath/ath5k/eeprom.c +@@ -529,7 +529,7 @@ ath5k_eeprom_read_freq_list(struct ath5k + ee->ee_n_piers[mode]++; + + freq2 = (val >> 8) & 0xff; +- if (!freq2) ++ if (!freq2 || i >= max) + break; + + pc[i++].freq = ath5k_eeprom_bin2freq(ee, diff --git a/series.conf b/series.conf index 8cefa2d..b9fd73e 100644 --- a/series.conf +++ b/series.conf @@ -63262,6 +63262,8 @@ patches.suse/cgroup-cpuset-Wake-up-cpuset_attach_wq-tasks-in-cpuset_cancel_attach.patch patches.suse/cifs-fix-negotiate-context-parsing.patch patches.suse/powerpc-papr_scm-Update-the-NUMA-distance-table-for-.patch + patches.suse/wifi-ath5k-fix-an-off-by-one-check-in-ath5k_eeprom_r.patch + patches.suse/ipmi-fix-SSIF-not-responding-under-certain-cond.patch # dhowells/linux-fs keys-uefi patches.suse/0001-KEYS-Allow-unrestricted-boot-time-addition-of-keys-t.patch