<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net, branch v4.5</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-03-07T23:41:10Z</updated>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2016-03-07T23:41:10Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-03-07T23:41:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e2857b8f11a289ed2b61d18d0665e05c1053c446'/>
<id>urn:sha1:e2857b8f11a289ed2b61d18d0665e05c1053c446</id>
<content type='text'>
Pull networking fixes from David Miller:

 1) Fix ordering of WEXT netlink messages so we don't see a newlink
    after a dellink, from Johannes Berg.

 2) Out of bounds access in minstrel_ht_set_best_prob_rage, from
    Konstantin Khlebnikov.

 3) Paging buffer memory leak in iwlwifi, from Matti Gottlieb.

 4) Wrong units used to set initial TCP rto from cached metrics, also
    from Konstantin Khlebnikov.

 5) Fix stale IP options data in the SKB control block from leaking
    through layers of encapsulation, from Bernie Harris.

 6) Zero padding len miscalculated in bnxt_en, from Michael Chan.

 7) Only CHECKSUM_PARTIAL packets should be passed down through GSO, fix
    from Hannes Frederic Sowa.

 8) Fix suspend/resume with JME networking devices, from Diego Violat
    and Guo-Fu Tseng.

 9) Checksums not validated properly in bridge multicast support due to
    the placement of the SKB header pointers at the time of the check,
    fix from Álvaro Fernández Rojas.

10) Fix hang/tiemout with r8169 if a stats fetch is done while the
    device is runtime suspended.  From Chun-Hao Lin.

11) The forwarding database netlink dump facilities don't track the
    state of the dump properly, resulting in skipped/missed entries.
    From Minoura Makoto.

12) Fix regression from a recent 3c59x bug fix, from Neil Horman.

13) Fix list corruption in bna driver, from Ivan Vecera.

14) Big endian machines crash on vlan add in bnx2x, fix from Michal
    Schmidt.

15) Ethtool RSS configuration not propagated properly in mlx5 driver,
    from Tariq Toukan.

16) Fix regression in PHY probing in stmmac driver, from Gabriel
    Fernandez.

17) Fix SKB tailroom calculation in igmp/mld code, from Benjamin
    Poirier.

18) A past change to skip empty routing headers in ipv6 extention header
    parsing accidently caused fragment headers to not be matched any
    longer.  Fix from Florian Westphal.

19) eTSEC-106 erratum needs to be applied to more gianfar chips, from
    Atsushi Nemoto.

20) Fix netdev reference after free via workqueues in usb networking
    drivers, from Oliver Neukum and Bjørn Mork.

21) mdio-&gt;irq is now an array rather than a pointer to dynamic memory,
    but several drivers were still trying to free it :-/ Fixes from
    Colin Ian King.

22) act_ipt iptables action forgets to set the family field, thus LOG
    netfilter targets don't work with it.  Fix from Phil Sutter.

23) SKB leak in ibmveth when skb_linearize() fails, from Thomas Falcon.

24) pskb_may_pull() cannot be called with interrupts disabled, fix code
    that tries to do this in vmxnet3 driver, from Neil Horman.

25) be2net driver leaks iomap'd memory on removal, fix from Douglas
    Miller.

26) Forgotton RTNL mutex unlock in ppp_create_interface() error paths,
    from Guillaume Nault.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (97 commits)
  ppp: release rtnl mutex when interface creation fails
  cdc_ncm: do not call usbnet_link_change from cdc_ncm_bind
  tcp: fix tcpi_segs_in after connection establishment
  net: hns: fix the bug about loopback
  jme: Fix device PM wakeup API usage
  jme: Do not enable NIC WoL functions on S0
  udp6: fix UDP/IPv6 encap resubmit path
  be2net: Don't leak iomapped memory on removal.
  vmxnet3: avoid calling pskb_may_pull with interrupts disabled
  net: ethernet: Add missing MFD_SYSCON dependency on HAS_IOMEM
  ibmveth: check return of skb_linearize in ibmveth_start_xmit
  cdc_ncm: toggle altsetting to force reset before setup
  usbnet: cleanup after bind() in probe()
  mlxsw: pci: Correctly determine if descriptor queue is full
  mlxsw: spectrum: Always decrement bridge's ref count
  tipc: fix nullptr crash during subscription cancel
  net: eth: altera: do not free array priv-&gt;mdio-&gt;irq
  net/ethoc: do not free array priv-&gt;mdio-&gt;irq
  net: sched: fix act_ipt for LOG target
  asix: do not free array priv-&gt;mdio-&gt;irq
  ...
