Patch "xenbus: check xen_domain in xenbus_probe_initcall" has been added to the 6.4-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

    xenbus: check xen_domain in xenbus_probe_initcall

to the 6.4-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:
     xenbus-check-xen_domain-in-xenbus_probe_initcall.patch
and it can be found in the queue-6.4 subdirectory.

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



commit 39cce922448d82f5608498b5fada7237962d1b98
Author: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Date:   Fri Jul 21 16:13:03 2023 -0700

    xenbus: check xen_domain in xenbus_probe_initcall
    
    [ Upstream commit 0d8f7cc8057890db08c54fe610d8a94af59da082 ]
    
    The same way we already do in xenbus_init.
    Fixes the following warning:
    
    [  352.175563] Trying to free already-free IRQ 0
    [  352.177355] WARNING: CPU: 1 PID: 88 at kernel/irq/manage.c:1893 free_irq+0xbf/0x350
    [...]
    [  352.213951] Call Trace:
    [  352.214390]  <TASK>
    [  352.214717]  ? __warn+0x81/0x170
    [  352.215436]  ? free_irq+0xbf/0x350
    [  352.215906]  ? report_bug+0x10b/0x200
    [  352.216408]  ? prb_read_valid+0x17/0x20
    [  352.216926]  ? handle_bug+0x44/0x80
    [  352.217409]  ? exc_invalid_op+0x13/0x60
    [  352.217932]  ? asm_exc_invalid_op+0x16/0x20
    [  352.218497]  ? free_irq+0xbf/0x350
    [  352.218979]  ? __pfx_xenbus_probe_thread+0x10/0x10
    [  352.219600]  xenbus_probe+0x7a/0x80
    [  352.221030]  xenbus_probe_thread+0x76/0xc0
    
    Fixes: 5b3353949e89 ("xen: add support for initializing xenstore later as HVM domain")
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>
    Tested-by: Petr Mladek <pmladek@xxxxxxxx>
    Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
    
    Link: https://lore.kernel.org/r/alpine.DEB.2.22.394.2307211609140.3118466@ubuntu-linux-20-04-desktop
    Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
index 58b732dcbfb83..639bf628389ba 100644
--- a/drivers/xen/xenbus/xenbus_probe.c
+++ b/drivers/xen/xenbus/xenbus_probe.c
@@ -811,6 +811,9 @@ static int xenbus_probe_thread(void *unused)
 
 static int __init xenbus_probe_initcall(void)
 {
+	if (!xen_domain())
+		return -ENODEV;
+
 	/*
 	 * Probe XenBus here in the XS_PV case, and also XS_HVM unless we
 	 * need to wait for the platform PCI device to come up or



[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