<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/Intel-BMC/linux.git/net, branch dev-4.3</title>
<subtitle>Intel OpenBMC Linux kernel source tree (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.3</id>
<link rel='self' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.3'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/'/>
<updated>2016-02-29T01:22:41+00:00</updated>
<entry>
<title>net/ncsi: Fix possible deadlock caught with lockdep</title>
<updated>2016-02-29T01:22:41+00:00</updated>
<author>
<name>Cyril Bur</name>
<email>cyrilbur@gmail.com</email>
</author>
<published>2016-02-25T02:27:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=35d2cfb27392c73096b9cbdb0e250a900474301f'/>
<id>urn:sha1:35d2cfb27392c73096b9cbdb0e250a900474301f</id>
<content type='text'>
Bringing the interfaces down with ifdown -a directly after boot causes a
lockdep warning. It appears that a network interrupt would result in an
attempt to acquire that lock again.

The solution is to soft disable interrupts.

=================================
[ INFO: inconsistent lock state ]
4.3.6 #1 Not tainted
---------------------------------
inconsistent {IN-SOFTIRQ-W} -&gt; {SOFTIRQ-ON-W} usage.
ip/934 [HC0[0]:SC0[0]:HE1:SE1] takes:
 (&amp;(&amp;ndp-&gt;ndp_package_lock)-&gt;rlock){+.?...}, at: [&lt;c03b0c9c&gt;]
ncsi_stop_dev+0x14/0x50
{IN-SOFTIRQ-W} state was registered at:
  [&lt;c03bbdf8&gt;] _raw_spin_lock+0x28/0x38
  [&lt;c03b08b0&gt;] ncsi_add_package+0x64/0xf0
  [&lt;c03af978&gt;] ncsi_rsp_handler_sp+0x80/0xe0
  [&lt;c03afb4c&gt;] ncsi_rcv_rsp+0xd4/0x104
  [&lt;c0308204&gt;] __netif_receive_skb_core+0x6c4/0x808
  [&lt;c0309d8c&gt;] netif_receive_skb_internal+0xb4/0x138
  [&lt;c030a664&gt;] napi_gro_receive+0x48/0x9c
  [&lt;c026d784&gt;] ftgmac100_poll+0x360/0x59c
  [&lt;c030ad48&gt;] net_rx_action+0xe8/0x2a0
  [&lt;c001a524&gt;] __do_softirq+0x108/0x26c
  [&lt;c001a728&gt;] do_softirq+0x48/0x70
  [&lt;c001a818&gt;] __local_bh_enable_ip+0xc8/0x104
  [&lt;c030d120&gt;] __dev_queue_xmit+0x654/0x6c4
  [&lt;c03ae648&gt;] ncsi_xmit_cmd+0x1d4/0x208
  [&lt;c03b01e0&gt;] ncsi_dev_start+0xd0/0x3c0
  [&lt;c03b0c44&gt;] ncsi_dev_work+0x1b8/0x1fc
  [&lt;c002c7a4&gt;] process_one_work+0x228/0x3cc
  [&lt;c002d5e0&gt;] worker_thread+0x2a4/0x3d8
  [&lt;c0031ba0&gt;] kthread+0xc4/0xd8
  [&lt;c000a3ac&gt;] ret_from_fork+0x14/0x28
irq event stamp: 2009
hardirqs last  enabled at (2009): [&lt;c001a834&gt;]
__local_bh_enable_ip+0xe4/0x104
hardirqs last disabled at (2007): [&lt;c001a7b4&gt;]
__local_bh_enable_ip+0x64/0x104
softirqs last  enabled at (2008): [&lt;c0326a44&gt;]
dev_deactivate_many+0x270/0x2ac
softirqs last disabled at (2006): [&lt;c0326a28&gt;]
dev_deactivate_many+0x254/0x2ac

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&amp;(&amp;ndp-&gt;ndp_package_lock)-&gt;rlock);
  &lt;Interrupt&gt;
    lock(&amp;(&amp;ndp-&gt;ndp_package_lock)-&gt;rlock);

 *** DEADLOCK ***

1 lock held by ip/934:
 #0:  (rtnl_mutex){+.+.+.}, at: [&lt;c036d0c8&gt;] devinet_ioctl+0x15c/0x6c8

