<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git, branch v4.9.69</title>
<subtitle>Clone of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/'/>
<entry>
<title>Linux 4.9.69</title>
<updated>2017-12-14T08:28:24+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2017-12-14T08:28:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=c91efc7862b3f3c61cb76e926990cdbff5354b57'/>
<id>c91efc7862b3f3c61cb76e926990cdbff5354b57</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>afs: Connect up the CB.ProbeUuid</title>
<updated>2017-12-14T08:28:24+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2017-11-02T15:27:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=15b175223e53da5597ea9e7c96691518b2ecaeca'/>
<id>15b175223e53da5597ea9e7c96691518b2ecaeca</id>
<content type='text'>
[ Upstream commit f4b3526d83c40dd8bf5948b9d7a1b2c340f0dcc8 ]

The handler for the CB.ProbeUuid operation in the cache manager is
implemented, but isn't listed in the switch-statement of operation
selection, so won't be used.  Fix this by adding it.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit f4b3526d83c40dd8bf5948b9d7a1b2c340f0dcc8 ]

The handler for the CB.ProbeUuid operation in the cache manager is
implemented, but isn't listed in the switch-statement of operation
selection, so won't be used.  Fix this by adding it.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>IB/mlx5: Assign send CQ and recv CQ of UMR QP</title>
<updated>2017-12-14T08:28:24+00:00</updated>
<author>
<name>Majd Dibbiny</name>
<email>majd@mellanox.com</email>
</author>
<published>2017-10-30T12:23:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=9048b2420e32bc66dd19f64a9ccb3329d0eaa1bd'/>
<id>9048b2420e32bc66dd19f64a9ccb3329d0eaa1bd</id>
<content type='text'>
[ Upstream commit 31fde034a8bd964a5c7c1a5663fc87a913158db2 ]

The UMR's QP is created by calling mlx5_ib_create_qp directly, and
therefore the send CQ and the recv CQ on the ibqp weren't assigned.

Assign them right after calling the mlx5_ib_create_qp to assure
that any access to those pointers will work as expected and won't
crash the system as might happen as part of reset flow.

Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters")
Signed-off-by: Majd Dibbiny &lt;majd@mellanox.com&gt;
Reviewed-by: Yishai Hadas &lt;yishaih@mellanox.com&gt;
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 31fde034a8bd964a5c7c1a5663fc87a913158db2 ]

The UMR's QP is created by calling mlx5_ib_create_qp directly, and
therefore the send CQ and the recv CQ on the ibqp weren't assigned.

Assign them right after calling the mlx5_ib_create_qp to assure
that any access to those pointers will work as expected and won't
crash the system as might happen as part of reset flow.

Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters")
Signed-off-by: Majd Dibbiny &lt;majd@mellanox.com&gt;
Reviewed-by: Yishai Hadas &lt;yishaih@mellanox.com&gt;
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>IB/mlx4: Increase maximal message size under UD QP</title>
<updated>2017-12-14T08:28:24+00:00</updated>
<author>
<name>Mark Bloch</name>
<email>markb@mellanox.com</email>
</author>
<published>2017-11-02T13:22:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=06fea09c095920c01e79eb913f1eea9fc1792ba8'/>
<id>06fea09c095920c01e79eb913f1eea9fc1792ba8</id>
<content type='text'>
[ Upstream commit 5f22a1d87c5315a98981ecf93cd8de226cffe6ca ]

Maximal message should be used as a limit to the max message payload allowed,
without the headers. The ConnectX-3 check is done against this value includes
the headers. When the payload is 4K this will cause the NIC to drop packets.

Increase maximal message to 8K as workaround, this shouldn't change current
behaviour because we continue to set the MTU to 4k.

To reproduce;
set MTU to 4296 on the corresponding interface, for example:
ifconfig eth0 mtu 4296 (both server and client)

On server:
ib_send_bw -c UD -d mlx4_0 -s 4096 -n 1000000 -i1 -m 4096

On client:
ib_send_bw -d mlx4_0 -c UD &lt;server_ip&gt; -s 4096 -n 1000000 -i 1 -m 4096

Fixes: 6e0d733d9215 ("IB/mlx4: Allow 4K messages for UD QPs")
Signed-off-by: Mark Bloch &lt;markb@mellanox.com&gt;
Reviewed-by: Majd Dibbiny &lt;majd@mellanox.com&gt;
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 5f22a1d87c5315a98981ecf93cd8de226cffe6ca ]

