<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/core, branch v3.8</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=v3.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2013-02-12T21:07:19Z</updated>
<entry>
<title>net: fix infinite loop in __skb_recv_datagram()</title>
<updated>2013-02-12T21:07:19Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2013-02-12T06:16:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=77c1090f94d1b0b5186fb13a1b71b47b1343f87f'/>
<id>urn:sha1:77c1090f94d1b0b5186fb13a1b71b47b1343f87f</id>
<content type='text'>
Tommi was fuzzing with trinity and reported the following problem :

commit 3f518bf745 (datagram: Add offset argument to __skb_recv_datagram)
missed that a raw socket receive queue can contain skbs with no payload.

We can loop in __skb_recv_datagram() with MSG_PEEK mode, because
wait_for_packet() is not prepared to skip these skbs.

[   83.541011] INFO: rcu_sched detected stalls on CPUs/tasks: {}
(detected by 0, t=26002 jiffies, g=27673, c=27672, q=75)
[   83.541011] INFO: Stall ended before state dump start
[  108.067010] BUG: soft lockup - CPU#0 stuck for 22s! [trinity-child31:2847]
...
[  108.067010] Call Trace:
[  108.067010]  [&lt;ffffffff818cc103&gt;] __skb_recv_datagram+0x1a3/0x3b0
[  108.067010]  [&lt;ffffffff818cc33d&gt;] skb_recv_datagram+0x2d/0x30
[  108.067010]  [&lt;ffffffff819ed43d&gt;] rawv6_recvmsg+0xad/0x240
[  108.067010]  [&lt;ffffffff818c4b04&gt;] sock_common_recvmsg+0x34/0x50
[  108.067010]  [&lt;ffffffff818bc8ec&gt;] sock_recvmsg+0xbc/0xf0
[  108.067010]  [&lt;ffffffff818bf31e&gt;] sys_recvfrom+0xde/0x150
[  108.067010]  [&lt;ffffffff81ca4329&gt;] system_call_fastpath+0x16/0x1b

Reported-by: Tommi Rantala &lt;tt.rantala@gmail.com&gt;
Tested-by: Tommi Rantala &lt;tt.rantala@gmail.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Pavel Emelyanov &lt;xemul@parallels.com&gt;
Acked-by: Pavel Emelyanov &lt;xemul@parallels.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Fix inner_network_header assignment in skb-copy.</title>
<updated>2013-02-03T21:10:36Z</updated>
<author>
<name>Pravin B Shelar</name>
<email>pshelar@nicira.com</email>
</author>
<published>2013-02-01T15:18:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=92df9b217ee2392024483ba5b85a88d92d60f3c1'/>
<id>urn:sha1:92df9b217ee2392024483ba5b85a88d92d60f3c1</id>
<content type='text'>
Use correct inner offset to set inner_network_offset.
Found by inspection.

Signed-off-by: Pravin B Shelar &lt;pshelar@nicira.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>pktgen: correctly handle failures when adding a device</title>
<updated>2013-01-29T20:43:03Z</updated>
<author>
<name>Cong Wang</name>
<email>amwang@redhat.com</email>
</author>
<published>2013-01-27T21:14:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=604dfd6efc9b79bce432f2394791708d8e8f6efc'/>
<id>urn:sha1:604dfd6efc9b79bce432f2394791708d8e8f6efc</id>
<content type='text'>
The return value of pktgen_add_device() is not checked, so
even if we fail to add some device, for example, non-exist one,
we still see "OK:...". This patch fixes it.

After this patch, I got:

	# echo "add_device non-exist" &gt; /proc/net/pktgen/kpktgend_0
	-bash: echo: write error: No such device
	# cat /proc/net/pktgen/kpktgend_0
	Running:
	Stopped:
	Result: ERROR: can not add device non-exist
	# echo "add_device eth0" &gt; /proc/net/pktgen/kpktgend_0
	# cat /proc/net/pktgen/kpktgend_0
	Running:
	Stopped: eth0
	Result: OK: add_device=eth0

(Candidate for -stable)

Cc: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Cong Wang &lt;amwang@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: net_cls: fd passed in SCM_RIGHTS datagram not set correctly</title>
<updated>2013-01-22T19:17:38Z</updated>
<author>
<name>Daniel Wagner</name>
<email>daniel.wagner@bmw-carit.de</email>
</author>
<published>2013-01-21T21:09:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d84295067fc7e95660d84c014aa528f4409c070d'/>
<id>urn:sha1:d84295067fc7e95660d84c014aa528f4409c070d</id>
<content type='text'>
Commit 6a328d8c6f03501657ad580f6f98bf9a42583ff7 changed the update
logic for the socket but it does not update the SCM_RIGHTS update
as well. This patch is based on the net_prio fix commit

48a87cc26c13b68f6cce4e9d769fcb17a6b3e4b8

    net: netprio: fd passed in SCM_RIGHTS datagram not set correctly

    A socket fd passed in a SCM_RIGHTS datagram was not getting
    updated with the new tasks cgrp prioidx. This leaves IO on
    the socket tagged with the old tasks priority.

    To fix this add a check in the scm recvmsg path to update the
    sock cgrp prioidx with the new tasks value.

Let's apply the same fix for net_cls.

