patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Van Haaren, Harry" <harry.van.haaren@intel.com>
To: "Carrillo, Erik G" <erik.g.carrillo@intel.com>
Cc: "Naga Harish K, S V" <s.v.naga.harish.k@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"stable@dpdk.org" <stable@dpdk.org>,
	"thomas@monjalon.net" <thomas@monjalon.net>,
	David Marchand <david.marchand@redhat.com>
Subject: RE: [PATCH] service: fix early move to inactive status
Date: Fri, 21 Oct 2022 11:36:04 +0000	[thread overview]
Message-ID: <BN0PR11MB571273132D2E8BB713F435DBD72D9@BN0PR11MB5712.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20221020190041.2350842-1-erik.g.carrillo@intel.com>

> -----Original Message-----
> From: Carrillo, Erik G <erik.g.carrillo@intel.com>
> Sent: Thursday, October 20, 2022 8:01 PM
> To: Van Haaren, Harry <harry.van.haaren@intel.com>
> Cc: Naga Harish K, S V <s.v.naga.harish.k@intel.com>; dev@dpdk.org;
> stable@dpdk.org
> Subject: [PATCH] service: fix early move to inactive status
> 
> Assume thread T2 is a service lcore that is in the middle of executing
> a service function.  Also, assume thread T1 concurrently calls
> rte_service_lcore_stop(), which will set the "service_active_on_lcore"
> state to false.  If thread T1 then calls rte_service_may_be_active(),
> it can return zero even though T2 is still running the service function.
> If T1 then proceeds to free data being used by T2, a crash can ensue.
> 
> Move the logic that clears the "service_active_on_lcore" state from the
> rte_service_lcore_stop() function to the service_runner_func() to
> ensure that we:
> - don't let the "service_active_on_lcore" state linger as 1
> - don't clear the state early
> 
> Fixes: 6550113be62d ("service: fix lingering active status")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>

+CC Thomas/David, please consider for inclusion in next RC.

Thanks Erik, indeed the "active = off" store is too early in the current implementation, so:
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>

<snip patch>

  reply	other threads:[~2022-10-21 11:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-20 19:00 Erik Gabriel Carrillo
2022-10-21 11:36 ` Van Haaren, Harry [this message]
2022-10-21 13:10   ` David Marchand

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=BN0PR11MB571273132D2E8BB713F435DBD72D9@BN0PR11MB5712.namprd11.prod.outlook.com \
    --to=harry.van.haaren@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=erik.g.carrillo@intel.com \
    --cc=s.v.naga.harish.k@intel.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /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;
as well as URLs for NNTP newsgroup(s).