Re: [RFC PATCH v12 05/11] time: Add mechanism to recognize clocksource in time_get_snapshot

From
Thomas Gleixner <hidden>
Date
2020-05-28 16:36:21
Also in
kvm, kvmarm, lkml, netdev
Reply to
Jianyong Wu, 2020-05-22
Jianyong Wu [off-list ref] writes:
quoted hunk ↗ jump to hunk
From: Thomas Gleixner <redacted>
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index 7cb09c4cf21c..a8f65b3e4ec8 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -928,6 +928,9 @@ int __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq)
 
 	clocksource_arch_init(cs);
 
+if (WARN_ON_ONCE((unsigned int)cs->id >= CSID_MAX))
+		cs->id = CSID_GENERIC;
+
This is white space damaged and certainly not from me.


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Thread (31 messages) 31 messages, 6 authors, last reply 2020-05-29
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help