</content>
</entry>
<entry>
<title>tcp: fix tcpi_segs_in after connection establishment</title>
<updated>2016-03-07T20:47:13Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2016-03-06T17:29:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a9d99ce28ed359d68cf6f3c1a69038aefedf6d6a'/>
<id>urn:sha1:a9d99ce28ed359d68cf6f3c1a69038aefedf6d6a</id>
<content type='text'>
If final packet (ACK) of 3WHS is lost, it appears we do not properly
account the following incoming segment into tcpi_segs_in

While we are at it, starts segs_in with one, to count the SYN packet.

We do not yet count number of SYN we received for a request sock, we
might add this someday.

packetdrill script showing proper behavior after fix :

// Tests tcpi_segs_in when 3rd packet (ACK) of 3WHS is lost
0.000 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
   +0 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
   +0 bind(3, ..., ...) = 0
   +0 listen(3, 1) = 0

   +0 &lt; S 0:0(0) win 32792 &lt;mss 1000,sackOK,nop,nop&gt;
   +0 &gt; S. 0:0(0) ack 1 &lt;mss 1460,nop,nop,sackOK&gt;
+.020 &lt; P. 1:1001(1000) ack 1 win 32792

   +0 accept(3, ..., ...) = 4

+.000 %{ assert tcpi_segs_in == 2, 'tcpi_segs_in=%d' % tcpi_segs_in }%

Fixes: 2efd055c53c06 ("tcp: add tcpi_segs_in and tcpi_segs_out to tcp_info")
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>udp6: fix UDP/IPv6 encap resubmit path</title>
<updated>2016-03-07T20:23:12Z</updated>
<author>
<name>Bill Sommerfeld</name>
<email>wsommerfeld@google.com</email>
</author>
<published>2016-03-04T22:47:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=59dca1d8a6725a121dae6c452de0b2611d5865dc'/>
<id>urn:sha1:59dca1d8a6725a121dae6c452de0b2611d5865dc</id>
<content type='text'>
IPv4 interprets a negative return value from a protocol handler as a
request to redispatch to a new protocol.  In contrast, IPv6 interprets a
negative value as an error, and interprets a positive value as a request
for redispatch.

UDP for IPv6 was unaware of this difference.  Change __udp6_lib_rcv() to
return a positive value for redispatch.  Note that the socket's
encap_rcv hook still needs to return a negative value to request
dispatch, and in the case of IPv6 packets, adjust IP6CB(skb)-&gt;nhoff to
identify the byte containing the next protocol.