Maximal message should be used as a limit to the max message payload allowed,
without the headers. The ConnectX-3 check is done against this value includes
the headers. When the payload is 4K this will cause the NIC to drop packets.

Increase maximal message to 8K as workaround, this shouldn't change current
behaviour because we continue to set the MTU to 4k.

To reproduce;
set MTU to 4296 on the corresponding interface, for example:
ifconfig eth0 mtu 4296 (both server and client)

On server:
ib_send_bw -c UD -d mlx4_0 -s 4096 -n 1000000 -i1 -m 4096

On client:
ib_send_bw -d mlx4_0 -c UD &lt;server_ip&gt; -s 4096 -n 1000000 -i 1 -m 4096

Fixes: 6e0d733d9215 ("IB/mlx4: Allow 4K messages for UD QPs")
Signed-off-by: Mark Bloch &lt;markb@mellanox.com&gt;
Reviewed-by: Majd Dibbiny &lt;majd@mellanox.com&gt;
Signed-off-by: Leon Romanovsky &lt;leon@kernel.org&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>xfrm: Copy policy family in clone_policy</title>
<updated>2017-12-14T08:28:24+00:00</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2017-11-10T03:14:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=6ceabde6664331f096462ff8fcb6f79f303a78ce'/>
<id>6ceabde6664331f096462ff8fcb6f79f303a78ce</id>
<content type='text'>
[ Upstream commit 0e74aa1d79a5bbc663e03a2804399cae418a0321 ]

The syzbot found an ancient bug in the IPsec code.  When we cloned
a socket policy (for example, for a child TCP socket derived from a
listening socket), we did not copy the family field.  This results
in a live policy with a zero family field.  This triggers a BUG_ON
check in the af_key code when the cloned policy is retrieved.

This patch fixes it by copying the family field over.

Reported-by: syzbot &lt;syzkaller@googlegroups.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 0e74aa1d79a5bbc663e03a2804399cae418a0321 ]

The syzbot found an ancient bug in the IPsec code.  When we cloned
a socket policy (for example, for a child TCP socket derived from a
listening socket), we did not copy the family field.  This results
in a live policy with a zero family field.  This triggers a BUG_ON
check in the af_key code when the cloned policy is retrieved.

This patch fixes it by copying the family field over.

Reported-by: syzbot &lt;syzkaller@googlegroups.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>jump_label: Invoke jump_label_test() via early_initcall()</title>
<updated>2017-12-14T08:28:24+00:00</updated>
<author>
<name>Jason Baron</name>
<email>jbaron@akamai.com</email>
</author>
<published>2017-11-13T21:48:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=74b470ce478a69bb3ce36b38e6c834d0578c3195'/>
<id>74b470ce478a69bb3ce36b38e6c834d0578c3195</id>
<content type='text'>
[ Upstream commit 92ee46efeb505ead3ab06d3c5ce695637ed5f152 ]

Fengguang Wu reported that running the rcuperf test during boot can cause
the jump_label_test() to hit a WARN_ON(). The issue is that the core jump
label code relies on kernel_text_address() to detect when it can no longer
update branches that may be contained in __init sections. The
kernel_text_address() in turn assumes that if the system_state variable is
greter than or equal to SYSTEM_RUNNING then __init sections are no longer
valid (since the assumption is that they have been freed). However, when
rcuperf is setup to run in early boot it can call kernel_power_off() which
sets the system_state to SYSTEM_POWER_OFF.

Since rcuperf initialization is invoked via a module_init(), we can make
the dependency of jump_label_test() needing to complete before rcuperf
explicit by calling it via early_initcall().

Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Jason Baron &lt;jbaron@akamai.com&gt;
Acked-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: http://lkml.kernel.org/r/1510609727-2238-1-git-send-email-jbaron@akamai.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 92ee46efeb505ead3ab06d3c5ce695637ed5f152 ]

Fengguang Wu reported that running the rcuperf test during boot can cause
the jump_label_test() to hit a WARN_ON(). The issue is that the core jump
label code relies on kernel_text_address() to detect when it can no longer
update branches that may be contained in __init sections. The
kernel_text_address() in turn assumes that if the system_state variable is
greter than or equal to SYSTEM_RUNNING then __init sections are no longer
valid (since the assumption is that they have been freed). However, when
rcuperf is setup to run in early boot it can call kernel_power_off() which
sets the system_state to SYSTEM_POWER_OFF.

