All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nagamani PV <nagamani@linux.ibm.com>
To: netdev-bot+sashiko@kernel.org
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, wintera@linux.ibm.com,
	aswin@linux.ibm.com, hca@linux.ibm.com, gor@linux.ibm.com,
	agordeev@linux.ibm.com, borntraeger@linux.ibm.com,
	svens@linux.ibm.com, kees@kernel.org, linux-s390@vger.kernel.org,
	netdev@vger.kernel.org, sashiko-bot@kernel.org
Subject: Re: [PATCH net 1/2] s390/ctcm: Fix timer corruption in fsm_addtimer()
Date: Fri, 11 Sep 2026 15:42:42 +0530	[thread overview]
Message-ID: <cac29eef-fb5b-403a-bfef-deac70c48e99@linux.ibm.com> (raw)
In-Reply-To: <178900839135.219967.4379937251971534684@kernel.org>



On 10/09/26 8:16 AM, netdev-bot+sashiko@kernel.org wrote:
> - [High] Incomplete fix: the commit removes timer_setup() from
>   fsm_addtimer()/fsm_modtimer() on the premise that "[t]he timer is…

This refers to priv->restart_timer — addressed inline below.

> 
> [Severity: Low]
> There is no symbol named ctcm_send_sweep() in the tree. The ctcm_main.c
> call site that arms a timer without a preceding fsm_deltimer() appears to
> be ctcmpc_send_sweep_req():
> 

Correct. Will fix the function name in v2.

> 
> [Severity: High]
> With this removed, fsm_settimer() becomes the only timer_setup() call site
> for fsm timers, and it is also called unconditionally. Does that leave the
> same corruption reachable for priv->restart_timer?
> 

Pre-existing issue not introduced by this patch.

> [Severity: Low]
> This now propagates the mod_timer() result, but the kernel-doc for the
> exported fsm_addtimer() in fsm.h still says:
> 
>  * Return: Always returns 0
> Would it be better to keep mod_timer(...) followed by return 0, or update
> the fsm.h kernel-doc to describe the 0/1 "was pending" semantics?
> 

Will fix in v2 by calling mod_timer() separately and returning 0
explicitly, preserving the documented return contract.

> 
> [Severity: Medium]
> This isn't a bug introduced by this patch, but with the timer_delete()
> gone, the two payload stores are now published with plain stores while the
> timer may be pending or its callback already running:

Pre-existing issue not introduced by this patch.

> 
> [Severity: High]
> This is a pre-existing issue, but it interacts with the switch to
> mod_timer(). fsm_deltimer() only does:
> 
> 	timer_delete(&this->tl);
> 
> which does not wait for a callback running on another CPU, and
> ctcm_free_netdevice() performs no cancellation at all for grp->timer or
> priv->restart_timer before freeing their containers:

Pre-existing issue not introduced by this patch.

> [Severity: Critical]
> This isn't a bug introduced by this patch, but ctcm_free_netdevice() frees
> priv->xid with kfree() even though it is an interior pointer into an SKB
> data buffer that was released a few statements earlier:
> 

Pre-existing issue not introduced by this patch.

> [Severity: Medium]
> This is a pre-existing issue as well, but does ctcm_init_netdevice() leak
> priv->fsm when the MPC group setup fails?
> 

Pre-existing issue not introduced by this patch.


  reply	other threads:[~2026-09-11 10:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-07 14:45 [PATCH net 0/2] s390/ctcm: Fix timer bugs in fsm.c Nagamani PV
2026-09-07 14:45 ` [PATCH net 1/2] s390/ctcm: Fix timer corruption in fsm_addtimer() Nagamani PV
2026-09-08 14:45   ` sashiko-bot
2026-09-10  2:46   ` netdev-bot+sashiko
2026-09-11 10:12     ` Nagamani PV [this message]
2026-09-07 14:45 ` [PATCH net 2/2] s390/ctcm: Fix use-after-free in channel_remove() Nagamani PV
2026-09-08 14:45   ` sashiko-bot
2026-09-10  2:46   ` netdev-bot+sashiko
2026-09-11 10:26     ` Nagamani PV

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=cac29eef-fb5b-403a-bfef-deac70c48e99@linux.ibm.com \
    --to=nagamani@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=aswin@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=kees@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sashiko-bot@kernel.org \
    --cc=svens@linux.ibm.com \
    --cc=wintera@linux.ibm.com \
    /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.