Patch "KVM: s390: vsie: fix the length of APCB bitmap" has been added to the 5.10-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

    KVM: s390: vsie: fix the length of APCB bitmap

to the 5.10-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:
     kvm-s390-vsie-fix-the-length-of-apcb-bitmap.patch
and it can be found in the queue-5.10 subdirectory.

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



commit f97c4c8574cf7668e778f8caad7b0f8b83e75af4
Author: Pierre Morel <pmorel@xxxxxxxxxxxxx>
Date:   Wed May 10 17:42:58 2023 +0200

    KVM: s390: vsie: fix the length of APCB bitmap
    
    [ Upstream commit 246be7d2720ea9a795b576067ecc5e5c7a1e7848 ]
    
    bit_and() uses the count of bits as the woking length.
    Fix the previous implementation and effectively use
    the right bitmap size.
    
    Fixes: 19fd83a64718 ("KVM: s390: vsie: allow CRYCB FORMAT-1")
    Fixes: 56019f9aca22 ("KVM: s390: vsie: Allow CRYCB FORMAT-2")
    
    Signed-off-by: Pierre Morel <pmorel@xxxxxxxxxxxxx>
    Reviewed-by: Janosch Frank <frankja@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/kvm/20230511094719.9691-1-pmorel@xxxxxxxxxxxxx/
    Signed-off-by: Janosch Frank <frankja@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
index ff58decfef5e8..192eacc8fbb7a 100644
--- a/arch/s390/kvm/vsie.c
+++ b/arch/s390/kvm/vsie.c
@@ -168,7 +168,8 @@ static int setup_apcb00(struct kvm_vcpu *vcpu, unsigned long *apcb_s,
 			    sizeof(struct kvm_s390_apcb0)))
 		return -EFAULT;
 
-	bitmap_and(apcb_s, apcb_s, apcb_h, sizeof(struct kvm_s390_apcb0));
+	bitmap_and(apcb_s, apcb_s, apcb_h,
+		   BITS_PER_BYTE * sizeof(struct kvm_s390_apcb0));
 
 	return 0;
 }
@@ -190,7 +191,8 @@ static int setup_apcb11(struct kvm_vcpu *vcpu, unsigned long *apcb_s,
 			    sizeof(struct kvm_s390_apcb1)))
 		return -EFAULT;
 
-	bitmap_and(apcb_s, apcb_s, apcb_h, sizeof(struct kvm_s390_apcb1));
+	bitmap_and(apcb_s, apcb_s, apcb_h,
+		   BITS_PER_BYTE * sizeof(struct kvm_s390_apcb1));
 
 	return 0;
 }



[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