public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH v3 0/2] Fixing infinite loop on SCLP READ SCP INFO error
@ 2023-05-30 12:40 Pierre Morel
  2023-05-30 12:40 ` [kvm-unit-tests PATCH v3 1/2] s390x: sclp: consider monoprocessor on read_info error Pierre Morel
  2023-05-30 12:40 ` [kvm-unit-tests PATCH v3 2/2] s390x: sclp: Implement SCLP_RC_INSUFFICIENT_SCCB_LENGTH Pierre Morel
  0 siblings, 2 replies; 10+ messages in thread
From: Pierre Morel @ 2023-05-30 12:40 UTC (permalink / raw)
  To: linux-s390; +Cc: frankja, thuth, kvm, imbrenda, david, nrb, nsg, cohuck

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 implement the SCLP_RC_INSUFFICIENT_SCCB_LENGTH handling and
repeat the sclp command.

Pierre Morel (2):
  s390x: sclp: consider monoprocessor on read_info error
  s390x: sclp: Implement SCLP_RC_INSUFFICIENT_SCCB_LENGTH

 lib/s390x/sclp.c | 64 ++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 56 insertions(+), 8 deletions(-)

-- 
2.31.1

since v2:

- use tabs in first patch
  (Nico)

- Added comments

- Added SCLP_RC_INSUFFICIENT_SCCB_LENGTH handling

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-06-01 13:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-30 12:40 [kvm-unit-tests PATCH v3 0/2] Fixing infinite loop on SCLP READ SCP INFO error Pierre Morel
2023-05-30 12:40 ` [kvm-unit-tests PATCH v3 1/2] s390x: sclp: consider monoprocessor on read_info error Pierre Morel
2023-06-01 11:52   ` Nico Boehr
2023-06-01 12:32     ` Pierre Morel
2023-05-30 12:40 ` [kvm-unit-tests PATCH v3 2/2] s390x: sclp: Implement SCLP_RC_INSUFFICIENT_SCCB_LENGTH Pierre Morel
2023-06-01  8:03   ` Janosch Frank
2023-06-01 10:15     ` Pierre Morel
2023-06-01 11:59     ` Nico Boehr
2023-06-01 12:55       ` Pierre Morel
2023-06-01 13:32         ` Janosch Frank

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox