s390-tools/s390-tools-Additional-update-01.patch
Nikolay Gueorguiev d7162287c1 - Upgrade s390-tools to 2.37 (jsc#PED-9591, jsc#PED-10303, jesc#PED-11870 (jsc#IBM-1062))
* Changes of existing tools:
    dbginfo.sh: Add details on CPU-measurement
    dbginfo.sh: Add new crypto command
    dbginfo.sh: Add overview commands and crypto update
    dbginfo.sh: Adding kdump info
    dbginfo.sh: Removing outdated email references
    dbginfo.sh: Rework network section
    dbginfo.sh: Update copyright 2nd year
    pvimg: Add '--(enable|disable)-image-encryption' flags to 'pvimg create'
    pvimg: Add '--cck ' command line option and make '--comm-key' an alias
    pvimg: Add '--hdr-key' command line option to 'pvimg create'
    pvimg: Rename '--key' into '--hdr-key' and use '--key' as an alias (for 'pvimg info')
    pvsecret: Add support for retrievable secrets
    ziorep_config: Add PCHID field to adapter report
    ziorep_traffic: Add DEVBUSID column to traffic report
    ziorep_utilization: Add --fcp-device parameter to print virtual adapter report
    ziorep_utilization: Add PCHID column to physical adapter report
    ziorep_utilization: Now prints only physical adapter report by default
    ziorep_utilization: Swap Bus-ID and CHPID columns in virtual adapter report
    zipl/boot: Increase section size for eckd_mv dumper
    zkey: Add support for listing and importing protected virtualization secrets
  * Bug Fixes:
    chpstat: Fix invalid utilization data on older kernels
    opticsmon: Fix runaway loop in on_link_change()
    zipl: Update inline assembly for GCC 15
    zipl_helper.device-mapper: Add missed step in logical device resolution
- Revendored vendor.tar.gz
- Removed obsolete patches:
  * s390-tools-01-zipl_helper.device-mapper-add-missed-step-in-logical.patch
  * s390-tools-02-zipl-src-fix-imprecise-check-that-file-is-on-specifi.patch
  * s390-tools-General-update-01.patch
  * s390-tools-General-update-02.patch
  * s390-tools-General-update-03.patch
  * s390-tools-General-update-04.patch
  * s390-tools-General-update-05.patch
  * s390-tools-General-update-06.patch
  * s390-tools-General-update-07.patch
  * s390-tools-General-update-08.patch
  * s390-tools-General-update-09.patch
  * s390-tools-General-update-10.patch
  * s390-tools-General-update-11.patch
  * s390-tools-General-update-12.patch
  * s390-tools-Additional-update-01.patch
  * s390-tools-Additional-update-02.patch
  * s390-tools-pvimg-info-command-01.patch
  * s390-tools-pvimg-info-command-02.patch
  * s390-tools-pvimg-info-command-03.patch
  * s390-tools-Support-unencrypted-SE-images-01.patch
  * s390-tools-pvimg-info-command-04.patch
  * s390-tools-pvimg-additional-01.patch
  * s390-tools-01-zkey-Add-support-for-retrieving-a-list-of-ultravisor-secrets.patch
  * s390-tools-02-zkey-Add-the--pvsecrets-list-command.patch
  * s390-tools-03-zkey-Add-PVSECRETS-AES-key-type.patch
  * s390-tools-04-zkey-Add-the-pvsecrets-import-command.patch
  * s390-tools-05-zkey-Reject-key-generation-and-APQN-association-for-PVSECRET-AES-keys.patch
  * s390-tools-06-zkey-Reject-re-enciphering-of-PVSECRET-AES-keys.patch
  * s390-tools-07-zkey-Support-validation-of-key-of-type-PVSECRET-AES.patch
  * s390-tools-08-rust-pvimg-Fix-flag-parsing-for-allowing-dump.patch
  * s390-tools-09-rust-pvimg-Document-the-change-from--comm-key-to--cck.patch

OBS-URL: https://build.opensuse.org/package/show/Base:System/s390-tools?expand=0&rev=249
2025-02-10 08:51:00 +00:00

65 lines
2.1 KiB
Diff

From dff965465ca9d9c4edaf0f90eadd9a6de335b354 Mon Sep 17 00:00:00 2001
From: Niklas Schnelle <schnelle@linux.ibm.com>
Date: Fri, 6 Dec 2024 15:28:08 +0100
Subject: [PATCH] opticsmon: Fix runaway loop in on_link_change()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When on_link_change() gets called with a netdev that would be monitored
but hasn't entered zpci_list yet, reloads is 1 after the loops and
a reload occurs. Then the netdev is found in the list and reloads
becomes -1 which incorrectly triggers more reloads until underflow.
Fix this by returning once the device is found. Also just check for
reloads being larger than zero.
Fixes: c34adb9cabee ("opticsmon: Introduce opticsmon tool")
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
---
opticsmon/opticsmon.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/opticsmon/opticsmon.c b/opticsmon/opticsmon.c
index c2f355e2..50dd8d7f 100644
--- a/opticsmon/opticsmon.c
+++ b/opticsmon/opticsmon.c
@@ -280,16 +280,15 @@ void on_link_change(struct zpci_netdev *netdev, void *arg)
if (!ctx->zpci_list || util_list_is_empty(ctx->zpci_list))
zpci_list_reload(&ctx->zpci_list);
-reload:
+find:
util_list_iterate(ctx->zpci_list, zdev) {
for (i = 0; i < zdev->num_netdevs; i++) {
if (!strcmp(zdev->netdevs[i].name, netdev->name)) {
- reloads--;
/* Skip data collection if operational state is
* unchanged
*/
if (zdev->netdevs[i].operstate == netdev->operstate)
- continue;
+ return;
/* Update operation state for VFs even though
* they are skipped just for a consistent view
*/
@@ -297,14 +296,15 @@ void on_link_change(struct zpci_netdev *netdev, void *arg)
/* Only collect optics data for PFs */
if (!zpci_is_vf(zdev))
dump_adapter_data(ctx, zdev);
+ return;
}
}
}
/* Might be a new device, reload list of devices and retry */
- if (reloads) {
+ if (reloads > 0) {
zpci_list_reload(&ctx->zpci_list);
reloads--;
- goto reload;
+ goto find;
}
}