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


Groups > linux.kernel > #1499197

Re: [PATCH v2] timers: Fix usleep_range() in the context of wake_up_process()

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod
From Heiko Stuebner <heiko@sntech.de>
Newsgroups linux.kernel
Subject Re: [PATCH v2] timers: Fix usleep_range() in the context of wake_up_process()
Date Tue, 11 Oct 2016 22:40:02 +0200
Message-ID <src0a-2TI-13@gated-at.bofh.it> (permalink)
References <sqQ9k-6f1-17@gated-at.bofh.it> <sqZvX-3En-1@gated-at.bofh.it>
X-Original-To linux-rockchip@lists.infradead.org
User-Agent KMail/5.2.3 (Linux/4.6.0-1-amd64; KDE/5.25.0; x86_64; ; )
MIME-Version 1.0
Content-Transfer-Encoding 7Bit
Content-Type text/plain; charset="us-ascii"
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 24
Organization linux.* mail to news gateway
X-Original-Cc Thomas Gleixner <tglx@linutronix.de>, Douglas Anderson <dianders@chromium.org>, huangtao@rock-chips.com, briannorris@chromium.org, linux-kernel@vger.kernel.org, Andreas Mohr <andi@lisas.de>, tony.xie@rock-chips.com, John Stultz <john.stultz@linaro.org>
X-Original-Date Tue, 11 Oct 2016 22:34:55 +0200
X-Original-Message-ID <147626835.p3yipu2Yfe@phil>
X-Original-References <1476133442-17757-1-git-send-email-dianders@chromium.org> <alpine.DEB.2.20.1610110908240.7794@nanos>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1499197

Show key headers only | View raw


Am Dienstag, 11. Oktober 2016, 09:14:38 CEST schrieb Thomas Gleixner:
> On Mon, 10 Oct 2016, Douglas Anderson wrote:
> > Users of usleep_range() expect that it will _never_ return in less time
> > than the minimum passed parameter.  However, nothing in any of the code
> 
> > ensures this.  Specifically:
> There is no such guarantee for that interface and never has been, so how
> did you make sure that none of the existing users is relying on this?
>
> You can't just can't just declare that all all of the users expect that and
> be done with it.

It may be my personal ignorance for not finding this explained, but the 
function documentation [0] states "min ... Minimum time in usecs to sleep"
which sounds pretty guaranteed to me.

One should of course make sure to not break anything intentionally, but having 
things expect to work outside these parameters sounds somewhat broken

If the specified values are flexible beyond their stated range, I guess the 
documentation should be updated to reflect that.


[0] https://www.kernel.org/doc/htmldocs/device-drivers/API-usleep-range.html

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


Thread

[PATCH v2] timers: Fix usleep_range() in the context of wake_up_process() Douglas Anderson <dianders@chromium.org> - 2016-10-10 23:20 +0200
  Re: [PATCH v2] timers: Fix usleep_range() in the context of wake_up_process() Doug Anderson <dianders@chromium.org> - 2016-10-11 00:40 +0200
  Re: [PATCH v2] timers: Fix usleep_range() in the context of  wake_up_process() Thomas Gleixner <tglx@linutronix.de> - 2016-10-11 09:20 +0200
    Re: [PATCH v2] timers: Fix usleep_range() in the context of wake_up_process() Doug Anderson <dianders@chromium.org> - 2016-10-11 18:40 +0200
      Re: [PATCH v2] timers: Fix usleep_range() in the context of  wake_up_process() Mark Brown <broonie@kernel.org> - 2016-10-12 11:30 +0200
    Re: [PATCH v2] timers: Fix usleep_range() in the context of  wake_up_process() Andreas Mohr <andi@lisas.de> - 2016-10-11 21:00 +0200
      Re: [PATCH v2] timers: Fix usleep_range() in the context of  wake_up_process() Thomas Gleixner <tglx@linutronix.de> - 2016-10-12 15:20 +0200
        Re: [PATCH v2] timers: Fix usleep_range() in the context of wake_up_process() Doug Anderson <dianders@chromium.org> - 2016-10-12 19:40 +0200
    Re: [PATCH v2] timers: Fix usleep_range() in the context of wake_up_process() Heiko Stuebner <heiko@sntech.de> - 2016-10-11 22:40 +0200
  Re: [PATCH v2] timers: Fix usleep_range() in the context of  wake_up_process() Brian Norris <briannorris@chromium.org> - 2016-10-11 21:00 +0200
  Re: [PATCH v2] timers: Fix usleep_range() in the context of  wake_up_process() Andreas Mohr <andi@lisas.de> - 2016-10-11 21:50 +0200
    Re: [PATCH v2] timers: Fix usleep_range() in the context of wake_up_process() Doug Anderson <dianders@chromium.org> - 2016-10-11 22:10 +0200
      Re: [PATCH v2] timers: Fix usleep_range() in the context of  wake_up_process() Andreas Mohr <andi@lisas.de> - 2016-10-11 22:50 +0200
  Re: [v2] timers: Fix usleep_range() in the context of  wake_up_process() Guenter Roeck <linux@roeck-us.net> - 2016-10-12 18:10 +0200
    Re: [v2] timers: Fix usleep_range() in the context of  wake_up_process() Guenter Roeck <linux@roeck-us.net> - 2016-10-12 19:00 +0200
    Re: [v2] timers: Fix usleep_range() in the context of wake_up_process() Doug Anderson <dianders@chromium.org> - 2016-10-12 19:00 +0200

csiph-web