netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Parav Pandit <parav@mellanox.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	Jiri Pirko <jiri@mellanox.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: RE: [PATCH net-next 2/2] devlink: Fix list access without lock while reading region
Date: Tue, 12 Feb 2019 16:04:49 +0000	[thread overview]
Message-ID: <VI1PR0501MB2271CD784C39884B637DEFDCD1650@VI1PR0501MB2271.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <a8f3f707-bb7a-0cb3-201f-6fcc06169677@cogentembedded.com>



> -----Original Message-----
> From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> Sent: Tuesday, February 12, 2019 3:01 AM
> To: Parav Pandit <parav@mellanox.com>; Jiri Pirko <jiri@mellanox.com>;
> davem@davemloft.net; netdev@vger.kernel.org
> Subject: Re: [PATCH net-next 2/2] devlink: Fix list access without lock while
> reading region
> 
> Hello!
> 
> On 12.02.2019 10:09, Parav Pandit wrote:
> 
> > While finding the devlink device during region reading, devlink device
> > list is accessed and devlink device is returned without holding a
> > lock. This could lead to user-after-free
> 
>     Use-after-free, perhaps?
> 
Yep. Sending v1 to fix typo.

> > accesses.
> >
> > While at it, add lockdep assert to ensure that all future callers hold
> > the lock when calling devlink_get_from_attrs().
> >
> > Fixes: 4e54795a27f5 ("devlink: Add support for region snapshot read
> > command")
> > Signed-off-by: Parav Pandit <parav@mellanox.com>
> > Acked-by: Jiri Pirko <jiri@mellanox.com>
> [...]
> 
> MBR, Sergei

      reply	other threads:[~2019-02-12 16:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12  7:09 [PATCH net-next 2/2] devlink: Fix list access without lock while reading region Parav Pandit
2019-02-12  9:01 ` Sergei Shtylyov
2019-02-12 16:04   ` Parav Pandit [this message]

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=VI1PR0501MB2271CD784C39884B637DEFDCD1650@VI1PR0501MB2271.eurprd05.prod.outlook.com \
    --to=parav@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=jiri@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=sergei.shtylyov@cogentembedded.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;
as well as URLs for NNTP newsgroup(s).