diff mbox series

console: use more appropriate domain RCU-locking function

Message ID c5aab97e-08d8-c5fb-0898-6f414fdd7a25@suse.com (mailing list archive)
State New, archived
Headers show
Series console: use more appropriate domain RCU-locking function | expand

Commit Message

Jan Beulich March 15, 2023, 7:24 a.m. UTC
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@suse.com>

Comments

Andrew Cooper March 15, 2023, 9:45 a.m. UTC | #1
On 15/03/2023 7:24 am, Jan Beulich wrote:
> 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@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
diff mbox series

Patch

--- a/xen/drivers/char/console.c
+++ b/xen/drivers/char/console.c
@@ -525,7 +525,7 @@  static void __serial_rx(char c, struct c
 #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