stack backtrace:
CPU: 0 PID: 934 Comm: ip Not tainted 4.3.6 #1
Hardware name: ASpeed SoC
[&lt;c000fa2c&gt;] (unwind_backtrace) from [&lt;c000d5fc&gt;] (show_stack+0x10/0x14)
[&lt;c000d5fc&gt;] (show_stack) from [&lt;c0072a88&gt;] (print_usage_bug.part.11+0x220/0x288)
[&lt;c0072a88&gt;] (print_usage_bug.part.11) from [&lt;c0040394&gt;] (mark_lock+0x400/0x678)
[&lt;c0040394&gt;] (mark_lock) from [&lt;c004293c&gt;] (__lock_acquire+0xa0c/0x1a9c)
[&lt;c004293c&gt;] (__lock_acquire) from [&lt;c0043dc4&gt;] (lock_acquire+0x9c/0xbc)
[&lt;c0043dc4&gt;] (lock_acquire) from [&lt;c03bbdf8&gt;] (_raw_spin_lock+0x28/0x38)
[&lt;c03bbdf8&gt;] (_raw_spin_lock) from [&lt;c03b0c9c&gt;] (ncsi_stop_dev+0x14/0x50)
[&lt;c03b0c9c&gt;] (ncsi_stop_dev) from [&lt;c026cfa0&gt;] (ftgmac100_stop+0x1c/0x28)
[&lt;c026cfa0&gt;] (ftgmac100_stop) from [&lt;c0306cb0&gt;] (__dev_close_many+0xa0/0xc8)
[&lt;c0306cb0&gt;] (__dev_close_many) from [&lt;c0306dc8&gt;] (__dev_close+0x20/0x34)
[&lt;c0306dc8&gt;] (__dev_close) from [&lt;c030da50&gt;] (__dev_change_flags+0x8c/0x138)
[&lt;c030da50&gt;] (__dev_change_flags) from [&lt;c030db14&gt;] (dev_change_flags+0x18/0x48)
[&lt;c030db14&gt;] (dev_change_flags) from [&lt;c036d298&gt;] (devinet_ioctl+0x32c/0x6c8)
[&lt;c036d298&gt;] (devinet_ioctl) from [&lt;c02f42b0&gt;] (sock_ioctl+0x26c/0x2d0)
[&lt;c02f42b0&gt;] (sock_ioctl) from [&lt;c00b5804&gt;] (do_vfs_ioctl+0x588/0x67c)
[&lt;c00b5804&gt;] (do_vfs_ioctl) from [&lt;c00b592c&gt;] (SyS_ioctl+0x34/0x5c)
[&lt;c00b592c&gt;] (SyS_ioctl) from [&lt;c000a320&gt;] (ret_fast_syscall+0x0/0x1c)

Signed-off-by: Cyril Bur &lt;cyrilbur@gmail.com&gt;
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>ncsi: Fix not releasing lock in ncsi_rcv_rsp()</title>
<updated>2016-02-02T02:57:40+00:00</updated>
<author>
<name>Cyril Bur</name>
<email>cyrilbur@gmail.com</email>
</author>
<published>2016-01-20T22:15:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=c43c31d0e4279664e9e04befd5c0191e0d2fb5a9'/>
<id>urn:sha1:c43c31d0e4279664e9e04befd5c0191e0d2fb5a9</id>
<content type='text'>
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>Merge tag 'v4.3.5' into dev-4.3</title>
<updated>2016-02-02T02:23:42+00:00</updated>
<author>
<name>Joel Stanley</name>
<email>joel@jms.id.au</email>
</author>
<published>2016-02-02T02:23:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=f3f4aeb9ea8954c0da3cf0d12693f9a57f1f4ac7'/>
<id>urn:sha1:f3f4aeb9ea8954c0da3cf0d12693f9a57f1f4ac7</id>
<content type='text'>
This is the 4.3.5 stable release

Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>xfrm: dst_entries_init() per-net dst_ops</title>
<updated>2016-01-31T19:25:52+00:00</updated>
<author>
<name>Dan Streetman</name>
<email>dan.streetman@canonical.com</email>
</author>
<published>2015-10-29T13:51:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=1bd631fc9a4515878c1bb7effd19335d2f2d87c2'/>
<id>urn:sha1:1bd631fc9a4515878c1bb7effd19335d2f2d87c2</id>
<content type='text'>
[ Upstream commit a8a572a6b5f2a79280d6e302cb3c1cb1fbaeb3e8 ]

Remove the dst_entries_init/destroy calls for xfrm4 and xfrm6 dst_ops
templates; their dst_entries counters will never be used.  Move the
xfrm dst_ops initialization from the common xfrm/xfrm_policy.c to
xfrm4/xfrm4_policy.c and xfrm6/xfrm6_policy.c, and call dst_entries_init
and dst_entries_destroy for each net namespace.

The ipv4 and ipv6 xfrms each create dst_ops template, and perform
dst_entries_init on the templates.  The template values are copied to each
net namespace's xfrm.xfrm*_dst_ops.  The problem there is the dst_ops
pcpuc_entries field is a percpu counter and cannot be used correctly by
simply copying it to another object.

The result of this is a very subtle bug; changes to the dst entries
counter from one net namespace may sometimes get applied to a different
net namespace dst entries counter.  This is because of how the percpu
counter works; it has a main count field as well as a pointer to the
percpu variables.  Each net namespace maintains its own main count
variable, but all point to one set of percpu variables.  When any net
namespace happens to change one of the percpu variables to outside its
small batch range, its count is moved to the net namespace's main count
variable.  So with multiple net namespaces operating concurrently, the
dst_ops entries counter can stray from the actual value that it should
be; if counts are consistently moved from one net namespace to another
(which my testing showed is likely), then one net namespace winds up
with a negative dst_ops count while another winds up with a continually
increasing count, eventually reaching its gc_thresh limit, which causes
all new traffic on the net namespace to fail with -ENOBUFS.

Signed-off-by: Dan Streetman &lt;dan.streetman@canonical.com&gt;
Signed-off-by: Dan Streetman &lt;ddstreet@ieee.org&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>batman-adv: Drop immediate orig_node free function</title>
<updated>2016-01-31T19:25:52+00:00</updated>
<author>
<name>Sven Eckelmann</name>
<email>sven@narfation.org</email>
</author>
<published>2016-01-05T11:06:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=3f3f7cabcdecfbd3dca31d67c33b4704fe37b094'/>
<id>urn:sha1:3f3f7cabcdecfbd3dca31d67c33b4704fe37b094</id>
<content type='text'>
[ Upstream commit 42eff6a617e23b691f8e4467f4687ed7245a92db ]

It is not allowed to free the memory of an object which is part of a list
which is protected by rcu-read-side-critical sections without making sure
that no other context is accessing the object anymore. This usually happens
by removing the references to this object and then waiting until the rcu
grace period is over and no one (allowedly) accesses it anymore.

But the _now functions ignore this completely. They free the object
directly even when a different context still tries to access it. This has
to be avoided and thus these functions must be removed and all functions
have to use batadv_orig_node_free_ref.

Fixes: 72822225bd41 ("batman-adv: Fix rcu_barrier() miss due to double call_rcu() in TT code")
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Marek Lindner &lt;mareklindner@neomailbox.ch&gt;
Signed-off-by: Antonio Quartulli &lt;a@unstable.cc&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>batman-adv: Drop immediate batadv_hard_iface free function</title>
<updated>2016-01-31T19:25:52+00:00</updated>
<author>
<name>Sven Eckelmann</name>
<email>sven@narfation.org</email>
</author>
<published>2016-01-05T11:06:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=7c2b5cfe9e7cb4dbad762e4a4824291dbb779dd2'/>
<id>urn:sha1:7c2b5cfe9e7cb4dbad762e4a4824291dbb779dd2</id>
<content type='text'>
[ Upstream commit b4d922cfc9c08318eeb77d53b7633740e6b0efb0 ]

It is not allowed to free the memory of an object which is part of a list
which is protected by rcu-read-side-critical sections without making sure
that no other context is accessing the object anymore. This usually happens
by removing the references to this object and then waiting until the rcu
grace period is over and no one (allowedly) accesses it anymore.

But the _now functions ignore this completely. They free the object
directly even when a different context still tries to access it. This has
to be avoided and thus these functions must be removed and all functions
have to use batadv_hardif_free_ref.

Fixes: 89652331c00f ("batman-adv: split tq information in neigh_node struct")
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Marek Lindner &lt;mareklindner@neomailbox.ch&gt;
Signed-off-by: Antonio Quartulli &lt;a@unstable.cc&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>batman-adv: Drop immediate neigh_ifinfo free function</title>
<updated>2016-01-31T19:25:52+00:00</updated>
<author>
<name>Sven Eckelmann</name>
<email>sven@narfation.org</email>
</author>
<published>2016-01-05T11:06:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=5947b88c34c41a496c31a7c686b106030abd10b0'/>
<id>urn:sha1:5947b88c34c41a496c31a7c686b106030abd10b0</id>
<content type='text'>
[ Upstream commit ae3e1e36e3cb6c686a7a2725af20ca86aa46d62a ]

It is not allowed to free the memory of an object which is part of a list
which is protected by rcu-read-side-critical sections without making sure
that no other context is accessing the object anymore. This usually happens
by removing the references to this object and then waiting until the rcu
grace period is over and no one (allowedly) accesses it anymore.

