DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: <dev@dpdk.org>, <stable@dpdk.org>,
	Sunyang Wu <sunyang.wu@jaguarmicro.com>,
	Aman Singh <aman.deep.singh@intel.com>,
	"Olivier Matz" <olivier.matz@6wind.com>
Subject: Re: [PATCH] app/test-pmd: terminate process on second signal
Date: Tue, 28 Apr 2026 09:00:15 +0100	[thread overview]
Message-ID: <afBpD-ld62myZsVu@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20260427172617.295684-1-stephen@networkplumber.org>

On Mon, Apr 27, 2026 at 10:26:17AM -0700, Stephen Hemminger wrote:
> The SIGINT/SIGTERM handler starts a graceful shutdown via
> prompt_exit(), after which prompt() frees the cmdline object with
> cmdline_stdin_exit(). A second signal delivered during or after
> that free re-enters prompt_exit() and dereferences testpmd_cl,
> producing a use-after-free.
> 
> Set SA_RESETHAND so the second signal terminates the process via
> SIG_DFL instead of re-running the shutdown path. On Windows the
> C runtime's signal() already resets the disposition after delivery,
> so behavior is consistent without an #ifdef.
> 
> Fixes: f1d0993e034e ("app/testpmd: fix interactive mode on Windows")
> Cc: stable@dpdk.org
> Reported-by: Sunyang Wu <sunyang.wu@jaguarmicro.com>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  app/test-pmd/testpmd.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

  reply	other threads:[~2026-04-28  8:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-27 10:57 [PATCH v2] app/testpmd: avoid cmdline use-after-free on SIGINT Sunyang Wu
2026-04-27 11:13 ` [PATCH v3] " Sunyang Wu
2026-04-27 15:23   ` Stephen Hemminger
2026-04-27 17:26 ` [PATCH] app/test-pmd: terminate process on second signal Stephen Hemminger
2026-04-28  8:00   ` Bruce Richardson [this message]
2026-04-28 13:52   ` [PATCH v2] " Stephen Hemminger
2026-04-30 17:25     ` Stephen Hemminger

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=afBpD-ld62myZsVu@bricha3-mobl1.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=aman.deep.singh@intel.com \
    --cc=dev@dpdk.org \
    --cc=olivier.matz@6wind.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    --cc=sunyang.wu@jaguarmicro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox