[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] console: use more appropriate domain RCU-locking function
- To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Wed, 15 Mar 2023 08:24:20 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=zy43YTDBLchV6lc1Ez9wzpmHlHRHzwz/MU0HLqd7/t4=; b=HNhrZ6F9+bYF7eITvxpawp8bYSmzrKj1YTOQS1LUZxlEgeoFvZGtaRejC6ssZlakvPL6TljwOHPDm0XFe+QTp+NT6z6vv/NuR/P2SvhrKhtMx5gazNVX/e+TCn0qqo6lT9YB4mOYpcO2m1KBddUnntZg9Fbk++SxQ3peg+p1zZr6TnSl8dfxRCXvl5zR/DEsNq21ph/r+fpm+oDplWqWWXGpSoM1UbvLhgvTppmy7RjOHxtRJfKOVxzjlpif7Sn6RW+/oSjXUdHd9W+IhT+iIQetU+xwyrhgwFPpSWuze3woCWFG6YnWCW1NasC6n/PzXJ/edKR/C/iCaoqDWUNaQw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CNaNuoY4VM8ewDmseUKih7nXLwWLmmGS1BLb/6rL09JRY+OGWyXd/kVgoOwx5z0ABqYb7VgFXxu3c+eLxMfntZAbzsz0NwXg3XQtxr6/fbdtOBAiGFOE5LLJjRLi/YUmHXmwfZRTIdP7h5EUVSBq9U+Bzd1xy0m+gaYHWnevj1w8gBGe5WMrK/LJSYpjmesCULsEPex64ZgRJUWlE1y+JU9iHUY7cyZnfWnJw7fRTxZ/57V05Yfg/bnwpAUtudaM73/PoNxs1zvSJ0mlg/EeAtLw0Ld6Bv5eAzww8usmQY/eliXlLus/dZ+QETYmAjTugwEq6brFQuERMo5pvGn6dA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Wed, 15 Mar 2023 07:24:43 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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>
--- 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
|