But the _now functions ignore this completely. They free the object
directly even when a different context still tries to access it. This has
to be avoided and thus these functions must be removed and all functions
have to use batadv_neigh_ifinfo_free_ref.

Fixes: 89652331c00f ("batman-adv: split tq information in neigh_node struct")
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Marek Lindner &lt;mareklindner@neomailbox.ch&gt;
Signed-off-by: Antonio Quartulli &lt;a@unstable.cc&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>batman-adv: Drop immediate batadv_neigh_node free function</title>
<updated>2016-01-31T19:25:52+00:00</updated>
<author>
<name>Sven Eckelmann</name>
<email>sven@narfation.org</email>
</author>
<published>2016-01-05T11:06:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=6b283f6a212b0d18355d58e60985b2259d629c98'/>
<id>urn:sha1:6b283f6a212b0d18355d58e60985b2259d629c98</id>
<content type='text'>
[ Upstream commit 2baa753c276f27f8e844637561ad597867aa6fb6 ]

It is not allowed to free the memory of an object which is part of a list
which is protected by rcu-read-side-critical sections without making sure
that no other context is accessing the object anymore. This usually happens
by removing the references to this object and then waiting until the rcu
grace period is over and no one (allowedly) accesses it anymore.

But the _now functions ignore this completely. They free the object
directly even when a different context still tries to access it. This has
to be avoided and thus these functions must be removed and all functions
have to use batadv_neigh_node_free_ref.

Fixes: 89652331c00f ("batman-adv: split tq information in neigh_node struct")
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Marek Lindner &lt;mareklindner@neomailbox.ch&gt;
Signed-off-by: Antonio Quartulli &lt;a@unstable.cc&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>batman-adv: Drop immediate batadv_orig_ifinfo free function</title>
<updated>2016-01-31T19:25:52+00:00</updated>
<author>
<name>Sven Eckelmann</name>
<email>sven@narfation.org</email>
</author>
<published>2016-01-05T11:06:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=b8b82bfd8862fbe37df73663c22e1dfc4574f47f'/>
<id>urn:sha1:b8b82bfd8862fbe37df73663c22e1dfc4574f47f</id>
<content type='text'>
[ Upstream commit deed96605f5695cb945e0b3d79429581857a2b9d ]

It is not allowed to free the memory of an object which is part of a list
which is protected by rcu-read-side-critical sections without making sure
that no other context is accessing the object anymore. This usually happens
by removing the references to this object and then waiting until the rcu
grace period is over and no one (allowedly) accesses it anymore.

But the _now functions ignore this completely. They free the object
directly even when a different context still tries to access it. This has
to be avoided and thus these functions must be removed and all functions
have to use batadv_orig_ifinfo_free_ref.

Fixes: 7351a4822d42 ("batman-adv: split out router from orig_node")
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Marek Lindner &lt;mareklindner@neomailbox.ch&gt;
Signed-off-by: Antonio Quartulli &lt;a@unstable.cc&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>batman-adv: Avoid recursive call_rcu for batadv_nc_node</title>
<updated>2016-01-31T19:25:52+00:00</updated>
<author>
<name>Sven Eckelmann</name>
<email>sven@narfation.org</email>
</author>
<published>2016-01-05T11:06:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=fd937fb19af51a59787816ab49530637a5065159'/>
<id>urn:sha1:fd937fb19af51a59787816ab49530637a5065159</id>
<content type='text'>
[ Upstream commit 44e8e7e91d6c7c7ab19688750f7257292640d1a0 ]

The batadv_nc_node_free_ref function uses call_rcu to delay the free of the
batadv_nc_node object until no (already started) rcu_read_lock is enabled
anymore. This makes sure that no context is still trying to access the
object which should be removed. But batadv_nc_node also contains a
reference to orig_node which must be removed.

The reference drop of orig_node was done in the call_rcu function
batadv_nc_node_free_rcu but should actually be done in the
batadv_nc_node_release function to avoid nested call_rcus. This is
important because rcu_barrier (e.g. batadv_softif_free or batadv_exit) will
not detect the inner call_rcu as relevant for its execution. Otherwise this
barrier will most likely be inserted in the queue before the callback of
the first call_rcu was executed. The caller of rcu_barrier will therefore
continue to run before the inner call_rcu callback finished.

Fixes: d56b1705e28c ("batman-adv: network coding - detect coding nodes and remove these after timeout")
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Marek Lindner &lt;mareklindner@neomailbox.ch&gt;
Signed-off-by: Antonio Quartulli &lt;a@unstable.cc&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