Signed-off-by: Bill Sommerfeld &lt;wsommerfeld@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: fix nullptr crash during subscription cancel</title>
<updated>2016-03-07T04:00:08Z</updated>
<author>
<name>Parthasarathy Bhuvaragan</name>
<email>parthasarathy.bhuvaragan@ericsson.com</email>
</author>
<published>2016-03-03T16:54:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4de13d7ed6ffdcbb34317acaa9236f121176f5f8'/>
<id>urn:sha1:4de13d7ed6ffdcbb34317acaa9236f121176f5f8</id>
<content type='text'>
commit 4d5cfcba2f6e ('tipc: fix connection abort during subscription
cancel'), removes the check for a valid subscription before calling
tipc_nametbl_subscribe().

This will lead to a nullptr exception when we process a
subscription cancel request. For a cancel request, a null
subscription is passed to tipc_nametbl_subscribe() resulting
in exception.

In this commit, we call tipc_nametbl_subscribe() only for
a valid subscription.

Fixes: 4d5cfcba2f6e ('tipc: fix connection abort during subscription cancel')
Reported-by: Anders Widell &lt;anders.widell@ericsson.com&gt;
Signed-off-by: Parthasarathy Bhuvaragan &lt;parthasarathy.bhuvaragan@ericsson.com&gt;
Acked-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: sched: fix act_ipt for LOG target</title>
<updated>2016-03-07T03:57:35Z</updated>
<author>
<name>Phil Sutter</name>
<email>phil@nwl.cc</email>
</author>
<published>2016-03-03T13:34:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=44ef548f4f8bbc739070583f9844ff0cd8fcc6b4'/>
<id>urn:sha1:44ef548f4f8bbc739070583f9844ff0cd8fcc6b4</id>
<content type='text'>
Before calling the destroy() or target() callbacks, the family parameter
field has to be initialized. Otherwise at least the LOG target will
refuse to work and upon removal oops the kernel.

Cc: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Signed-off-by: Phil Sutter &lt;phil@nwl.cc&gt;
Acked-by: Jamal Hadi Salim &lt;jhs@mojatatu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv6: re-enable fragment header matching in ipv6_find_hdr</title>
<updated>2016-03-03T21:35:20Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2016-03-01T15:15:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5d150a985520bbe3cb2aa1ceef24a7e32f20c15f'/>
<id>urn:sha1:5d150a985520bbe3cb2aa1ceef24a7e32f20c15f</id>
<content type='text'>
When ipv6_find_hdr is used to find a fragment header
(caller specifies target NEXTHDR_FRAGMENT) we erronously return
-ENOENT for all fragments with nonzero offset.

Before commit 9195bb8e381d, when target was specified, we did not
enter the exthdr walk loop as nexthdr == target so this used to work.

Now we do (so we can skip empty route headers). When we then stumble upon
a frag with nonzero frag_off we must return -ENOENT ("header not found")
only if the caller did not specifically request NEXTHDR_FRAGMENT.

This allows nfables exthdr expression to match ipv6 fragments, e.g. via

nft add rule ip6 filter input frag frag-off gt 0

Fixes: 9195bb8e381d ("ipv6: improve ipv6_find_hdr() to skip empty routing headers")
Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tipc: Revert "tipc: use existing sk_write_queue for outgoing packet chain"</title>
<updated>2016-03-03T21:30:29Z</updated>
<author>
<name>Parthasarathy Bhuvaragan</name>
<email>parthasarathy.bhuvaragan@ericsson.com</email>
</author>
<published>2016-03-01T10:07:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f214fc402967e1bc94ad7f39faa03db5813d6849'/>
<id>urn:sha1:f214fc402967e1bc94ad7f39faa03db5813d6849</id>
<content type='text'>
reverts commit 94153e36e709e ("tipc: use existing sk_write_queue for
outgoing packet chain")

In Commit 94153e36e709e, we assume that we fill &amp; empty the socket's
sk_write_queue within the same lock_sock() session.

This is not true if the link is congested. During congestion, the
socket lock is released while we wait for the congestion to cease.
This implementation causes a nullptr exception, if the user space
program has several threads accessing the same socket descriptor.

Consider two threads of the same program performing the following:
     Thread1                                  Thread2
--------------------                    ----------------------
Enter tipc_sendmsg()                    Enter tipc_sendmsg()
lock_sock()                             lock_sock()
Enter tipc_link_xmit(), ret=ELINKCONG   spin on socket lock..
sk_wait_event()                             :
release_sock()                          grab socket lock
    :                                   Enter tipc_link_xmit(), ret=0
    :                                   release_sock()
Wakeup after congestion
lock_sock()
skb = skb_peek(pktchain);
!! TIPC_SKB_CB(skb)-&gt;wakeup_pending = tsk-&gt;link_cong;

In this case, the second thread transmits the buffers belonging to
both thread1 and thread2 successfully. When the first thread wakeup
after the congestion it assumes that the pktchain is intact and
operates on the skb's in it, which leads to the following exception:

[2102.439969] BUG: unable to handle kernel NULL pointer dereference at 00000000000000d0
[2102.440074] IP: [&lt;ffffffffa005f330&gt;] __tipc_link_xmit+0x2b0/0x4d0 [tipc]
[2102.440074] PGD 3fa3f067 PUD 3fa6b067 PMD 0
[2102.440074] Oops: 0000 [#1] SMP
[2102.440074] CPU: 2 PID: 244 Comm: sender Not tainted 3.12.28 #1
[2102.440074] RIP: 0010:[&lt;ffffffffa005f330&gt;]  [&lt;ffffffffa005f330&gt;] __tipc_link_xmit+0x2b0/0x4d0 [tipc]
[...]
[2102.440074] Call Trace:
[2102.440074]  [&lt;ffffffff8163f0b9&gt;] ? schedule+0x29/0x70
[2102.440074]  [&lt;ffffffffa006a756&gt;] ? tipc_node_unlock+0x46/0x170 [tipc]
[2102.440074]  [&lt;ffffffffa005f761&gt;] tipc_link_xmit+0x51/0xf0 [tipc]
[2102.440074]  [&lt;ffffffffa006d8ae&gt;] tipc_send_stream+0x11e/0x4f0 [tipc]
[2102.440074]  [&lt;ffffffff8106b150&gt;] ? __wake_up_sync+0x20/0x20
[2102.440074]  [&lt;ffffffffa006dc9c&gt;] tipc_send_packet+0x1c/0x20 [tipc]
[2102.440074]  [&lt;ffffffff81502478&gt;] sock_sendmsg+0xa8/0xd0
[2102.440074]  [&lt;ffffffff81507895&gt;] ? release_sock+0x145/0x170
[2102.440074]  [&lt;ffffffff815030d8&gt;] ___sys_sendmsg+0x3d8/0x3e0
[2102.440074]  [&lt;ffffffff816426ae&gt;] ? _raw_spin_unlock+0xe/0x10
[2102.440074]  [&lt;ffffffff81115c2a&gt;] ? handle_mm_fault+0x6ca/0x9d0
[2102.440074]  [&lt;ffffffff8107dd65&gt;] ? set_next_entity+0x85/0xa0
[2102.440074]  [&lt;ffffffff816426de&gt;] ? _raw_spin_unlock_irq+0xe/0x20
[2102.440074]  [&lt;ffffffff8107463c&gt;] ? finish_task_switch+0x5c/0xc0
[2102.440074]  [&lt;ffffffff8163ea8c&gt;] ? __schedule+0x34c/0x950
[2102.440074]  [&lt;ffffffff81504e12&gt;] __sys_sendmsg+0x42/0x80
[2102.440074]  [&lt;ffffffff81504e62&gt;] SyS_sendmsg+0x12/0x20
[2102.440074]  [&lt;ffffffff8164aed2&gt;] system_call_fastpath+0x16/0x1b

In this commit, we maintain the skb list always in the stack.

Signed-off-by: Parthasarathy Bhuvaragan &lt;parthasarathy.bhuvaragan@ericsson.com&gt;
Acked-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Acked-by: Jon Maloy &lt;jon.maloy@ericsson.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mld, igmp: Fix reserved tailroom calculation</title>
<updated>2016-03-03T20:41:07Z</updated>
<author>
<name>Benjamin Poirier</name>
<email>bpoirier@suse.com</email>
</author>
<published>2016-02-29T23:03:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1837b2e2bcd23137766555a63867e649c0b637f0'/>
<id>urn:sha1:1837b2e2bcd23137766555a63867e649c0b637f0</id>
<content type='text'>
The current reserved_tailroom calculation fails to take hlen and tlen into
account.

skb:
[__hlen__|__data____________|__tlen___|__extra__]
^                                               ^
head                                            skb_end_offset

In this representation, hlen + data + tlen is the size passed to alloc_skb.
"extra" is the extra space made available in __alloc_skb because of
rounding up by kmalloc. We can reorder the representation like so:

[__hlen__|__data____________|__extra__|__tlen___]
^                                               ^
head                                            skb_end_offset

The maximum space available for ip headers and payload without
fragmentation is min(mtu, data + extra). Therefore,
reserved_tailroom
= data + extra + tlen - min(mtu, data + extra)
= skb_end_offset - hlen - min(mtu, skb_end_offset - hlen - tlen)
= skb_tailroom - min(mtu, skb_tailroom - tlen) ; after skb_reserve(hlen)

Compare the second line to the current expression:
reserved_tailroom = skb_end_offset - min(mtu, skb_end_offset)
and we can see that hlen and tlen are not taken into account.

The min() in the third line can be expanded into:
if mtu &lt; skb_tailroom - tlen:
	reserved_tailroom = skb_tailroom - mtu
else:
	reserved_tailroom = tlen

Depending on hlen, tlen, mtu and the number of multicast address records,
the current code may output skbs that have less tailroom than
dev-&gt;needed_tailroom or it may output more skbs than needed because not all
space available is used.

Fixes: 4c672e4b ("ipv6: mld: fix add_grhead skb_over_panic for devs with large MTUs")
Signed-off-by: Benjamin Poirier &lt;bpoirier@suse.com&gt;
Acked-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Acked-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge tag 'mac80211-for-davem-2016-03-02' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211</title>
<updated>2016-03-02T18:35:31Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2016-03-02T18:35:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=68df7247f43b925f3e091a55318f76569e0f3187'/>
<id>urn:sha1:68df7247f43b925f3e091a55318f76569e0f3187</id>
<content type='text'>
Johannes Berg says:

====================
Here are a few more fixes for the current cycle:
 * check GCMP encryption vs. fragmentation properly; we'd found
   this problem quite a while ago but waited for the 802.11 spec
   to be updated
 * fix RTS/CTS logic in minstrel_ht
 * fix RX of certain public action frames in AP mode
 * add mac80211_hwsim to MAC80211 in MAINTAINERS, this helps
   the kbuild robot pick up the right tree for it
====================

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>sctp: sctp_remaddr_seq_show use the wrong variable to dump transport info</title>
<updated>2016-03-01T22:35:44Z</updated>
<author>
<name>Xin Long</name>
<email>lucien.xin@gmail.com</email>
</author>
<published>2016-02-28T02:33:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3d73e8fac8f84942f15307d6d9cb1dba843d3fb2'/>
<id>urn:sha1:3d73e8fac8f84942f15307d6d9cb1dba843d3fb2</id>
<content type='text'>
Now in sctp_remaddr_seq_show(), we use variable *tsp to get the param *v.
but *tsp is also used to traversal transport_addr_list, which will cover
the previous value, and make sctp_transport_put work on the wrong transport.

So fix it by adding a new variable to get the param *v.

Fixes: fba4c330c5b9 ("sctp: hold transport before we access t-&gt;asoc in sctp proc")
Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
