On 06.12.2024 05:41, Denis Mukhin via B4 Relay wrote: > console_input_domain() takes an RCU lock to protect domain structure. > That implies call to rcu_unlock_domain() after use. > > Rename console_input_domain() to rcu_lock_domain_console_owner() to > highlight the need of calling rcu_unlock_domain().
While I can see where you're coming from, ... > --- a/xen/drivers/char/console.c > +++ b/xen/drivers/char/console.c > @@ -477,7 +477,7 @@ static unsigned int __read_mostly console_rx = 0; > > #ifdef CONFIG_SBSA_VUART_CONSOLE > /* Make sure to rcu_unlock_domain after use */ > -struct domain *console_input_domain(void) > +struct domain *rcu_lock_domain_console_owner(void) > { > if ( console_rx == 0 ) > return NULL; ... the new name no longer expresses that a domain pointer is being returned (out of thin air). I'm uncertain this is an improvement. Jan