All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Nagamani PV" <nagamani@linux.ibm.com>
Cc: linux-s390@vger.kernel.org, "Heiko Carstens" <hca@linux.ibm.com>,
	"Alexander Gordeev" <agordeev@linux.ibm.com>,
	"Christian Borntraeger" <borntraeger@linux.ibm.com>,
	"Vasily Gorbik" <gor@linux.ibm.com>
Subject: Re: [PATCH net v4 2/2] s390/ctcm: Fix use-after-free in channel_remove()
Date: Wed, 30 Sep 2026 07:14:44 +0000	[thread overview]
Message-ID: <20260930071444.A22C61F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260930070234.569500-3-nagamani@linux.ibm.com>

> channel_remove() uses fsm_deltimer() which calls timer_delete(),
> returning immediately even if the timer callback is running on
> another CPU. This leaves a window where fsm_expire_timer() accesses
> ch->fsm after kfree_fsm().
> 
> For MPC channels the teardown has a circular dependency:
> 
>   ch->timer callback -> ctcm_chx_txretry() -> mpc_action_go_inop()
>     -> tasklet_hi_schedule(&ch->ch_disc_tasklet)
> 
>   ch_tasklet -> ctcmpc_send_sweep_resp() -> fsm_addtimer(&ch->sweep_timer)
> 
>   sweep_timer callback -> fsm_addtimer(&ch->timer)
> 
> Use timer_shutdown_sync() for both timers: it waits for any running
> [ ... ]
> Fixes: 293d984f0e36 ("ctcm: infrastructure for replaced ctc driver")
> Cc: stable@vger.kernel.org # depends on: s390/ctcm: Fix timer corruption in fsm_addtimer()
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Link: https://sashiko.dev/#/patchset/20260922101913.239103-1-nagamani@linux.ibm.com?part=2
> Signed-off-by: Nagamani PV <nagamani@linux.ibm.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260930070234.569500-1-nagamani@linux.ibm.com?part=2


  reply	other threads:[~2026-09-30  7:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30  7:02 [PATCH net v4 0/2] s390/ctcm: Fix timer corruption and use-after-free Nagamani PV
2026-09-30  7:02 ` [PATCH net v4 1/2] s390/ctcm: Fix timer corruption in fsm_addtimer() Nagamani PV
2026-09-30  7:14   ` sashiko-bot
2026-10-05 17:16   ` Simon Horman
2026-09-30  7:02 ` [PATCH net v4 2/2] s390/ctcm: Fix use-after-free in channel_remove() Nagamani PV
2026-09-30  7:14   ` sashiko-bot [this message]
2026-10-01 11:35   ` Aswin Karuvally
2026-10-04  7:17   ` netdev-bot+sashiko
2026-10-05  8:48     ` Nagamani PV
2026-10-05 17:16   ` Simon Horman
2026-09-30  7:09 ` [PATCH net v4 0/2] s390/ctcm: Fix timer corruption and use-after-free netdev-bot+sinfo
2026-10-01  8:06   ` Nagamani PV
2026-10-06  0:34     ` Jakub Kicinski
2026-10-06  0:40 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260930071444.A22C61F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=nagamani@linux.ibm.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.