Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp65553lqg; Wed, 10 Apr 2024 15:50:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWSHBaqGNgrm4ycmrbPjddW6NNMi5pC+HVT2dR0JlBIolWRV7kcG70hSz4EKKugNAMHMtYDlVlFImd3c7dt+QR43md3QzSMkX78kwEoXw== X-Google-Smtp-Source: AGHT+IHpqYzo3Z137bxlgXZ/m4fIedN9tTgKlIOxkP+uKs0lb6OoQ4uorwfjYcTs8UnKj6u61/9i X-Received: by 2002:a17:902:e84f:b0:1e0:cdcc:340b with SMTP id t15-20020a170902e84f00b001e0cdcc340bmr5339962plg.19.1712789406056; Wed, 10 Apr 2024 15:50:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712789406; cv=pass; d=google.com; s=arc-20160816; b=Cfo997bOcwqL6w19ZKzWO6+Vht0LG3EnHW2Xfg7UcKvsFppFPmwWTY/o35QDhpGe8x ce9NNdSAbUPYT2X0xNHD8I+P04IM8gVLPx0ARR9rAOxGeAHi3YSxYywV30iCE1ufpMKW e0aIBlrjYD2R0Q6JyK4Au0p+7XNIlZjPUBlNpaXxRwOMR6xUAP1E/Bhv/0h+bmcVRz4g RUuLvs2VRbLNjTQDfeaXBLcYijJKaq0P7UOuIz9MHZOoRCkm+SoHeVu8YseEmuHuOoxL h+aSLQkA3vQiSHY+8mtVVx/g9n6On6vhTYZZW6w8K+2YhixtDPrJMuekMrZ85haGHUmy QNTw== 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=ElUI5XDi6lMwar2mWoII7jCMkiKRSDPhnbRizkFQSID7Qapzp4bsG7Nd4ddruh8kV1 BGSsoHE0pH71Gv1PC1F7AkqkvGMRJQZ3lSaB9gF6HlgsSGcxHZ6nH4Mb1bsbq6AcZ7IV 9agPZXoVeT8Y9ERmXHoO5HOdOrurO4ghS6l2jOIVF/CP4OHKQRcXO+rd3GtdLRC/BiaT j33Rv/8sG+Q0Yox4Toe8j3BvfTg1+sEFP/7ERZXU4e1jZsXCKyiiL6KdlyzPVkbOVfks q4i6mtiDfUS95TIhIBZpy0tLqBBamw1s4N44nBuQlpHOsRhaBcbAchEnUBBuP5VboGmJ ieYQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=KEfir5ut; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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-139471-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139471-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id m16-20020a170902f65000b001e0b2a3fc17si96068plg.311.2024.04.10.15.50.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 15:50:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-139471-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=KEfir5ut; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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-139471-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139471-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 5056A283424 for ; Wed, 10 Apr 2024 22:50:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 18B6651012; Wed, 10 Apr 2024 22:46:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="KEfir5ut"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="mRPtHIDZ" 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 F204B50249 for ; Wed, 10 Apr 2024 22:46:45 +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=1712789207; cv=none; b=Vw2wii4I/uzYEwboTY190VVDL2VK17DfljHHqLXS3tp3Vh3fxU4e0deuSnhVfXJOYTTCFWE7peHdFyrynfocVTVz+ukS3ON2c1XR1FRVBHLWlfZcr2YLyQmtZF10aDH4TRPXE5aQidMBNgQ5AnG9Ri/OhmS1/F+FwLZsaRkOYSs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712789207; c=relaxed/simple; bh=9JR/luG7t5T3jOUPOePLWiqmKbhtO9ZuNt63a7+o1js=; h=Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type:Date; b=fdKW8WDrDdYjLG8uS92FM2UsMRvZAxi/3Gb6wzZyNbSTPIziFo2311psF289sFMBJzpFENWxyc40aMwmyavSj4FSQoFZCw5BOYrniXHdPga8mDqU2uwERteuDRT+FRL3JygyY66UQS8/lv6oworWE8ZsEPunwqyi/5dQuSxmaSY= 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=KEfir5ut; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=mRPtHIDZ; 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: <20240410165552.069350753@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1712789204; 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=KEfir5utURRdFHULxGLSLgNBqucoflI9ebdqhPJ2zP9A2YFAVFjRuBAtDucpHCjNfqAWeN PULK8sogl1TVIkLuhtYCYAAxIHIh1JIWZVe9McPVuy7zqKat2JDQyfwQLXcR0GlivapuVd BH+gNrWg6ZmBgeOeAqwbpyYk71rwyd0/uWeVmyOcEV/L3lYoElNcgFw+B5QeKL695qGxBD sCNxh8NfqIPz4l0gOo32pc656kaxeVqny/M+L+4J4016mRw+XSPEpNPl2h9Lod7H4+FMB6 uxVOTT6r3ldmRrzd6H75XNasqe4O7FuyzQMfkzehGFmflpD5fzk9xp2oxzuPvw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1712789204; 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=mRPtHIDZwPxnELHsnfmJe5k2TmYBxInFypS+d40LNMIv4kSRS5YGx2Lu//iqJHaXroHNcG bHdZfBC7POS0/KCg== 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 V2 18/50] posix-timers: Clear overrun in common_timer_set() References: <20240410164558.316665885@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: Thu, 11 Apr 2024 00:46:43 +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)