netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: vfalico@redhat.com
Cc: netdev@vger.kernel.org, fubar@us.ibm.com, andy@greyhouse.net,
	ebiederm@xmission.com, joe@perches.com
Subject: Re: [PATCH net-next 0/2] fix bonding neighbour setup handling
Date: Fri, 02 Aug 2013 15:45:39 -0700 (PDT)	[thread overview]
Message-ID: <20130802.154539.237539535236462726.davem@davemloft.net> (raw)
In-Reply-To: <1375463259-12033-1-git-send-email-vfalico@redhat.com>

From: Veaceslav Falico <vfalico@redhat.com>
Date: Fri,  2 Aug 2013 19:07:37 +0200

> Recent patches revealed an old bug, which was there for quite awhile. It's
> related to vlan on top of bonding and ndo_neigh_setup(). When vlan device
> is initiated, it calls its real_dev->ndo_neigh_setup(), and in case of
> bonding - it will modify neigh_parms->neigh_setup to point to
> bond_neigh_init, while neigh_parms are of vlan's dev.
> 
> This way, when neigh_parms->neigh_setup() of vlan's dev is called, the
> bonding function will be called, which expects the dev to be struct
> bonding, but will receive a vlan dev.
> 
> It was hidden before because of bond->first_slave usage. Now, with
> Nikolay's conversion to list/RCU, first_slave is gone and we hit a null
> pointer dereference when working with lists/slave.
> 
> First patch moves ndo_neigh_setup() in neigh_parms_alloc() to the bottom,
> so that the ->dev will be available to the caller. It doesn't really change
> anything, however is needed for the second patch.
> 
> Second patch makes bond_neigh_setup() (bond->ndo_neigh_setup()) check if
> the neigh_parms are really from a bonding dev, and only modify the
> neigh_setup in this case.

Thanks for the detailed explanation of the situation, it made your patches
trivial to review.

Applied, thanks.

  parent reply	other threads:[~2013-08-02 22:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-02 17:07 [PATCH net-next 0/2] fix bonding neighbour setup handling Veaceslav Falico
2013-08-02 17:07 ` [PATCH net-next 1/2] neighbour: populate neigh_parms on alloc before calling ndo_neigh_setup Veaceslav Falico
2013-08-02 17:07 ` [PATCH net-next 2/2] bonding: modify only neigh_parms owned by us Veaceslav Falico
2013-08-02 22:45 ` David Miller [this message]
2013-08-05 13:49   ` [PATCH net-next 0/2] fix bonding neighbour setup handling Nikolay Aleksandrov
2013-08-05 22:25     ` 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=20130802.154539.237539535236462726.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=andy@greyhouse.net \
    --cc=ebiederm@xmission.com \
    --cc=fubar@us.ibm.com \
    --cc=joe@perches.com \
    --cc=netdev@vger.kernel.org \
    --cc=vfalico@redhat.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).