[SRU][Cosmic][Bionic][Xenial][PATCH 0/1] Fixes for LP1801686

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[SRU][Cosmic][Bionic][Xenial][PATCH 0/1] Fixes for LP1801686

Frank Heimes

== SRU Justification ==

Description: qdio: reset old sbal_state flags

Symptom:
   af_iucv socket using HiperSockets may stall.
Problem:
   When allocating a new AOB fails, handle_outbound() is
still capable of transmitting the selected buffer
(just without async completion).
But if a previous transfer on this queue slot used
async completion, its sbal_state flags field is still set
to QDIO_OUTBUF_STATE_FLAG_PENDING.
So when the upper layer driver sees this stale flag, it
expects an async completion that never happens.
Solution:
   Unconditionally clear the buffer's flags field.

== Fix ==

64e03ff72623b8c2ea89ca3cb660094e019ed4ae ("s390/qdio: reset old sbal_state flags")

== Regression Potential ==

Low, because:
- s390x only
- further limited to qeth driver (OSA Express networking)
- changes are limited to two files and 6 lines
   - arch/s390/include/asm/qdio.h b/arch/s390/include/asm/qdio.h
   - drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c
- error was identified at IBM/customer, fix was created there and tested upfront
- (changes are upstream in 4.20 (according to bug description,
   but in 4.19 according to 'git tag'),
   hence will make it automatically into 'disco')

== Test Case ==

Test case / reproduction:
Error inject and then simulate out-of-memory situation.

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[SRU][Bionic][PATCH 1/1] s390/qdio: reset old sbal_state flags

Frank Heimes
From: Julian Wiedmann <[hidden email]>


s390/qdio: reset old sbal_state flags
    
When allocating a new AOB fails, handle_outbound() is still capable of
transmitting the selected buffer (just without async completion).
    
But if a previous transfer on this queue slot used async completion, its
sbal_state flags field is still set to QDIO_OUTBUF_STATE_FLAG_PENDING.
So when the upper layer driver sees this stale flag, it expects an async
completion that never happens.
    
Fix this by unconditionally clearing the flags field.
    
Fixes: 104ea556ee7f ("qdio: support asynchronous delivery of storage blocks")
Cc: <[hidden email]> #v3.2+
Signed-off-by: Julian Wiedmann <[hidden email]>
Signed-off-by: Martin Schwidefsky <[hidden email]>
(cherry picked from commit 64e03ff72623b8c2ea89ca3cb660094e019ed4ae)
Signed-off-by: Frank Heimes <[hidden email]>

---

diff --git a/arch/s390/include/asm/qdio.h b/arch/s390/include/asm/qdio.h
index de11ecc..9c9970a 100644
--- a/arch/s390/include/asm/qdio.h
+++ b/arch/s390/include/asm/qdio.h
@@ -262,7 +262,6 @@ struct qdio_outbuf_state {
        void *user;
 };
 
-#define QDIO_OUTBUF_STATE_FLAG_NONE    0x00
 #define QDIO_OUTBUF_STATE_FLAG_PENDING 0x01
 
 #define CHSC_AC1_INITIATE_INPUTQ       0x80
diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c
index f4ca72d..9c7d9da 100644
--- a/drivers/s390/cio/qdio_main.c
+++ b/drivers/s390/cio/qdio_main.c
@@ -631,21 +631,20 @@ static inline unsigned long qdio_aob_for_buffer(struct qdio_output_q *q,
        unsigned long phys_aob = 0;
 
        if (!q->use_cq)
-               goto out;
+               return 0;
 
        if (!q->aobs[bufnr]) {
                struct qaob *aob = qdio_allocate_aob();
                q->aobs[bufnr] = aob;
        }
        if (q->aobs[bufnr]) {
-               q->sbal_state[bufnr].flags = QDIO_OUTBUF_STATE_FLAG_NONE;
                q->sbal_state[bufnr].aob = q->aobs[bufnr];
                q->aobs[bufnr]->user1 = (u64) q->sbal_state[bufnr].user;
                phys_aob = virt_to_phys(q->aobs[bufnr]);
                WARN_ON_ONCE(phys_aob & 0xFF);
        }
 
-out:
+       q->sbal_state[bufnr].flags = 0;
        return phys_aob;
 }


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

NAK: [SRU][Cosmic][Bionic][Xenial][PATCH 0/1] Fixes for LP1801686

Frank Heimes
In reply to this post by Frank Heimes
NAK because the PATCH subject only mentioned bionic - cosmic and xenial (as stated in the main SRU mail) were missing on the patch.

resubmitting with corrections as v2

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team