pull request [net]: batman-adv 20160216
Message ID | 1455634888-29400-1-git-send-email-a@unstable.cc (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers |
Return-Path: <a@unstable.cc> Received-SPF: Permerror (SPF Permanent Error: Two or more type TXT spf records found.) identity=mailfrom; client-ip=5.148.176.60; helo=s2.neomailbox.net; envelope-from=a@unstable.cc; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=none header.from=unstable.cc Received: from s2.neomailbox.net (s2.neomailbox.net [5.148.176.60]) by open-mesh.org (Postfix) with ESMTPS id 1138482333 for <b.a.t.m.a.n@lists.open-mesh.org>; Tue, 16 Feb 2016 16:03:52 +0100 (CET) From: Antonio Quartulli <a@unstable.cc> To: davem@davemloft.net Date: Tue, 16 Feb 2016 23:01:25 +0800 Message-Id: <1455634888-29400-1-git-send-email-a@unstable.cc> Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org Subject: [B.A.T.M.A.N.] pull request [net]: batman-adv 20160216 X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking <b.a.t.m.a.n.lists.open-mesh.org> List-Unsubscribe: <https://lists.open-mesh.org/mm/options/b.a.t.m.a.n>, <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=unsubscribe> List-Archive: <http://lists.open-mesh.org/pipermail/b.a.t.m.a.n/> List-Post: <mailto:b.a.t.m.a.n@lists.open-mesh.org> List-Help: <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=help> List-Subscribe: <https://lists.open-mesh.org/mm/listinfo/b.a.t.m.a.n>, <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=subscribe> X-List-Received-Date: Tue, 16 Feb 2016 15:03:58 -0000 |
Pull-request
git://git.open-mesh.org/linux-merge.git tags/batman-adv-fix-for-davemMessage
Antonio Quartulli
Feb. 16, 2016, 3:01 p.m. UTC
Hello David, this pull request is intended for net. Two of the fixes included in this patchset prevent a wrong memory access - it was triggered when removing an object from a list after it was already free'd due to bad reference counting. This misbehaviour existed for both the gw_node and the orig_node_vlan object and has been fixed by Sven Eckelmann. The last patch fixes our interface feasibility check and prevents it from looping indefinitely when two net_device objects reference each other via iflink index (i.e. veth pair), by Andrew Lunn Please pull or let me know of any problem! Thanks a lot, Antonio The following changes since commit db92ea5d4df00271b57d79c2d03dae5a5d60fcc1: dscc4: Undefined signed int shift (2016-02-13 06:10:21 -0500) are available in the git repository at: git://git.open-mesh.org/linux-merge.git tags/batman-adv-fix-for-davem for you to fetch changes up to 1bc4e2b000e7fa9773d6623bc8850561ce10a4fb: batman-adv: Avoid endless loop in bat-on-bat netdevice check (2016-02-16 22:16:33 +0800) ---------------------------------------------------------------- Two of the fixes included in this patchset prevent wrong memory access - it was triggered when removing an object from a list after it was already free'd due to bad reference counting. This misbehaviour existed for both the gw_node and the orig_node_vlan object and has been fixed by Sven Eckelmann. The last patch fixes our interface feasibility check and prevents it from looping indefinitely when two net_device objects reference each other via iflink index (i.e. veth pair), by Andrew Lunn ---------------------------------------------------------------- Andrew Lunn (1): batman-adv: Avoid endless loop in bat-on-bat netdevice check Sven Eckelmann (2): batman-adv: Only put gw_node list reference when removed batman-adv: Only put orig_node_vlan list reference when removed net/batman-adv/gateway_client.c | 7 ++++--- net/batman-adv/hard-interface.c | 25 +++++++++++++++++++++++++ net/batman-adv/translation-table.c | 6 ++++-- 3 files changed, 33 insertions(+), 5 deletions(-)
Comments
On Tue, Feb 16, 2016 at 11:01:25PM +0800, Antonio Quartulli wrote: > Hello David, > > this pull request is intended for net. David, when merging net into net-next these patches will create a conflict which git should try to fix on its own. However, it will still ask you to confirm something. Here are the relevant chunks: --- a/net/batman-adv/gateway_client.c +++ b/net/batman-adv/gateway_client.c @@@ -544,11 -527,12 +544,17 @@@ void batadv_gw_node_update(struct batad * gets dereferenced. */ spin_lock_bh(&bat_priv->gw.list_lock); - hlist_del_init_rcu(&gw_node->list); + if (!hlist_unhashed(&gw_node->list)) { + hlist_del_init_rcu(&gw_node->list); + batadv_gw_node_free_ref(gw_node); + } spin_unlock_bh(&bat_priv->gw.list_lock); ++<<<<<<< HEAD + batadv_gw_node_put(gw_node); + ++======= ++>>>>>>> maint if you have this conflict, please keep the "maint" block. Moreover, make sure that every reference to batadv_gw_node_free_ref() in this file is substituted with batadv_gw_node_put() (there should be only one). diff --cc net/batman-adv/translation-table.c index 2fd5b28,7301a92..0000000 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c @@@ -346,12 -311,14 +346,18 @@@ static void batadv_tt_global_size_mod(s if (atomic_add_return(v, &vlan->tt.num_entries) == 0) { spin_lock_bh(&orig_node->vlan_list_lock); - hlist_del_init_rcu(&vlan->list); + if (!hlist_unhashed(&vlan->list)) { + hlist_del_init_rcu(&vlan->list); + batadv_orig_node_vlan_free_ref(vlan); + } spin_unlock_bh(&orig_node->vlan_list_lock); ++<<<<<<< HEAD + batadv_orig_node_vlan_put(vlan); ++======= ++>>>>>>> maint if you have this conflict, please keep the "maint" block. Moreover, make sure that every reference to batadv_orig_node_vlan_free_ref() in this file is substituted with batadv_orig_node_vlan_put() (there should be only one). Obviously, I can check the final result after your merge operation. Thanks! Cheers,
From: Antonio Quartulli <a@unstable.cc> Date: Tue, 16 Feb 2016 23:01:25 +0800 > this pull request is intended for net. > > Two of the fixes included in this patchset prevent a wrong memory > access - it was triggered when removing an object from a list > after it was already free'd due to bad reference counting. > This misbehaviour existed for both the gw_node and the > orig_node_vlan object and has been fixed by Sven Eckelmann. > > The last patch fixes our interface feasibility check and prevents > it from looping indefinitely when two net_device objects > reference each other via iflink index (i.e. veth pair), by > Andrew Lunn Pulled, thanks Antonio. And thanks for the heads up about the potential merge issues, I'll watch for that.
On Fri, Feb 19, 2016 at 03:37:18PM -0500, David Miller wrote: > And thanks for the heads up about the potential merge issues, I'll watch > for that. > Hi David, actually I just realized that the patches that will create the conflict are not yet in net-next, but they are still pending in my queue. At this point I will wait for you to merge net into net-next first (there should be no conflict at that point) and then I will rebase my pending patches on top of that. This should prevent you from dealing with any conflict. Regards,
On Sat, Feb 20, 2016 at 01:28:40PM +0800, Antonio Quartulli wrote: > On Fri, Feb 19, 2016 at 03:37:18PM -0500, David Miller wrote: > > And thanks for the heads up about the potential merge issues, I'll watch > > for that. > > > > Hi David, > > actually I just realized that the patches that will create the conflict > are not yet in net-next, but they are still pending in my queue. > > At this point I will wait for you to merge net into net-next first > (there should be no conflict at that point) and then I will rebase > my pending patches on top of that. > > > This should prevent you from dealing with any conflict. Hi David, I know this kind of mails steal you some time, but do you have any plan about merging net into net-next in the next days ? I have some more new changes coming, but I'd like to send them only after the merge operation is done to avoid you to deal with some conflicts (as per above). Thanks !
From: Antonio Quartulli <a@unstable.cc> Date: Tue, 23 Feb 2016 13:07:50 +0800 > I know this kind of mails steal you some time, but do you have any plan > about merging net into net-next in the next days ? It's what I'm working on right now.
From: David Miller <davem@davemloft.net> Date: Tue, 23 Feb 2016 00:12:35 -0500 (EST) > From: Antonio Quartulli <a@unstable.cc> > Date: Tue, 23 Feb 2016 13:07:50 +0800 > >> I know this kind of mails steal you some time, but do you have any plan >> about merging net into net-next in the next days ? > > It's what I'm working on right now. And, done.