Skip to content

Fixing infinite loop on SCLP READ SCP INFO error

Pierre Morel kvm linux-s390 5 versions – Applied

Status from this message: Pushed to devel with the fixup to patch 2.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest2 patches 2 repliesApplied
  2. v42 patches 3 repliesSuperseded
  3. v32 patches 7 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v21 patch2 repliesSuperseded
v11 patch7 repliesSuperseded

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/2s390x: sclp: treat system as single processor when read_info is NULLlib/s390x/sclp.c+9 -20 replies
2/2s390x: sclp: Implement extended-length-SCCB facilitylib/s390x/sclp.c+4 -11 reply

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchNico Boehr
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [kvm-unit-tests PATCH v5 0/2] Fixing infinite loop on SCLP READ SCP INFO error

Aborting on SCLP READ SCP INFO error leads to a deadloop.

The loop is:
abort() -> exit() -> smp_teardown() -> smp_query_num_cpus() -> sclp_get_cpu_num() -> assert() -> abort()

Since smp_setup() is done after sclp_read_info() inside setup() this loop only happens when only the start processor is running. Let sclp_get_cpu_num() return 1 in this case.

Also provide a bigger buffer for SCLP READ INFO when we have the extended-length-SCCB facility.

Pierre

Pierre Morel (2):
s390x: sclp: treat system as single processor when read_info is NULL
s390x: sclp: Implement extended-length-SCCB facility

 lib/s390x/sclp.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)
Signature · 23 lines
2.31.1

since v4:

- changed comments
  (Nico)

- use a big buffer from the start if possible
  (Claudio)

since v3:

- added initial patch and merge with comments
  Sorry for the noise.

since v2:

- use tabs in first patch
  (Nico)

- Added comments

- Added SCLP_RC_INSUFFICIENT_SCCB_LENGTH handling