From nobody Sun Jun 14 07:40:51 2026 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 70E0442315D; Fri, 1 May 2026 19:40:26 +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=1777664431; cv=none; b=sTWVexV/lPFiq/teO8j5i9d1hUjGtLpF6NgBID8B/pX92Y9ZeVjFvpcF/mpbgCP2PVoBoZk+G4YSI2GCssVPIbjKtbQ5m3Q14tybeaQ7ikiCtBQ3E8ODX5HE5WnppVf2bAvJxwi0+js3Mtpp4VqW7dsdsAmzigmMoYgMLKnB3sA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777664431; c=relaxed/simple; bh=sFdjEe/4wfE6Jx/tRrJs3S2gVVvF/wBwQrT+3y1OUfU=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=h0YUPR8jRvog7fT9/Ehk0M+7k3yGV9xR+12vk7kCFTnlTG18m0JpWGI9EVT/B0WqNA39AmIexM2NEHxtoNp1GdnPVp25HnEjsbS1EQoV8UpTBpUKSLkFK2Mkr+cfctqqMuwE/He2KeIJ0900x+kRaU9jyj3thjPoL+iV/NFPMVQ= 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=b0eZMGc+; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=/emwFbfE; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="b0eZMGc+"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="/emwFbfE" Date: Fri, 01 May 2026 19:40:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1777664425; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sSM40t0ACW7s2mHh7kt6943/Pzd084Y0JxdCdbwfLZE=; b=b0eZMGc+GRpLb4EcWeNf163nNIQHllDnluhXb7g4kOXqMEeIVWBNbeVbbUmB55qQqkIfD8 iGAxzLUuvP3W34G3UfRceiNvGqn06FeW37pkC2cDjyI84PIPjvp6bAk3whJsgR/2R2xXXA 5NKCbMSrh1k7iE+eizWyUKcQIUxkkJ3byoQ9RRqFasi8pg6FLMpQvrl/gf98Mnj5OpBYvX XEw5x5xgTkhZilqXRpv3M5xKy0c66QHCeGXjd22mH3mP6DZKsFsmaKpmX5Dl8uiptD/RrJ IMFq5/ntyDb4corIYuGwtH5kfiSZbNPhn+V54gd4eErSHOGGJGUQaO2alZHftA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1777664425; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sSM40t0ACW7s2mHh7kt6943/Pzd084Y0JxdCdbwfLZE=; b=/emwFbfEn4AKcS5iqPG7mt1ajAfA0z6/XnRxR/FS03sMtA8jFxq6/HrBH9qDQ53lWuftyB 4XZrWkcpHsREI+Bg== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] netfilter: xt_IDLETIMER: Switch to alarm_start_timer() Cc: Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260408114952.604232981@kernel.org> References: <20260408114952.604232981@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177766442352.3521451.15836408310885477957.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the timers/core branch of tip: Commit-ID: 12e4311aa5b2dda3cb59e42b3f518e1c57fb1469 Gitweb: https://git.kernel.org/tip/12e4311aa5b2dda3cb59e42b3f518e1c5= 7fb1469 Author: Thomas Gleixner AuthorDate: Wed, 08 Apr 2026 13:54:29 +02:00 Committer: Thomas Gleixner CommitterDate: Fri, 01 May 2026 21:36:14 +02:00 netfilter: xt_IDLETIMER: Switch to alarm_start_timer() The existing alarm_start() interface is replaced with the new alarm_start_timer() mechanism, which does not longer queue an already expired timer and returns the state. Adjust the code to utilize this so it schedules the work in the case that the timer was already expired. Unlikely to happen as the timeout is at least a second, but not impossible especially with virtualization. No functional change intended Signed-off-by: Thomas Gleixner Link: https://patch.msgid.link/20260408114952.604232981@kernel.org --- net/netfilter/xt_IDLETIMER.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/net/netfilter/xt_IDLETIMER.c b/net/netfilter/xt_IDLETIMER.c index 5171061..bfcf2d4 100644 --- a/net/netfilter/xt_IDLETIMER.c +++ b/net/netfilter/xt_IDLETIMER.c @@ -115,6 +115,21 @@ static void idletimer_tg_alarmproc(struct alarm *alarm= , ktime_t now) schedule_work(&timer->work); } =20 +static void idletimer_start_alarm_ktime(struct idletimer_tg *timer, ktime_= t timeout) +{ + /* + * The timer should always be queued as @tout it should be least one + * second, but handle it correctly in any case. Virt will manage! + */ + if (!alarm_start_timer(&timer->alarm, timeout, true)) + schedule_work(&timer->work); +} + +static void idletimer_start_alarm_sec(struct idletimer_tg *timer, unsigned= int seconds) +{ + idletimer_start_alarm_ktime(timer, ktime_set(seconds, 0)); +} + static int idletimer_check_sysfs_name(const char *name, unsigned int size) { int ret; @@ -220,12 +235,10 @@ static int idletimer_tg_create_v1(struct idletimer_tg= _info_v1 *info) INIT_WORK(&info->timer->work, idletimer_tg_work); =20 if (info->timer->timer_type & XT_IDLETIMER_ALARM) { - ktime_t tout; alarm_init(&info->timer->alarm, ALARM_BOOTTIME, idletimer_tg_alarmproc); info->timer->alarm.data =3D info->timer; - tout =3D ktime_set(info->timeout, 0); - alarm_start_relative(&info->timer->alarm, tout); + idletimer_start_alarm_sec(info->timer, info->timeout); } else { timer_setup(&info->timer->timer, idletimer_tg_expired, 0); mod_timer(&info->timer->timer, @@ -271,8 +284,7 @@ static unsigned int idletimer_tg_target_v1(struct sk_bu= ff *skb, info->label, info->timeout); =20 if (info->timer->timer_type & XT_IDLETIMER_ALARM) { - ktime_t tout =3D ktime_set(info->timeout, 0); - alarm_start_relative(&info->timer->alarm, tout); + idletimer_start_alarm_sec(info->timer, info->timeout); } else { mod_timer(&info->timer->timer, secs_to_jiffies(info->timeout) + jiffies); @@ -384,7 +396,7 @@ static int idletimer_tg_checkentry_v1(const struct xt_t= gchk_param *par) if (ktimespec.tv_sec > 0) { pr_debug("time_expiry_remaining %lld\n", ktimespec.tv_sec); - alarm_start_relative(&info->timer->alarm, tout); + idletimer_start_alarm_ktime(info->timer, tout); } } else { mod_timer(&info->timer->timer,