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 84FAD3C5526 for ; Thu, 28 May 2026 11:55:34 +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=1779969335; cv=none; b=grJ89QZ1IYB2lmDZw60Y0PTkKOohbmHQ/1yWFyy2oBSxGeMDo7xigYi/dfRoveXKITXoEO3Nbi/gEY6zIQBlh3OqGEnC7N7DWur1u1ButLxp4lqj/73/inu9NGiZUYeijzEeSfLdCFXSJ7M8F86zlusFxI7SYQmLFbBGiPpdHHY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779969335; c=relaxed/simple; bh=bwgWytHk2XWuHu5gDJV2lLeFZDyRuMn2eybI8pR8ASs=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=OR5QHQyVggjpsOBLdT9meH3KA1m0ck8rMCdNtX/81AZMm3oqY59ml/yli5vR+iWaDvIfAx4Avwu+Ka/xxv+I+lQTIGxw7sHaWDULO8OhoiNNEsUqU2L0n78TO+8/tyosOZHMR8aCiCLUm6bQH0DNnbMF+rbPIUPj3jPjNKjMH5o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=2jDYQ4PI; 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="2jDYQ4PI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D6F4A1F000E9; Thu, 28 May 2026 11:55:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779969334; bh=qmQqqds484w7GpQz2HqOcV8vlmm3QV1k9pohRWof+TM=; h=Subject:To:Cc:From:Date; b=2jDYQ4PI2jmIJvuSsJBdi0TGfmLfd24E4catYjGycn1HP5uoI8zy3NNC1O56CH0oX HRxWra14Wx1Xe2cjKYkMpEcDs4LlUBTHWtjIVyFfSW02VE6WmcASgFp9w6lybbYLNR 0QcN7lAspQnaVMvv7FUp8NGWDBcRGkFFL8ksdtAQ= Subject: FAILED: patch "[PATCH] batman-adv: tp_meter: directly shut down timer on cleanup" failed to apply to 6.12-stable tree To: sven@narfation.org Cc: From: Date: Thu, 28 May 2026 13:54:40 +0200 Message-ID: <2026052840-reviver-sage-4805@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.12-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.12.y git checkout FETCH_HEAD git cherry-pick -x d5487249a81ea658717614009c8f46acc5b7101a # git commit -s git send-email --to '' --in-reply-to '2026052840-reviver-sage-4805@gregkh' --subject-prefix 'PATCH 6.12.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); }