Since rcuperf initialization is invoked via a module_init(), we can make
the dependency of jump_label_test() needing to complete before rcuperf
explicit by calling it via early_initcall().

Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Jason Baron &lt;jbaron@akamai.com&gt;
Acked-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: http://lkml.kernel.org/r/1510609727-2238-1-git-send-email-jbaron@akamai.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>atm: horizon: Fix irq release error</title>
<updated>2017-12-14T08:28:24+00:00</updated>
<author>
<name>Arvind Yadav</name>
<email>arvind.yadav.cs@gmail.com</email>
</author>
<published>2017-11-14T08:12:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=22d2456faefaed01ef3021fb8e6752e8c2f91a74'/>
<id>22d2456faefaed01ef3021fb8e6752e8c2f91a74</id>
<content type='text'>
[ Upstream commit bde533f2ea607cbbbe76ef8738b36243939a7bc2 ]

atm_dev_register() can fail here and passed parameters to free irq
which is not initialised. Initialization of 'dev-&gt;irq' happened after
the 'goto out_free_irq'. So using 'irq' insted of 'dev-&gt;irq' in
free_irq().

Signed-off-by: Arvind Yadav &lt;arvind.yadav.cs@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit bde533f2ea607cbbbe76ef8738b36243939a7bc2 ]

atm_dev_register() can fail here and passed parameters to free irq
which is not initialised. Initialization of 'dev-&gt;irq' happened after
the 'goto out_free_irq'. So using 'irq' insted of 'dev-&gt;irq' in
free_irq().

Signed-off-by: Arvind Yadav &lt;arvind.yadav.cs@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>clk: uniphier: fix DAPLL2 clock rate of Pro5</title>
<updated>2017-12-14T08:28:24+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2017-10-05T02:32:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=c488c2e141bcce57a02d308df01d6f4172393637'/>
<id>c488c2e141bcce57a02d308df01d6f4172393637</id>
<content type='text'>
[ Upstream commit 67affb78a4e4feb837953e3434c8402a5c3b272f ]

The parent of DAPLL2 should be DAPLL1.  Fix the clock connection.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 67affb78a4e4feb837953e3434c8402a5c3b272f ]

The parent of DAPLL2 should be DAPLL1.  Fix the clock connection.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bpf: fix lockdep splat</title>
<updated>2017-12-14T08:28:23+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2017-11-15T01:15:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=f45f4f8a7cd89570b987ff101bcc510e9cfc2a9a'/>
<id>f45f4f8a7cd89570b987ff101bcc510e9cfc2a9a</id>
<content type='text'>
[ Upstream commit 89ad2fa3f043a1e8daae193bcb5fe34d5f8caf28 ]

pcpu_freelist_pop() needs the same lockdep awareness than
pcpu_freelist_populate() to avoid a false positive.

 [ INFO: SOFTIRQ-safe -&gt; SOFTIRQ-unsafe lock order detected ]

 switchto-defaul/12508 [HC0[0]:SC0[6]:HE0:SE0] is trying to acquire:
  (&amp;htab-&gt;buckets[i].lock){......}, at: [&lt;ffffffff9dc099cb&gt;] __htab_percpu_map_update_elem+0x1cb/0x300

 and this task is already holding:
  (dev_queue-&gt;dev-&gt;qdisc_class ?: &amp;qdisc_tx_lock#2){+.-...}, at: [&lt;ffffffff9e135848&gt;] __dev_queue_xmit+0
x868/0x1240
 which would create a new lock dependency:
  (dev_queue-&gt;dev-&gt;qdisc_class ?: &amp;qdisc_tx_lock#2){+.-...} -&gt; (&amp;htab-&gt;buckets[i].lock){......}

 but this new dependency connects a SOFTIRQ-irq-safe lock:
  (dev_queue-&gt;dev-&gt;qdisc_class ?: &amp;qdisc_tx_lock#2){+.-...}
 ... which became SOFTIRQ-irq-safe at:
   [&lt;ffffffff9db5931b&gt;] __lock_acquire+0x42b/0x1f10
   [&lt;ffffffff9db5b32c&gt;] lock_acquire+0xbc/0x1b0
   [&lt;ffffffff9da05e38&gt;] _raw_spin_lock+0x38/0x50
   [&lt;ffffffff9e135848&gt;] __dev_queue_xmit+0x868/0x1240
   [&lt;ffffffff9e136240&gt;] dev_queue_xmit+0x10/0x20
   [&lt;ffffffff9e1965d9&gt;] ip_finish_output2+0x439/0x590
   [&lt;ffffffff9e197410&gt;] ip_finish_output+0x150/0x2f0
   [&lt;ffffffff9e19886d&gt;] ip_output+0x7d/0x260
   [&lt;ffffffff9e19789e&gt;] ip_local_out+0x5e/0xe0
   [&lt;ffffffff9e197b25&gt;] ip_queue_xmit+0x205/0x620
   [&lt;ffffffff9e1b8398&gt;] tcp_transmit_skb+0x5a8/0xcb0
   [&lt;ffffffff9e1ba152&gt;] tcp_write_xmit+0x242/0x1070
   [&lt;ffffffff9e1baffc&gt;] __tcp_push_pending_frames+0x3c/0xf0
   [&lt;ffffffff9e1b3472&gt;] tcp_rcv_established+0x312/0x700
   [&lt;ffffffff9e1c1acc&gt;] tcp_v4_do_rcv+0x11c/0x200
   [&lt;ffffffff9e1c3dc2&gt;] tcp_v4_rcv+0xaa2/0xc30
   [&lt;ffffffff9e191107&gt;] ip_local_deliver_finish+0xa7/0x240
   [&lt;ffffffff9e191a36&gt;] ip_local_deliver+0x66/0x200
   [&lt;ffffffff9e19137d&gt;] ip_rcv_finish+0xdd/0x560
   [&lt;ffffffff9e191e65&gt;] ip_rcv+0x295/0x510
   [&lt;ffffffff9e12ff88&gt;] __netif_receive_skb_core+0x988/0x1020
   [&lt;ffffffff9e130641&gt;] __netif_receive_skb+0x21/0x70
   [&lt;ffffffff9e1306ff&gt;] process_backlog+0x6f/0x230
   [&lt;ffffffff9e132129&gt;] net_rx_action+0x229/0x420
   [&lt;ffffffff9da07ee8&gt;] __do_softirq+0xd8/0x43d
   [&lt;ffffffff9e282bcc&gt;] do_softirq_own_stack+0x1c/0x30
   [&lt;ffffffff9dafc2f5&gt;] do_softirq+0x55/0x60
   [&lt;ffffffff9dafc3a8&gt;] __local_bh_enable_ip+0xa8/0xb0
   [&lt;ffffffff9db4c727&gt;] cpu_startup_entry+0x1c7/0x500
   [&lt;ffffffff9daab333&gt;] start_secondary+0x113/0x140

 to a SOFTIRQ-irq-unsafe lock:
  (&amp;head-&gt;lock){+.+...}
 ... which became SOFTIRQ-irq-unsafe at:
 ...  [&lt;ffffffff9db5971f&gt;] __lock_acquire+0x82f/0x1f10
   [&lt;ffffffff9db5b32c&gt;] lock_acquire+0xbc/0x1b0
   [&lt;ffffffff9da05e38&gt;] _raw_spin_lock+0x38/0x50
   [&lt;ffffffff9dc0b7fa&gt;] pcpu_freelist_pop+0x7a/0xb0
   [&lt;ffffffff9dc08b2c&gt;] htab_map_alloc+0x50c/0x5f0
   [&lt;ffffffff9dc00dc5&gt;] SyS_bpf+0x265/0x1200
   [&lt;ffffffff9e28195f&gt;] entry_SYSCALL_64_fastpath+0x12/0x17

 other info that might help us debug this:

 Chain exists of:
   dev_queue-&gt;dev-&gt;qdisc_class ?: &amp;qdisc_tx_lock#2 --&gt; &amp;htab-&gt;buckets[i].lock --&gt; &amp;head-&gt;lock

  Possible interrupt unsafe locking scenario:

        CPU0                    CPU1
        ----                    ----
   lock(&amp;head-&gt;lock);
                                local_irq_disable();
                                lock(dev_queue-&gt;dev-&gt;qdisc_class ?: &amp;qdisc_tx_lock#2);
                                lock(&amp;htab-&gt;buckets[i].lock);
   &lt;Interrupt&gt;
     lock(dev_queue-&gt;dev-&gt;qdisc_class ?: &amp;qdisc_tx_lock#2);

  *** DEADLOCK ***

Fixes: e19494edab82 ("bpf: introduce percpu_freelist")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 89ad2fa3f043a1e8daae193bcb5fe34d5f8caf28 ]

pcpu_freelist_pop() needs the same lockdep awareness than
pcpu_freelist_populate() to avoid a false positive.

 [ INFO: SOFTIRQ-safe -&gt; SOFTIRQ-unsafe lock order detected ]

 switchto-defaul/12508 [HC0[0]:SC0[6]:HE0:SE0] is trying to acquire:
  (&amp;htab-&gt;buckets[i].lock){......}, at: [&lt;ffffffff9dc099cb&gt;] __htab_percpu_map_update_elem+0x1cb/0x300

 and this task is already holding:
  (dev_queue-&gt;dev-&gt;qdisc_class ?: &amp;qdisc_tx_lock#2){+.-...}, at: [&lt;ffffffff9e135848&gt;] __dev_queue_xmit+0
x868/0x1240
 which would create a new lock dependency:
  (dev_queue-&gt;dev-&gt;qdisc_class ?: &amp;qdisc_tx_lock#2){+.-...} -&gt; (&amp;htab-&gt;buckets[i].lock){......}

 but this new dependency connects a SOFTIRQ-irq-safe lock:
  (dev_queue-&gt;dev-&gt;qdisc_class ?: &amp;qdisc_tx_lock#2){+.-...}
 ... which became SOFTIRQ-irq-safe at:
   [&lt;ffffffff9db5931b&gt;] __lock_acquire+0x42b/0x1f10
   [&lt;ffffffff9db5b32c&gt;] lock_acquire+0xbc/0x1b0
   [&lt;ffffffff9da05e38&gt;] _raw_spin_lock+0x38/0x50
   [&lt;ffffffff9e135848&gt;] __dev_queue_xmit+0x868/0x1240
   [&lt;ffffffff9e136240&gt;] dev_queue_xmit+0x10/0x20
   [&lt;ffffffff9e1965d9&gt;] ip_finish_output2+0x439/0x590
   [&lt;ffffffff9e197410&gt;] ip_finish_output+0x150/0x2f0
   [&lt;ffffffff9e19886d&gt;] ip_output+0x7d/0x260
   [&lt;ffffffff9e19789e&gt;] ip_local_out+0x5e/0xe0
   [&lt;ffffffff9e197b25&gt;] ip_queue_xmit+0x205/0x620
   [&lt;ffffffff9e1b8398&gt;] tcp_transmit_skb+0x5a8/0xcb0
   [&lt;ffffffff9e1ba152&gt;] tcp_write_xmit+0x242/0x1070
   [&lt;ffffffff9e1baffc&gt;] __tcp_push_pending_frames+0x3c/0xf0
   [&lt;ffffffff9e1b3472&gt;] tcp_rcv_established+0x312/0x700
   [&lt;ffffffff9e1c1acc&gt;] tcp_v4_do_rcv+0x11c/0x200
   [&lt;ffffffff9e1c3dc2&gt;] tcp_v4_rcv+0xaa2/0xc30
   [&lt;ffffffff9e191107&gt;] ip_local_deliver_finish+0xa7/0x240
   [&lt;ffffffff9e191a36&gt;] ip_local_deliver+0x66/0x200
   [&lt;ffffffff9e19137d&gt;] ip_rcv_finish+0xdd/0x560
   [&lt;ffffffff9e191e65&gt;] ip_rcv+0x295/0x510
   [&lt;ffffffff9e12ff88&gt;] __netif_receive_skb_core+0x988/0x1020
   [&lt;ffffffff9e130641&gt;] __netif_receive_skb+0x21/0x70
   [&lt;ffffffff9e1306ff&gt;] process_backlog+0x6f/0x230
   [&lt;ffffffff9e132129&gt;] net_rx_action+0x229/0x420
   [&lt;ffffffff9da07ee8&gt;] __do_softirq+0xd8/0x43d
   [&lt;ffffffff9e282bcc&gt;] do_softirq_own_stack+0x1c/0x30
   [&lt;ffffffff9dafc2f5&gt;] do_softirq+0x55/0x60
   [&lt;ffffffff9dafc3a8&gt;] __local_bh_enable_ip+0xa8/0xb0
   [&lt;ffffffff9db4c727&gt;] cpu_startup_entry+0x1c7/0x500
   [&lt;ffffffff9daab333&gt;] start_secondary+0x113/0x140

 to a SOFTIRQ-irq-unsafe lock:
  (&amp;head-&gt;lock){+.+...}
 ... which became SOFTIRQ-irq-unsafe at:
 ...  [&lt;ffffffff9db5971f&gt;] __lock_acquire+0x82f/0x1f10
   [&lt;ffffffff9db5b32c&gt;] lock_acquire+0xbc/0x1b0
   [&lt;ffffffff9da05e38&gt;] _raw_spin_lock+0x38/0x50
   [&lt;ffffffff9dc0b7fa&gt;] pcpu_freelist_pop+0x7a/0xb0
   [&lt;ffffffff9dc08b2c&gt;] htab_map_alloc+0x50c/0x5f0
   [&lt;ffffffff9dc00dc5&gt;] SyS_bpf+0x265/0x1200
   [&lt;ffffffff9e28195f&gt;] entry_SYSCALL_64_fastpath+0x12/0x17

 other info that might help us debug this:

 Chain exists of:
   dev_queue-&gt;dev-&gt;qdisc_class ?: &amp;qdisc_tx_lock#2 --&gt; &amp;htab-&gt;buckets[i].lock --&gt; &amp;head-&gt;lock

  Possible interrupt unsafe locking scenario:

        CPU0                    CPU1
        ----                    ----
   lock(&amp;head-&gt;lock);
                                local_irq_disable();
                                lock(dev_queue-&gt;dev-&gt;qdisc_class ?: &amp;qdisc_tx_lock#2);
                                lock(&amp;htab-&gt;buckets[i].lock);
   &lt;Interrupt&gt;
     lock(dev_queue-&gt;dev-&gt;qdisc_class ?: &amp;qdisc_tx_lock#2);

  *** DEADLOCK ***

Fixes: e19494edab82 ("bpf: introduce percpu_freelist")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sctp: use the right sk after waking up from wait_buf sleep</title>
<updated>2017-12-14T08:28:23+00:00</updated>
<author>
<name>Xin Long</name>
<email>lucien.xin@gmail.com</email>
</author>
<published>2017-11-15T08:57:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=9904da5a09cec1dbcfc434b79950a2608ea23907'/>
<id>9904da5a09cec1dbcfc434b79950a2608ea23907</id>
<content type='text'>
[ Upstream commit cea0cc80a6777beb6eb643d4ad53690e1ad1d4ff ]

Commit dfcb9f4f99f1 ("sctp: deny peeloff operation on asocs with threads
sleeping on it") fixed the race between peeloff and wait sndbuf by
checking waitqueue_active(&amp;asoc-&gt;wait) in sctp_do_peeloff().

But it actually doesn't work, as even if waitqueue_active returns false
the waiting sndbuf thread may still not yet hold sk lock. After asoc is
peeled off, sk is not asoc-&gt;base.sk any more, then to hold the old sk
lock couldn't make assoc safe to access.

This patch is to fix this by changing to hold the new sk lock if sk is
not asoc-&gt;base.sk, meanwhile, also set the sk in sctp_sendmsg with the
new sk.

With this fix, there is no more race between peeloff and waitbuf, the
check 'waitqueue_active' in sctp_do_peeloff can be removed.

Thanks Marcelo and Neil for making this clear.

v1-&gt;v2:
  fix it by changing to lock the new sock instead of adding a flag in asoc.

Suggested-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit cea0cc80a6777beb6eb643d4ad53690e1ad1d4ff ]

Commit dfcb9f4f99f1 ("sctp: deny peeloff operation on asocs with threads
sleeping on it") fixed the race between peeloff and wait sndbuf by
checking waitqueue_active(&amp;asoc-&gt;wait) in sctp_do_peeloff().

But it actually doesn't work, as even if waitqueue_active returns false
the waiting sndbuf thread may still not yet hold sk lock. After asoc is
peeled off, sk is not asoc-&gt;base.sk any more, then to hold the old sk
lock couldn't make assoc safe to access.

This patch is to fix this by changing to hold the new sk lock if sk is
not asoc-&gt;base.sk, meanwhile, also set the sk in sctp_sendmsg with the
new sk.

With this fix, there is no more race between peeloff and waitbuf, the
check 'waitqueue_active' in sctp_do_peeloff can be removed.

Thanks Marcelo and Neil for making this clear.

v1-&gt;v2:
  fix it by changing to lock the new sock instead of adding a flag in asoc.

Suggested-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
