Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp484181lqp; Mon, 10 Jun 2024 09:45:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVT9ulMzJDbvwHSEmuMqK9ihVQFrctQ9blMW+pUWZBVgNanQbEgFEb3axeDscppXmZZCzJRloDUKZV6tHQLi7EXrY2Fv6jz1rrE3dF46Q== X-Google-Smtp-Source: AGHT+IFTRQKMSn40dswzZwi0Dw1GUBHQ4C0yibMklGZYYPnpNJ8nQp/PSr2DNDcGBujJSj1J7GKr X-Received: by 2002:a05:620a:24d3:b0:795:4b88:71c2 with SMTP id af79cd13be357-7954b887748mr986237485a.55.1718037956595; Mon, 10 Jun 2024 09:45:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718037956; cv=pass; d=google.com; s=arc-20160816; b=LtfxeQemK+OaUfBR3D/64+V+k/nHcdAqYCBUp7PY6p838sVumdq2cWFU1LmZGFQhp5 kyypISufKsick05S68QTker7Sgd7pszSk9JiNkrnlxcFf+wKhkDdvwL2RVtVLnt5G5Q7 8cvPjvwB9y4n+PmnfEwXB0paf37bIzxwtrrPgLFMUe+0he5r5rxHpI+GuOMDKjywGQmi ziVdt2T5HQWByqhDW/DQ6dzUR6dpOsU4+boFtQYj9UoIVm3vWQk6S9cuMiApYSIw2oaV QXvwX9trVL8sawYD8i4qoqWD9YHSbvm4yRuNUc6zr6PkBMotck9Nv/uP1klR6NFmRfcO 2STg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=date:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:subject:cc:to:from:dkim-signature :dkim-signature:message-id; bh=eV59jzwlnvMqC78q7RxRP7GMuITiFT7fNLVqSGWWbAc=; fh=joBs/8L+orz77ylyCy6wqNwwi35f7sYhLR+/TQjQjhI=; b=rLD2hJq09IXMSjfexOr/8Y884w20YbbJbVgy6UV5rgPWckdVO1EY+jWgG9n3Thrz1y LqU2HSnGSx8yzYhEQzwb0/ibsOnTNCci7VW1aNR27W+Hzh4s4tEhP0A+dQZW3NnhlkS4 0APgOSkl646uJF7j8kx4qjxPG8NB94weW9eeucw6novPuaDII0rG7my0F5b+LN3IbvpL N0CDdlzTZ6BgEiGdcs08oBTCUkTDBHEBvJ5kVAfbnXsbJu6/aeVmZZ6OtZVRFcLaiUbS 7q7RBNNgf6r8/pDPQO1rjheGn9w05cxOmLoHSyE4tXKtcxTU+FdwRpld4zrz9xPw8KU4 wCuw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ldNp+pKS; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="2GLc07W/"; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-208581-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208581-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-7955d6e6785si435394385a.385.2024.06.10.09.45.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 09:45:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208581-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ldNp+pKS; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="2GLc07W/"; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-208581-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208581-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5470B1C21E21 for ; Mon, 10 Jun 2024 16:45:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D2E0154435; Mon, 10 Jun 2024 16:42:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ldNp+pKS"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="2GLc07W/" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1605A153578 for ; Mon, 10 Jun 2024 16:42:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718037750; cv=none; b=PJi2bOmCr8TZ69oRCe+awiJD4WfI850gKIre/iNHGOdvT8cSUZgJ+luoAkEQWXuoZDLIri4sGuk/NzEyasHvmaiV5h5QZwpvdmHrmdIPUBwWsCSMHM0RVdFIZDcqR9yrbyE3Qc+WKkfxhtecPGi7ACuWrjsA6xWtXTyctzTWt6A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718037750; c=relaxed/simple; bh=9JR/luG7t5T3jOUPOePLWiqmKbhtO9ZuNt63a7+o1js=; h=Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type:Date; b=maxbyeithGO6T3ENrBxmfARjxSQ1YgTRq+UtjYP21n1Up/68qXBy7YDOKAu7EmGcKMR1iywXNhUrQ/XCsXr6Ee4bi3Nv5R4S1hVhZMhpghQM2rjPLLM6LrfU60wqP4qO1XzK5twF3zflYBJUbrwNfZV/YbT5bGjbFDRJoOuXb7g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ldNp+pKS; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=2GLc07W/; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Message-ID: <20240610164026.619295826@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1718037747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=eV59jzwlnvMqC78q7RxRP7GMuITiFT7fNLVqSGWWbAc=; b=ldNp+pKSOjumUCc8JiN09WC9SCJGBNvPHmdVuJkrjKTZ205Vxbw9jINxVKQDaDo/DVLYyC tlRCWB/bmfjl0YG6fX00qwHpJNeiQ/aXfkFeGE7WxSJ5hMNmqQIRC+PWtL5fy3keHidbla W/r1wZoU9JeGQTrj0O7xHKLQZR6K4Xybi0p3pJdaRAkl0j7LNTacxEAcRgBJCW+C6BSsHn 17VUiJ1j/U5o6BgjZYA/fPdAUftqKrn4njhYGbp7syh+7nBb2wa+mIfXf/Lb1xJti6gOLv w7mJpSwO6IbaNIRTpQ/dqqb/EHeTElfew0Uza6aD0RJrrpTg85UexqzwDRXcSQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1718037747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=eV59jzwlnvMqC78q7RxRP7GMuITiFT7fNLVqSGWWbAc=; b=2GLc07W/haNWaKkQr+LzbL5SFJJECVc4lWKuJ82Db0yOT9HZ2AWpQWHmqCwJ/codG8V0nv KJ8fz0cNiT+7/XCg== From: Thomas Gleixner To: LKML Cc: Anna-Maria Behnsen , Frederic Weisbecker , John Stultz , Peter Zijlstra , Ingo Molnar , Stephen Boyd , Eric Biederman , Oleg Nesterov Subject: [patch V3 18/51] posix-timers: Clear overrun in common_timer_set() References: <20240610163452.591699700@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Mon, 10 Jun 2024 18:42:27 +0200 (CEST) Keeping the overrun count of the previous setup around is just wrong. The new setting has nothing to do with the previous one and has to start from a clean slate. Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker --- kernel/time/posix-timers.c | 1 + 1 file changed, 1 insertion(+) --- a/kernel/time/posix-timers.c +++ b/kernel/time/posix-timers.c @@ -881,6 +881,7 @@ int common_timer_set(struct k_itimer *ti timr->it_requeue_pending = (timr->it_requeue_pending + 2) & ~REQUEUE_PENDING; timr->it_overrun_last = 0; + timr->it_overrun = -1LL; /* Switch off the timer when it_value is zero */ if (!new_setting->it_value.tv_sec && !new_setting->it_value.tv_nsec)