Patch "arm/xen: fix xen_vcpu_info allocation alignment" has been added to the 4.19-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

    arm/xen: fix xen_vcpu_info allocation alignment

to the 4.19-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:
     arm-xen-fix-xen_vcpu_info-allocation-alignment.patch
and it can be found in the queue-4.19 subdirectory.

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



commit 342ce4fb81f222595f0a20984dac594361512c69
Author: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Date:   Wed Nov 22 15:07:41 2023 -0800

    arm/xen: fix xen_vcpu_info allocation alignment
    
    [ Upstream commit 7bf9a6b46549852a37e6d07e52c601c3c706b562 ]
    
    xen_vcpu_info is a percpu area than needs to be mapped by Xen.
    Currently, it could cross a page boundary resulting in Xen being unable
    to map it:
    
    [    0.567318] kernel BUG at arch/arm64/xen/../../arm/xen/enlighten.c:164!
    [    0.574002] Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
    
    Fix the issue by using __alloc_percpu and requesting alignment for the
    memory allocation.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>
    
    Link: https://lore.kernel.org/r/alpine.DEB.2.22.394.2311221501340.2053963@ubuntu-linux-20-04-desktop
    Fixes: 24d5373dda7c ("arm/xen: Use alloc_percpu rather than __alloc_percpu")
    Reviewed-by: Juergen Gross <jgross@xxxxxxxx>
    Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
index dd946c77e8015..1623bfab45131 100644
--- a/arch/arm/xen/enlighten.c
+++ b/arch/arm/xen/enlighten.c
@@ -388,7 +388,8 @@ static int __init xen_guest_init(void)
 	 * for secondary CPUs as they are brought up.
 	 * For uniformity we use VCPUOP_register_vcpu_info even on cpu0.
 	 */
-	xen_vcpu_info = alloc_percpu(struct vcpu_info);
+	xen_vcpu_info = __alloc_percpu(sizeof(struct vcpu_info),
+				       1 << fls(sizeof(struct vcpu_info) - 1));
 	if (xen_vcpu_info == NULL)
 		return -ENOMEM;
 



[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