From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 2D7363E3156 for ; Thu, 28 May 2026 11:55:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779969342; cv=none; b=YnTQVKWt/krpYL/rvOI8sDJqL7FUFcmORkvI0A19vEZ5EsQjYYAc9qLnCmMVhHlc0/NUcB0uchdcPM/aZ0K2gIvQ/RYlq2vAuA3dYDu4h9C0vdH9e32bqu+Y7hmdBRyCRdHwE/DgOVKTXqYGXPG4DeztO2+UxCiNrg790cmPbpY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779969342; c=relaxed/simple; bh=WBWmW5qHPusvYAaASj4ObMw4KrtsuOTrCnOmcx6X1Ig=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=Vo3ArMfzCJ9umD4iPypgRj84MxFVeueFZtwHXCjgBfE9IIGZqvYIFnD5QJQof4E19y8uP/oGfosQwwKSKVPbISAcCDdun0/NOXCXY4GIgVbTTdecVB8K+YA7g1Ux6qS604CemTWM0aGeiXj2iAiCFlvsTPwRiybwxlR6ERV0IPk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=uiOjmhk7; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="uiOjmhk7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F2E61F000E9; Thu, 28 May 2026 11:55:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779969341; bh=BUo+npHp/lAhrExt4mTWnyRjAxUkyFkGgiXy7kD1wOM=; h=Subject:To:Cc:From:Date; b=uiOjmhk7e6Xux9PYGLkLM9gE93DSeVe9euMnVsE73wzb85unPnRwMvyTD8f89nT9J aF3y/cCwWHboWJ+a/RFcYQp2RKEFoYvwGe88Et9bXb4Yh8+kaUGsyuRbQrpUK2sbFT vuKRp5LUieh42IM/k0LdZ8U881FLJSgEfv916zPQ= Subject: FAILED: patch "[PATCH] batman-adv: tp_meter: directly shut down timer on cleanup" failed to apply to 6.1-stable tree To: sven@narfation.org Cc: From: Date: Thu, 28 May 2026 13:54:43 +0200 Message-ID: <2026052843-bubble-subside-0f14@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.1-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y git checkout FETCH_HEAD git cherry-pick -x d5487249a81ea658717614009c8f46acc5b7101a # git commit -s git send-email --to '' --in-reply-to '2026052843-bubble-subside-0f14@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From d5487249a81ea658717614009c8f46acc5b7101a Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Wed, 13 May 2026 10:43:54 +0200 Subject: [PATCH] batman-adv: tp_meter: directly shut down timer on cleanup batadv_tp_sender_cleanup() was calling timer_delete_sync() followed by timer_delete() to guard against the timer handler re-arming itself between the two calls. This double-deletion hack relied on the sending status being set to 0 to suppress re-arming. Replace both calls with a single timer_shutdown_sync(). This function both waits for any running timer callback to complete (like timer_delete_sync()) and permanently disarms the timer so it cannot be re-armed afterwards, making re-arming prevention unconditional and self-documenting. The re-arming property is also required because otherwise: 1. context 0 (batadv_tp_recv_ack()) checks in batadv_tp_reset_sender_timer() if sending is still 1 -> it is 2. context 1 changes in batadv_tp_sender_shutdown() sending to 0 and in this process forces the kthread to stop timer in batadv_tp_sender_cleanup() 3. context 0 continues in batadv_tp_reset_sender_timer() and rearms the timer -> but the reference for it is already gone Cc: stable@kernel.org Fixes: 33a3bb4a3345 ("batman-adv: throughput meter implementation") Signed-off-by: Sven Eckelmann diff --git a/net/batman-adv/tp_meter.c b/net/batman-adv/tp_meter.c index a3593d104caa..1fd1526059d8 100644 --- a/net/batman-adv/tp_meter.c +++ b/net/batman-adv/tp_meter.c @@ -401,13 +401,7 @@ static void batadv_tp_sender_cleanup(struct batadv_tp_vars *tp_vars) batadv_tp_list_detach(tp_vars); /* kill the timer and remove its reference */ - timer_delete_sync(&tp_vars->timer); - /* the worker might have rearmed itself therefore we kill it again. Note - * that if the worker should run again before invoking the following - * timer_delete(), it would not re-arm itself once again because the status - * is OFF now - */ - timer_delete(&tp_vars->timer); + timer_shutdown_sync(&tp_vars->timer); batadv_tp_vars_put(tp_vars); }