Patch "s390/ap: fix status returned by ap_aqic()" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    s390/ap: fix status returned by ap_aqic()

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     s390-ap-fix-status-returned-by-ap_aqic.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e8900476976569613a5b5246bca8eca09c97e591
Author: Halil Pasic <pasic@xxxxxxxxxxxxx>
Date:   Thu Feb 9 00:00:23 2023 +0100

    s390/ap: fix status returned by ap_aqic()
    
    [ Upstream commit 394740d7645ea767795074287769dd26dbd4d782 ]
    
    There function ap_aqic() tries to grab the status from the
    wrong part of the register. Thus we always end up with
    zeros. Which is wrong, among others, because we detect
    failures via status.response_code.
    
    Signed-off-by: Halil Pasic <pasic@xxxxxxxxxxxxx>
    Reported-by: Janosch Frank <frankja@xxxxxxxxxxxxx>
    Fixes: 159491f3b509 ("s390/ap: rework assembler functions to use unions for in/out register variables")
    Reviewed-by: Harald Freudenberger <freude@xxxxxxxxxxxxx>
    Signed-off-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/s390/include/asm/ap.h b/arch/s390/include/asm/ap.h
index 3afbee21dc1f1..8a8c0b157b551 100644
--- a/arch/s390/include/asm/ap.h
+++ b/arch/s390/include/asm/ap.h
@@ -236,7 +236,10 @@ static inline struct ap_queue_status ap_aqic(ap_qid_t qid,
 	union {
 		unsigned long value;
 		struct ap_qirq_ctrl qirqctrl;
-		struct ap_queue_status status;
+		struct {
+			u32 _pad;
+			struct ap_queue_status status;
+		};
 	} reg1;
 	void *reg2 = ind;
 
@@ -250,7 +253,7 @@ static inline struct ap_queue_status ap_aqic(ap_qid_t qid,
 		"	lgr	%[reg1],1\n"   /* gr1 (status) into reg1 */
 		: [reg1] "+&d" (reg1)
 		: [reg0] "d" (reg0), [reg2] "d" (reg2)
-		: "cc", "0", "1", "2");
+		: "cc", "memory", "0", "1", "2");
 
 	return reg1.status;
 }



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux