All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Bharat Bhushan <bbhushan2@marvell.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: Are xfrm state_add/delete() calls serialized?
Date: Mon, 19 Sep 2022 12:29:53 +0300	[thread overview]
Message-ID: <Yyg2kYNeGxWSCvC4@unreal> (raw)
In-Reply-To: <DM5PR1801MB1883E2826A037070B2DD6608E3449@DM5PR1801MB1883.namprd18.prod.outlook.com>

On Mon, Sep 12, 2022 at 03:10:12PM +0000, Bharat Bhushan wrote:
> Hi All,
> 
> Have a very basic query related to .xdo_dev_state_add()/delete() ops supported by netdev driver. Can .xdo_dev_state_add()/delete() execute from other core while already in process of handling .xdo_dev_state_add()/delete() on one core? Or these calls are always serialized by stack?

It is protected from userspace callers with xfrm_cfg_mutex in xfrm_netlink_rcv().
However, stack triggered deletion can be in parallel. There is a lock
for that specific SA that is going to be deleted, and it is not global.

> Wanted to know if we need proper locking while handling these ops in driver.
> 
> Thanks
> -Bharat 

  reply	other threads:[~2022-09-19  9:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-12 15:10 Are xfrm state_add/delete() calls serialized? Bharat Bhushan
2022-09-19  9:29 ` Leon Romanovsky [this message]
2022-09-21  5:42   ` [EXT] " Bharat Bhushan
2022-09-21  7:49     ` Leon Romanovsky

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=Yyg2kYNeGxWSCvC4@unreal \
    --to=leon@kernel.org \
    --cc=bbhushan2@marvell.com \
    --cc=netdev@vger.kernel.org \
    /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.