Netdev List
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Ido Schimmel <idosch@idosch.org>
Cc: netdev@vger.kernel.org, davem@davemloft.net, jiri@mellanox.com,
	sfr@canb.auug.org.au, mlxsw@mellanox.com,
	Ido Schimmel <idosch@mellanox.com>
Subject: Re: [PATCH net] netdevsim: Fix use-after-free during device dismantle
Date: Thu, 31 Oct 2019 09:23:38 -0700	[thread overview]
Message-ID: <20191031092338.79831fa7@cakuba.netronome.com> (raw)
In-Reply-To: <20191031162030.31158-1-idosch@idosch.org>

On Thu, 31 Oct 2019 18:20:30 +0200, Ido Schimmel wrote:
> From: Ido Schimmel <idosch@mellanox.com>
> 
> Commit da58f90f11f5 ("netdevsim: Add devlink-trap support") added
> delayed work to netdevsim that periodically iterates over the registered
> netdevsim ports and reports various packet traps via devlink.
> 
> While the delayed work takes the 'port_list_lock' mutex to protect
> against concurrent addition / deletion of ports, during device creation
> / dismantle ports are added / deleted without this lock, which can
> result in a use-after-free [1].
> 
> Fix this by making sure that the ports list is always modified under the
> lock.

Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>

  reply	other threads:[~2019-10-31 16:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-31 16:20 [PATCH net] netdevsim: Fix use-after-free during device dismantle Ido Schimmel
2019-10-31 16:23 ` Jakub Kicinski [this message]
2019-10-31 19:36 ` David Miller

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=20191031092338.79831fa7@cakuba.netronome.com \
    --to=jakub.kicinski@netronome.com \
    --cc=davem@davemloft.net \
    --cc=idosch@idosch.org \
    --cc=idosch@mellanox.com \
    --cc=jiri@mellanox.com \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /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