public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Aring <aring@mojatatu.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org, linux-wpan@vger.kernel.org,
	linux-bluetooth@vger.kernel.org
Subject: Re: netdevice notifier and device private data
Date: Fri, 8 Jun 2018 15:41:00 -0400	[thread overview]
Message-ID: <20180608194100.p5jtgook4bp4dkyw@x220t> (raw)
In-Reply-To: <20180608111457.0a9b4cae@xeon-e3>

Hi Stephen,

On Fri, Jun 08, 2018 at 11:14:57AM -0700, Stephen Hemminger wrote:
...
> 
> notifiers are always called with RTNL mutex held
> and dev->type should not change unless RTNL is held.

thanks for you answer. I am not talking about any race between notifiers
vs dev->type change.

I am talking that dev->type was already changed and a upcoming notifier ends
in undefined behaviour when it derefences dev->priv. I have some notifier
which maps a cast from dev->type to a specific structure at dev->priv. This
structure is not there in tap/tun devices if they changed to "my" dev->type
and the notifier occurs.

- Alex

  reply	other threads:[~2018-06-08 19:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-08 17:34 netdevice notifier and device private data Alexander Aring
2018-06-08 18:14 ` Stephen Hemminger
2018-06-08 19:41   ` Alexander Aring [this message]
2018-06-08 19:37 ` Michael Richardson
2018-06-09 15:29   ` Alexander Aring
2018-06-09 19:01     ` Michael Richardson
2018-06-10 15:39       ` Alexander Aring
2018-06-11  2:09         ` Michael Richardson
2018-06-12 13:22           ` Alexander Aring

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=20180608194100.p5jtgook4bp4dkyw@x220t \
    --to=aring@mojatatu.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.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