Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753065AbcJKUfp (ORCPT ); Tue, 11 Oct 2016 16:35:45 -0400 Received: from gloria.sntech.de ([95.129.55.99]:35154 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752590AbcJKUfg (ORCPT ); Tue, 11 Oct 2016 16:35:36 -0400 From: Heiko Stuebner To: linux-rockchip@lists.infradead.org Cc: Thomas Gleixner , Douglas Anderson , huangtao@rock-chips.com, briannorris@chromium.org, linux-kernel@vger.kernel.org, Andreas Mohr , tony.xie@rock-chips.com, John Stultz Subject: Re: [PATCH v2] timers: Fix usleep_range() in the context of wake_up_process() Date: Tue, 11 Oct 2016 22:34:55 +0200 Message-ID: <147626835.p3yipu2Yfe@phil> User-Agent: KMail/5.2.3 (Linux/4.6.0-1-amd64; KDE/5.25.0; x86_64; ; ) In-Reply-To: References: <1476133442-17757-1-git-send-email-dianders@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1095 Lines: 24 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