* Patch "batman-adv: fix splat on disabling an interface" has been added to the 4.8-stable tree
@ 2016-11-17 9:04 gregkh
2016-11-18 10:33 ` [B.A.T.M.A.N.] " Linus Lüssing
0 siblings, 1 reply; 4+ messages in thread
From: gregkh @ 2016-11-17 9:04 UTC (permalink / raw)
To: linus.luessing; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
batman-adv: fix splat on disabling an interface
to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
batman-adv-fix-splat-on-disabling-an-interface.patch
and it can be found in the queue-4.8 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 9799c50372b23ed774791bdb87d700f1286ee8a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Linus=20L=C3=BCssing?= <linus.luessing@c0d3.blue>
Date: Thu, 6 Oct 2016 01:43:08 +0200
Subject: batman-adv: fix splat on disabling an interface
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Linus Lüssing <linus.luessing@c0d3.blue>
commit 9799c50372b23ed774791bdb87d700f1286ee8a9 upstream.
As long as there is still a reference for a hard interface held, there might
still be a forwarding packet relying on its attributes.
Therefore avoid setting hard_iface->soft_iface to NULL when disabling a hard
interface.
This fixes the following, potential splat:
batman_adv: bat0: Interface deactivated: eth1
batman_adv: bat0: Removing interface: eth1
cgroup: new mount options do not match the existing superblock, will be ignored
batman_adv: bat0: Interface deactivated: eth3
batman_adv: bat0: Removing interface: eth3
------------[ cut here ]------------
WARNING: CPU: 3 PID: 1986 at ./net/batman-adv/bat_iv_ogm.c:549 batadv_iv_send_outstanding_bat_ogm_packet+0x145/0x643 [batman_adv]
Modules linked in: batman_adv(O-) <...>
CPU: 3 PID: 1986 Comm: kworker/u8:2 Tainted: G W O 4.6.0-rc6+ #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014
Workqueue: bat_events batadv_iv_send_outstanding_bat_ogm_packet [batman_adv]
0000000000000000 ffff88001d93bca0 ffffffff8126c26b 0000000000000000
0000000000000000 ffff88001d93bcf0 ffffffff81051615 ffff88001f19f818
000002251d93bd68 0000000000000046 ffff88001dc04a00 ffff88001becbe48
Call Trace:
[<ffffffff8126c26b>] dump_stack+0x67/0x90
[<ffffffff81051615>] __warn+0xc7/0xe5
[<ffffffff8105164b>] warn_slowpath_null+0x18/0x1a
[<ffffffffa0356f24>] batadv_iv_send_outstanding_bat_ogm_packet+0x145/0x643 [batman_adv]
[<ffffffff8108b01f>] ? __lock_is_held+0x32/0x54
[<ffffffff810689a2>] process_one_work+0x2a8/0x4f5
[<ffffffff81068856>] ? process_one_work+0x15c/0x4f5
[<ffffffff81068df2>] worker_thread+0x1d5/0x2c0
[<ffffffff81068c1d>] ? process_scheduled_works+0x2e/0x2e
[<ffffffff81068c1d>] ? process_scheduled_works+0x2e/0x2e
[<ffffffff8106dd90>] kthread+0xc0/0xc8
[<ffffffff8144de82>] ret_from_fork+0x22/0x40
[<ffffffff8106dcd0>] ? __init_kthread_worker+0x55/0x55
---[ end trace 647f9f325123dc05 ]---
What happened here is, that there was still a forw_packet (here: a BATMAN IV
OGM) in the queue of eth3 with the forw_packet->if_incoming set to eth1 and the
forw_packet->if_outgoing set to eth3.
When eth3 is to be deactivated and removed, then this thread waits for the
forw_packet queued on eth3 to finish. Because eth1 was deactivated and removed
earlier and by that had forw_packet->if_incoming->soft_iface, set to NULL, the
splat when trying to send/flush the OGM on eth3 occures.
Fixes: c6c8fea29769 ("net: Add batman-adv meshing protocol")
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
[sven@narfation.org: Reduced size of Oops message]
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/batman-adv/hard-interface.c | 1 -
1 file changed, 1 deletion(-)
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -617,7 +617,6 @@ void batadv_hardif_disable_interface(str
batadv_softif_destroy_sysfs(hard_iface->soft_iface);
}
- hard_iface->soft_iface = NULL;
batadv_hardif_put(hard_iface);
out:
Patches currently in stable-queue which might be from linus.luessing@c0d3.blue are
queue-4.8/batman-adv-modify-neigh_list-only-with-rcu-list-functions.patch
queue-4.8/batman-adv-fix-splat-on-disabling-an-interface.patch
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [B.A.T.M.A.N.] Patch "batman-adv: fix splat on disabling an interface" has been added to the 4.8-stable tree
2016-11-17 9:04 Patch "batman-adv: fix splat on disabling an interface" has been added to the 4.8-stable tree gregkh
@ 2016-11-18 10:33 ` Linus Lüssing
2016-11-18 10:45 ` Sven Eckelmann
0 siblings, 1 reply; 4+ messages in thread
From: Linus Lüssing @ 2016-11-18 10:33 UTC (permalink / raw)
To: b.a.t.m.a.n
On Thu, Nov 17, 2016 at 10:04:53AM +0100, gregkh@linuxfoundation.org wrote:
>
> This is a note to let you know that I've just added the patch titled
>
> batman-adv: fix splat on disabling an interface
>
> to the 4.8-stable tree which can be found at:
> http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
>
> The filename of the patch is:
> batman-adv-fix-splat-on-disabling-an-interface.patch
> and it can be found in the queue-4.8 subdirectory.
>
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <stable@vger.kernel.org> know about it.
>
>
> From 9799c50372b23ed774791bdb87d700f1286ee8a9 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Linus=20L=C3=BCssing?= <linus.luessing@c0d3.blue>
> Date: Thu, 6 Oct 2016 01:43:08 +0200
> Subject: batman-adv: fix splat on disabling an interface
> [...]
Does anyone know whether I should mail Greg, asking him not to apply it?
Or is the revert of this commit supposed to trickle through soon
anyways?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [B.A.T.M.A.N.] Patch "batman-adv: fix splat on disabling an interface" has been added to the 4.8-stable tree
2016-11-18 10:33 ` [B.A.T.M.A.N.] " Linus Lüssing
@ 2016-11-18 10:45 ` Sven Eckelmann
2016-11-18 11:19 ` Linus Lüssing
0 siblings, 1 reply; 4+ messages in thread
From: Sven Eckelmann @ 2016-11-18 10:45 UTC (permalink / raw)
To: b.a.t.m.a.n
[-- Attachment #1: Type: text/plain, Size: 728 bytes --]
On Freitag, 18. November 2016 11:33:27 CET Linus Lüssing wrote:
> On Thu, Nov 17, 2016 at 10:04:53AM +0100, gregkh@linuxfoundation.org wrote:
> >
> > This is a note to let you know that I've just added the patch titled
> >
> > batman-adv: fix splat on disabling an interface
[...]
> Does anyone know whether I should mail Greg, asking him not to apply it?
> Or is the revert of this commit supposed to trickle through soon
> anyways?
>
See
* https://lkml.kernel.org/r/8968438.8jDTpzOKUM@bentobox
* https://lkml.kernel.org/r/20161117120257.GB22450@kroah.com
* https://git.kernel.org/cgit/linux/kernel/git/stable/stable-queue.git/commit/?id=2e1eb0caa4614c9432590fab3f7c4f61c7ca0a7f
Kind regards,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [B.A.T.M.A.N.] Patch "batman-adv: fix splat on disabling an interface" has been added to the 4.8-stable tree
2016-11-18 10:45 ` Sven Eckelmann
@ 2016-11-18 11:19 ` Linus Lüssing
0 siblings, 0 replies; 4+ messages in thread
From: Linus Lüssing @ 2016-11-18 11:19 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
On Fri, Nov 18, 2016 at 11:45:38AM +0100, Sven Eckelmann wrote:
> See
>
> * https://lkml.kernel.org/r/8968438.8jDTpzOKUM@bentobox
> * https://lkml.kernel.org/r/20161117120257.GB22450@kroah.com
> * https://git.kernel.org/cgit/linux/kernel/git/stable/stable-queue.git/commit/?id=2e1eb0caa4614c9432590fab3f7c4f61c7ca0a7f
Saw that other thread a few mails later in my inbox,
just after replying to this one :D.
Thanks for having taken care of it!
Regards, Linus
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-11-18 11:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-17 9:04 Patch "batman-adv: fix splat on disabling an interface" has been added to the 4.8-stable tree gregkh
2016-11-18 10:33 ` [B.A.T.M.A.N.] " Linus Lüssing
2016-11-18 10:45 ` Sven Eckelmann
2016-11-18 11:19 ` Linus Lüssing
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.