Signed-off-by: Daniel Wagner &lt;daniel.wagner@bmw-carit.de&gt;
Reported-by: Li Zefan &lt;lizefan@huawei.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: John Fastabend &lt;john.r.fastabend@intel.com&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Cc: netdev@vger.kernel.org
Cc: cgroups@vger.kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: splice: fix __splice_segment()</title>
<updated>2013-01-21T04:19:36Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2013-01-11T14:46:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bc9540c637c3d8712ccbf9dcf28621f380ed5e64'/>
<id>urn:sha1:bc9540c637c3d8712ccbf9dcf28621f380ed5e64</id>
<content type='text'>
commit 9ca1b22d6d2 (net: splice: avoid high order page splitting)
forgot that skb-&gt;head could need a copy into several page frags.

This could be the case for loopback traffic mostly.

Also remove now useless skb argument from linear_to_page()
and __splice_segment() prototypes.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Willy Tarreau &lt;w@1wt.eu&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: splice: avoid high order page splitting</title>
<updated>2013-01-21T04:19:35Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2013-01-05T21:31:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=82bda6195615891181115f579a480aa5001ce7e9'/>
<id>urn:sha1:82bda6195615891181115f579a480aa5001ce7e9</id>
<content type='text'>
splice() can handle pages of any order, but network code tries hard to
split them in PAGE_SIZE units. Not quite successfully anyway, as
__splice_segment() assumed poff &lt; PAGE_SIZE. This is true for
the skb-&gt;data part, not necessarily for the fragments.

This patch removes this logic to give the pages as they are in the skb.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Willy Tarreau &lt;w@1wt.eu&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tcp: fix a panic on UP machines in reqsk_fastopen_remove</title>
<updated>2013-01-14T23:10:05Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2013-01-13T18:21:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cce894bb824429fd312706c7012acae43e725865'/>
<id>urn:sha1:cce894bb824429fd312706c7012acae43e725865</id>
<content type='text'>
spin_is_locked() on a non !SMP build is kind of useless.

BUG_ON(!spin_is_locked(xx)) is guaranteed to crash.

Just remove this check in reqsk_fastopen_remove() as
the callers do hold the socket lock.

Reported-by: Ketan Kulkarni &lt;ketkulka@gmail.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Jerry Chu &lt;hkchu@google.com&gt;
Cc: Yuchung Cheng &lt;ycheng@google.com&gt;
Cc: Dave Taht &lt;dave.taht@gmail.com&gt;
Acked-by: H.K. Jerry Chu &lt;hkchu@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net, wireless: overwrite default_ethtool_ops</title>
<updated>2013-01-11T23:55:48Z</updated>
<author>
<name>Stanislaw Gruszka</name>
<email>sgruszka@redhat.com</email>
</author>
<published>2013-01-10T23:19:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d07d7507bfb4e23735c9b83e397c43e1e8a173e8'/>
<id>urn:sha1:d07d7507bfb4e23735c9b83e397c43e1e8a173e8</id>
<content type='text'>
Since:

commit 2c60db037034d27f8c636403355d52872da92f81
Author: Eric Dumazet &lt;edumazet@google.com&gt;
Date:   Sun Sep 16 09:17:26 2012 +0000

    net: provide a default dev-&gt;ethtool_ops

wireless core does not correctly assign ethtool_ops.

After alloc_netdev*() call, some cfg80211 drivers provide they own
ethtool_ops, but some do not. For them, wireless core provide generic
cfg80211_ethtool_ops, which is assigned in NETDEV_REGISTER notify call:

        if (!dev-&gt;ethtool_ops)
                dev-&gt;ethtool_ops = &amp;cfg80211_ethtool_ops;

But after Eric's commit, dev-&gt;ethtool_ops is no longer NULL (on cfg80211
drivers without custom ethtool_ops), but points to &amp;default_ethtool_ops.

In order to fix the problem, provide function which will overwrite
default_ethtool_ops and use it by wireless core.

Signed-off-by: Stanislaw Gruszka &lt;sgruszka@redhat.com&gt;
Acked-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Acked-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>CONFIG_HOTPLUG removal from networking core</title>
<updated>2012-12-22T08:03:00Z</updated>
<author>
<name>Greg KH</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2012-12-21T13:44:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8baf82b368d23aed5c96b01ed7110cdccdd18725'/>
<id>urn:sha1:8baf82b368d23aed5c96b01ed7110cdccdd18725</id>
<content type='text'>
CONFIG_HOTPLUG is always enabled now, so remove the unused code that was
trying to be compiled out when this option was disabled, in the
networking core.

Cc: Bill Pemberton &lt;wfp5p@virginia.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: devnet_rename_seq should be a seqcount</title>
<updated>2012-12-21T21:14:01Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-12-20T17:25:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=30e6c9fa93cf3dbc7cc6df1d748ad25e4264545a'/>
<id>urn:sha1:30e6c9fa93cf3dbc7cc6df1d748ad25e4264545a</id>
<content type='text'>
Using a seqlock for devnet_rename_seq is not a good idea,
as device_rename() can sleep.

As we hold RTNL, we dont need a protection for writers,
and only need a seqcount so that readers can catch a change done
by a writer.

Bug added in commit c91f6df2db4972d3 (sockopt: Change getsockopt() of
SO_BINDTODEVICE to return an interface name)

Reported-by: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Brian Haley &lt;brian.haley@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
