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

[xen master] console: use more appropriate domain RCU-locking function



commit bdb7a95e6506776aee749d1414c0dd687c01aa10
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Mar 16 13:21:50 2023 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Mar 16 13:21:50 2023 +0100

    console: use more appropriate domain RCU-locking function
    
    While both 19afff14b4cb ("xen: support console_switching between Dom0
    and DomUs on ARM") and 1ee1e4b0d1ff ("xen/arm: Allow vpl011 to be used
    by DomU") were part of the same series (iirc), the latter correctly used
    rcu_lock_domain_by_id() in console_input_domain(), whereas the former
    for some reason used rcu_lock_domain_by_any_id() instead, despite that
    code only kind of open-coding console_input_domain(). There's no point
    here to deal with DOMID_SELF, which is the sole difference between the
    two functions.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/drivers/char/console.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
index e8468c121a..51e5408f21 100644
--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -525,7 +525,7 @@ static void __serial_rx(char c, struct cpu_user_regs *regs)
 #ifdef CONFIG_SBSA_VUART_CONSOLE
     default:
     {
-        struct domain *d = rcu_lock_domain_by_any_id(console_rx - 1);
+        struct domain *d = rcu_lock_domain_by_id(console_rx - 1);
 
         /*
          * If we have a properly initialized vpl011 console for the
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.