Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1470225

Re: [RFC v4 22/22] timekeeping: inform clockevents about freq adjustments

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [RFC v4 22/22] timekeeping: inform clockevents about freq adjustments
Date 2016-08-25 17:30 +0200
Message-ID <sa4Lo-2LX-29@gated-at.bofh.it> (permalink)
References <s96YV-4v1-5@gated-at.bofh.it> <s96YW-4v1-37@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 23 Aug 2016, Nicolai Stange wrote:
> +	raw_spin_lock_irqsave(&clockevents_lock, flags);
> +	list_for_each_entry(dev, &clockevent_devices, list) {
> +		if (!(dev->features & CLOCK_EVT_FEAT_ONESHOT))
> +			continue;
> +
> +		mult_raw = dev->mult;
> +		if (mult_raw != last_mult_raw) {
> +			last_mult_raw = mult_raw;
> +			last_mult_adjusted =
> +				__clockevents_calc_adjust_freq(mult_raw,
> +							mult_cs_mono,
> +							mult_cs_raw);

What makes sure that the resulting shift/mult pair is still valid after this
adjustment? The non adjusted mult/shift pair might be right at the border of
potential overflows and the adjustment might just put it over the edge....
We need at least sanity checks here.

Thanks,

	tglx

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC v4 22/22] timekeeping: inform clockevents about freq adjustments Nicolai Stange <nicstange@gmail.com> - 2016-08-23 01:40 +0200
  Re: [RFC v4 22/22] timekeeping: inform clockevents about freq adjustments Nicolai Stange <nicstange@gmail.com> - 2016-08-24 11:50 +0200
  Re: [RFC v4 22/22] timekeeping: inform clockevents about freq  adjustments Thomas Gleixner <tglx@linutronix.de> - 2016-08-25 17:10 +0200
  Re: [RFC v4 22/22] timekeeping: inform clockevents about freq  adjustments Thomas Gleixner <tglx@linutronix.de> - 2016-08-25 17:30 +0200

csiph-web