FAILED: patch "[PATCH] wifi: ath9k: delete channel-context timers on deinit" failed to apply to 5.10-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 5.10-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 <[email protected]>.
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-5.10.y
git checkout FETCH_HEAD
git cherry-pick -x 81394dfb9a7905472957628b560ae894eae3a30f
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026110443-depth-overbuilt-7852@gregkh' --subject-prefix 'PATCH 5.10.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 81394dfb9a7905472957628b560ae894eae3a30f Mon Sep 17 00:00:00 2001
From: Rosen Penev <[email protected]>
Date: Fri, 11 Sep 2026 14:31:44 -0700
Subject: [PATCH] wifi: ath9k: delete channel-context timers on deinit
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
ath9k_deinit_channel_context() cancels chanctx_work but does not delete the offchannel and sched timers set up by ath9k_init_channel_context(). If either timer fires after deinit (e.g. during driver unload or suspend), it accesses sc->sc_ah which may already be freed by ath9k_hw_deinit(), causing a use-after-free.
Delete both timers with timer_shutdown_sync() before cancelling the work item.
drivers/net/wireless/ath/ath9k/channel.c +2 -0
@@ -1363,6 +1363,8 @@ void ath9k_init_channel_context(struct ath_softc *sc)void ath9k_deinit_channel_context (struct ath_softc *sc) { +timer_shutdown_sync (&sc->sched.timer); +timer_shutdown_sync (&sc->offchannel.timer);cancel_work_sync (&sc->chanctx_work); }
Quoted 7 lines · On Wed, Nov 4, 2026 at 6:25 AM <[email protected]> wrote:
The patch below does not apply to the 5.10-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 <[email protected]>.
Quoted 5 lines
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-5.10.y git checkout
FETCH_HEAD
git cherry-pick -x81394dfb9a7905472957628b560ae894eae3a30f
git cherry-pick -x 81394dfb9a7905472957628b560ae894eae3a30f
works locally. No idea what the issue is here.
Quoted 53 lines
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026110443-depth-overbuilt-7852@gregkh' --subject-prefix 'PATCH 5.10.y' 'HEAD^..'Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From
81394dfb9a7905472957628b560ae894eae3a30fMon Sep 17 00:00:00 2001
From: Rosen Penev <[email protected]>
Date: Fri, 11 Sep 2026 14:31:44 -0700
Subject: [PATCH] wifi: ath9k: delete channel-context timers on deinit
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
ath9k_deinit_channel_context()cancelschanctx_workbut does not delete the offchannel and sched timers set up byath9k_init_channel_context(). If either timer fires after deinit (e.g. during driver unload or suspend), it accessessc->sc_ahwhich may already be freed byath9k_hw_deinit(), causing a use-after-free.Delete both timers with
timer_shutdown_sync()before cancelling the work item.Assisted-by LLMSigned-off-by Rosen Penev <[email protected]>Cc [email protected] # v6.2+Fixes 705d0bf83dbe ("ath9k: Add a routine for initializing channel contexts")Signed-off-by Jeff Johnson <[email protected]>drivers/net/wireless/ath/ath9k/channel.c +2
-0@@ -1363,6 +1363,8 @@ void ath9k_init_channel_context(struct ath_softc *sc)void ath9k_deinit_channel_context (struct ath_softc *sc) { +timer_shutdown_sync (&sc->sched.timer); +timer_shutdown_sync (&sc->offchannel.timer);cancel_work_sync (&sc->chanctx_work); }
Sasha Levin
maintainerQuoted 3 lines
git cherry-pick -x
81394dfb9a7905472957628b560ae894eae3a30fworks locally. No idea what the issue is here.
The cherry-pick applies, but 5.10 has no timer_shutdown_sync() (added in 6.2), so 81394dfb9a79 ("wifi: ath9k: delete channel-context timers on deinit") doesn't build there. A 5.10.y patch using del_timer_sync() is welcome.
Signature · 2 lines
Thanks, Sasha
Quoted 8 lines · Sasha Levin
Quoted 4 lines
git cherry-pick -x
81394dfb9a7905472957628b560ae894eae3a30fworks locally. No idea what the issue is here.
The cherry-pick applies, but 5.10 has no
timer_shutdown_sync()(added in 6.2), so81394dfb9a79("wifi: ath9k: delete channel-context timers on deinit") doesn't build there. A 5.10.y patch usingdel_timer_sync()is welcome.
I assume this gets sent directly to linux-stable.
Quoted 4 lines
--
Thanks,
Sasha