projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ffa12a3
)
x86/xen: Remove undefined behavior in setup_features()
author
Julien Grall
<jgrall@amazon.com>
Fri, 17 Jun 2022 10:30:37 +0000
(11:30 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 29 Jun 2022 07:03:24 +0000
(09:03 +0200)
[ Upstream commit
ecb6237fa397b7b810d798ad19322eca466dbab1
]
1 << 31 is undefined. So switch to 1U << 31.
Fixes: 5ead97c84fa7 ("xen: Core Xen implementation")
Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link:
https://lore.kernel.org/r/20220617103037.57828-1-julien@xen.org
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/xen/features.c
patch
|
blob
|
history
diff --git
a/drivers/xen/features.c
b/drivers/xen/features.c
index 7b591443833c97373ab532819ae9edbde0de225a..87f1828d40d5ede6da81ab0e1a7c838070d106ca 100644
(file)
--- a/
drivers/xen/features.c
+++ b/
drivers/xen/features.c
@@
-42,7
+42,7
@@
void xen_setup_features(void)
if (HYPERVISOR_xen_version(XENVER_get_features, &fi) < 0)
break;
for (j = 0; j < 32; j++)
- xen_features[i * 32 + j] = !!(fi.submap & 1
<<
j);
+ xen_features[i * 32 + j] = !!(fi.submap & 1
U <<
j);
}
if (xen_pv_domain()) {