Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751638AbdGYSB6 (ORCPT ); Tue, 25 Jul 2017 14:01:58 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:41731 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751427AbdGYSB4 (ORCPT ); Tue, 25 Jul 2017 14:01:56 -0400 X-ME-Sender: X-Sasl-enc: ctLER3ik1R+hQTTXl1fxqLULpNOj1pt2y9INbV3cWWbz 1501005715 Date: Tue, 25 Jul 2017 11:01:48 -0700 From: Greg KH To: Thomas Gleixner Cc: Greg Hackmann , John Stultz , Ben Fennema , linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] alarmtimer: don't rate limit one-shot timers Message-ID: <20170725180148.GA24730@kroah.com> References: <20170724171924.27898-1-ghackmann@google.com> <20170724182122.GA6539@kroah.com> <65899e6a-c881-3d68-4f72-78df597a38c5@google.com> <20170724215544.GA20404@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2078 Lines: 53 On Tue, Jul 25, 2017 at 09:00:42AM +0200, Thomas Gleixner wrote: > On Mon, 24 Jul 2017, Greg KH wrote: > > > On Mon, Jul 24, 2017 at 02:41:10PM -0700, Greg Hackmann wrote: > > > On 07/24/2017 11:21 AM, Greg KH wrote: > > > > On Mon, Jul 24, 2017 at 10:19:24AM -0700, Greg Hackmann wrote: > > > > > Commit ff86bf0c65f1 ("alarmtimer: Rate limit periodic intervals") sets a > > > > > minimum bound on the alarm timer interval. This minimum bound shouldn't > > > > > be applied if the interval is 0. Otherwise, one-shot timers will be > > > > > converted into periodic ones. > > > > > > > > > > This patch is against 4.9.39, and is only needed in -stable trees. > > > > > 4.13-rc2 isn't impacted due to a later refactoring. > > > > > > > > What refactoring patch fixed this up? > > > > > > f2c45807d399 ("alarmtimer: Switch over to generic set/get/rearm routine") > > > > Ick, yeah, that's not a stable patch :) > > > > > > As this was a 4.12 patch, 4.12-stable needs this fix as well, right? > > > > > > Looks like it, but I haven't actually tried 4.12 yet to confirm. > > > > > > > Also, was there some test-case that you caught this with that perhaps > > > > could be added to LTP or kselftests? > > > > > > Unfortunately not a direct testcase. This first showed up as a regression > > > in AOSP's userspace Bluetooth stack, which uses CLOCK_BOOTTIME_ALARM > > > internally. > > > > > > I'm working on a patch to add one-shot timer testcases to set-timer-lat.c, > > > which would have caught this. (I wrote a very rough test program to make > > > sure this patch fixes the regression, but set-timer-lat.c already exists and > > > is more comprehensive.) > > > > Ok, thanks for the information. > > > > John and Thomas, any objection for me to take the original patch here in > > the stable trees to fix this issue? > > No. I borked that when I was 'fixing' that DoS issue :( > > Reviewed-by: Thomas Gleixner Thanks for the review. Greg, can you provide a version of this for 4.12-stable? It doesn't apply there as-is. thanks, greg k-h