netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: g.nault@alphalink.fr
Cc: netdev@vger.kernel.org, paulus@samba.org, alan@linux.intel.com,
	arnd@arndb.de
Subject: Re: [PATCH net] ppp: ensure file->private_data can't be overridden
Date: Mon, 14 Mar 2016 14:57:59 -0400 (EDT)	[thread overview]
Message-ID: <20160314.145759.727527672385295428.davem@davemloft.net> (raw)
In-Reply-To: <20160314175940.GB1462@alphalink.fr>

From: Guillaume Nault <g.nault@alphalink.fr>
Date: Mon, 14 Mar 2016 18:59:40 +0100

> Testing ->private_data without lock in ppp_ioctl() before calling
> ppp_unattached_ioctl() is fine, because either ->private_data is
> not NULL and thus is stable, or it is and ppp_unattached_ioctl()
> takes care of not overriding ->private_data, should its value get
> modified before taking the mutex.

This is exactly the ambiguous behavior I want you to avoid.

The decision should be atomic from ppp_ioctl()'s test all the way
until ppp_unattached_ioctl() does it's work.

  reply	other threads:[~2016-03-14 18:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-08 19:14 [PATCH net] ppp: ensure file->private_data can't be overridden Guillaume Nault
2016-03-11 19:42 ` David Miller
2016-03-14 17:59   ` Guillaume Nault
2016-03-14 18:57     ` David Miller [this message]
2016-03-14 19:09       ` Guillaume Nault

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=20160314.145759.727527672385295428.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=alan@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=g.nault@alphalink.fr \
    --cc=netdev@vger.kernel.org \
    --cc=paulus@samba.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 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).