<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/core, branch v3.4.11</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/core?h=v3.4.11</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/core?h=v3.4.11'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-08-15T15:10:28Z</updated>
<entry>
<title>net: feed /dev/random with the MAC address when registering a device</title>
<updated>2012-08-15T15:10:28Z</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2012-07-05T01:23:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e48fa33d22f6a28b57ade6522230755eae394548'/>
<id>urn:sha1:e48fa33d22f6a28b57ade6522230755eae394548</id>
<content type='text'>
commit 7bf2357524408b97fec58344caf7397f8140c3fd upstream.

Signed-off-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>net: fix rtnetlink IFF_PROMISC and IFF_ALLMULTI handling</title>
<updated>2012-08-09T15:31:51Z</updated>
<author>
<name>Jiri Benc</name>
<email>jbenc@redhat.com</email>
</author>
<published>2012-07-27T02:58:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=202a3667cfc09edca2338a1fb5d6ffb0dddc9bcc'/>
<id>urn:sha1:202a3667cfc09edca2338a1fb5d6ffb0dddc9bcc</id>
<content type='text'>
[ Upstream commit b1beb681cba5358f62e6187340660ade226a5fcc ]

When device flags are set using rtnetlink, IFF_PROMISC and IFF_ALLMULTI
flags are handled specially. Function dev_change_flags sets IFF_PROMISC and
IFF_ALLMULTI bits in dev-&gt;gflags according to the passed value but
do_setlink passes a result of rtnl_dev_combine_flags which takes those bits
from dev-&gt;flags.

This can be easily trigerred by doing:

tcpdump -i eth0 &amp;
ip l s up eth0

ip sets IFF_UP flag in ifi_flags and ifi_change, which is combined with
IFF_PROMISC by rtnl_dev_combine_flags, causing __dev_change_flags to set
IFF_PROMISC in gflags.

Reported-by: Max Matveev &lt;makc@redhat.com&gt;
Signed-off-by: Jiri Benc &lt;jbenc@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>splice: fix racy pipe-&gt;buffers uses</title>
<updated>2012-07-16T16:04:42Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-06-12T13:24:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2c07f25ea7800adb36cd8da9b58c4ecd3fc3d064'/>
<id>urn:sha1:2c07f25ea7800adb36cd8da9b58c4ecd3fc3d064</id>
<content type='text'>
commit 047fe3605235888f3ebcda0c728cb31937eadfe6 upstream.

Dave Jones reported a kernel BUG at mm/slub.c:3474! triggered
by splice_shrink_spd() called from vmsplice_to_pipe()

commit 35f3d14dbbc5 (pipe: add support for shrinking and growing pipes)
added capability to adjust pipe-&gt;buffers.

Problem is some paths don't hold pipe mutex and assume pipe-&gt;buffers
doesn't change for their duration.

Fix this by adding nr_pages_max field in struct splice_pipe_desc, and
use it in place of pipe-&gt;buffers where appropriate.

splice_shrink_spd() loses its struct pipe_inode_info argument.

Reported-by: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: Alexander Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Tom Herbert &lt;therbert@google.com&gt;
Tested-by: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
[bwh: Backported to 3.2:
 - Adjust context in vmsplice_to_pipe()
 - Update one more call to splice_shrink_spd(), from skb_splice_bits()]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: remove skb_orphan_try()</title>
<updated>2012-07-16T16:03:48Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-06-14T06:42:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=993772c70fda9d05299fc3a8ed9d1cba268870f1'/>
<id>urn:sha1:993772c70fda9d05299fc3a8ed9d1cba268870f1</id>
<content type='text'>
[ Upstream commit 62b1a8ab9b3660bb820d8dfe23148ed6cda38574 ]

Orphaning skb in dev_hard_start_xmit() makes bonding behavior
unfriendly for applications sending big UDP bursts : Once packets
pass the bonding device and come to real device, they might hit a full
qdisc and be dropped. Without orphaning, the sender is automatically
throttled because sk-&gt;sk_wmemalloc reaches sk-&gt;sk_sndbuf (assuming
sk_sndbuf is not too big)

We could try to defer the orphaning adding another test in
dev_hard_start_xmit(), but all this seems of little gain,
now that BQL tends to make packets more likely to be parked
in Qdisc queues instead of NIC TX ring, in cases where performance
matters.

Reverts commits :
fc6055a5ba31 net: Introduce skb_orphan_try()
87fd308cfc6b net: skb_tx_hash() fix relative to skb_orphan_try()
and removes SKBTX_DRV_NEEDS_SK_REF flag

Reported-and-bisected-by: Jean-Michel Hautbois &lt;jhautbois@gmail.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Tested-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Acked-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>netpoll: fix netpoll_send_udp() bugs</title>
<updated>2012-07-16T16:03:47Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-06-12T19:30:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=da7de70e5098b7b01c17ea8ac46086ac9154576e'/>
<id>urn:sha1:da7de70e5098b7b01c17ea8ac46086ac9154576e</id>
<content type='text'>
[ Upstream commit 954fba0274058d27c7c07b5ea07c41b3b7477894 ]

Bogdan Hamciuc diagnosed and fixed following bug in netpoll_send_udp() :

"skb-&gt;len += len;" instead of "skb_put(skb, len);"

Meaning that _if_ a network driver needs to call skb_realloc_headroom(),
only packet headers would be copied, leaving garbage in the payload.

However the skb_realloc_headroom() must be avoided as much as possible
since it requires memory and netpoll tries hard to work even if memory
is exhausted (using a pool of preallocated skbs)

It appears netpoll_send_udp() reserved 16 bytes for the ethernet header,
which happens to work for typicall drivers but not all.

Right thing is to use LL_RESERVED_SPACE(dev)
(And also add dev-&gt;needed_tailroom of tailroom)

This patch combines both fixes.

Many thanks to Bogdan for raising this issue.

Reported-by: Bogdan Hamciuc &lt;bogdan.hamciuc@freescale.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Tested-by: Bogdan Hamciuc &lt;bogdan.hamciuc@freescale.com&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Reviewed-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Reviewed-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: neighbour: fix neigh_dump_info()</title>
<updated>2012-07-16T16:03:46Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-06-07T04:58:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=217fc833225f3a2ba55eabd3916bfbef38185cd1'/>
<id>urn:sha1:217fc833225f3a2ba55eabd3916bfbef38185cd1</id>
<content type='text'>
[ Upstream commit 4bd6683bd400c8b1d2ad544bb155d86a5d10f91c ]

Denys found out "ip neigh" output was truncated to
about 54 neighbours.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reported-by: Denys Fedoryshchenko &lt;denys@visp.net.lb&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drop_monitor: dont sleep in atomic context</title>
<updated>2012-07-16T16:03:44Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-06-04T00:18:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f375a27c17c033dc9503b12b8379055fd59110ba'/>
<id>urn:sha1:f375a27c17c033dc9503b12b8379055fd59110ba</id>
<content type='text'>
[ Upstream commit bec4596b4e6770c7037f21f6bd27567b152dc0d6 ]

drop_monitor calls several sleeping functions while in atomic context.

 BUG: sleeping function called from invalid context at mm/slub.c:943
 in_atomic(): 1, irqs_disabled(): 0, pid: 2103, name: kworker/0:2
 Pid: 2103, comm: kworker/0:2 Not tainted 3.5.0-rc1+ #55
 Call Trace:
  [&lt;ffffffff810697ca&gt;] __might_sleep+0xca/0xf0
  [&lt;ffffffff811345a3&gt;] kmem_cache_alloc_node+0x1b3/0x1c0
  [&lt;ffffffff8105578c&gt;] ? queue_delayed_work_on+0x11c/0x130
  [&lt;ffffffff815343fb&gt;] __alloc_skb+0x4b/0x230
  [&lt;ffffffffa00b0360&gt;] ? reset_per_cpu_data+0x160/0x160 [drop_monitor]
  [&lt;ffffffffa00b022f&gt;] reset_per_cpu_data+0x2f/0x160 [drop_monitor]
  [&lt;ffffffffa00b03ab&gt;] send_dm_alert+0x4b/0xb0 [drop_monitor]
  [&lt;ffffffff810568e0&gt;] process_one_work+0x130/0x4c0
  [&lt;ffffffff81058249&gt;] worker_thread+0x159/0x360
  [&lt;ffffffff810580f0&gt;] ? manage_workers.isra.27+0x240/0x240
  [&lt;ffffffff8105d403&gt;] kthread+0x93/0xa0
  [&lt;ffffffff816be6d4&gt;] kernel_thread_helper+0x4/0x10
  [&lt;ffffffff8105d370&gt;] ? kthread_freezable_should_stop+0x80/0x80
  [&lt;ffffffff816be6d0&gt;] ? gs_change+0xb/0xb

Rework the logic to call the sleeping functions in right context.

Use standard timer/workqueue api to let system chose any cpu to perform
the allocation and netlink send.

Also avoid a loop if reset_per_cpu_data() cannot allocate memory :
use mod_timer() to wait 1/10 second before next try.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Reviewed-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: sock: validate data_len before allocating skb in sock_alloc_send_pskb()</title>
<updated>2012-07-16T16:03:43Z</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2012-05-30T21:18:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=31fab24bd9cdb9733383cbf9732cda1649f2a760'/>
<id>urn:sha1:31fab24bd9cdb9733383cbf9732cda1649f2a760</id>
<content type='text'>
[ Upstream commit cc9b17ad29ecaa20bfe426a8d4dbfb94b13ff1cc ]

We need to validate the number of pages consumed by data_len, otherwise frags
array could be overflowed by userspace. So this patch validate data_len and
return -EMSGSIZE when data_len may occupies more frags than MAX_SKB_FRAGS.

Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>pktgen: fix module unload for good</title>
<updated>2012-05-18T17:54:33Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-05-17T23:52:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d4b1133558e0d417342d5d2c49e4c35b428ff20d'/>
<id>urn:sha1:d4b1133558e0d417342d5d2c49e4c35b428ff20d</id>
<content type='text'>
commit c57b5468406 (pktgen: fix crash at module unload) did a very poor
job with list primitives.

1) list_splice() arguments were in the wrong order

2) list_splice(list, head) has undefined behavior if head is not
initialized.

3) We should use the list_splice_init() variant to clear pktgen_threads
list.

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>pktgen: fix crash at module unload</title>
<updated>2012-05-11T03:10:24Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-05-09T13:29:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c57b54684060c8aced64a5b78ff69ff289af97b9'/>
<id>urn:sha1:c57b54684060c8aced64a5b78ff69ff289af97b9</id>
<content type='text'>
commit 7d3d43dab4e9 (net: In unregister_netdevice_notifier unregister
the netdevices.) makes pktgen crashing at module unload.

[  296.820578] BUG: spinlock bad magic on CPU#6, rmmod/3267
[  296.820719]  lock: ffff880310c38000, .magic: ffff8803, .owner: &lt;none&gt;/-1, .owner_cpu: -1
[  296.820943] Pid: 3267, comm: rmmod Not tainted 3.4.0-rc5+ #254
[  296.821079] Call Trace:
[  296.821211]  [&lt;ffffffff8168a715&gt;] spin_dump+0x8a/0x8f
[  296.821345]  [&lt;ffffffff8168a73b&gt;] spin_bug+0x21/0x26
[  296.821507]  [&lt;ffffffff812b4741&gt;] do_raw_spin_lock+0x131/0x140
[  296.821648]  [&lt;ffffffff8169188e&gt;] _raw_spin_lock+0x1e/0x20
[  296.821786]  [&lt;ffffffffa00cc0fd&gt;] __pktgen_NN_threads+0x4d/0x140 [pktgen]
[  296.821928]  [&lt;ffffffffa00ccf8d&gt;] pktgen_device_event+0x10d/0x1e0 [pktgen]
[  296.822073]  [&lt;ffffffff8154ed4f&gt;] unregister_netdevice_notifier+0x7f/0x100
[  296.822216]  [&lt;ffffffffa00d2a0b&gt;] pg_cleanup+0x48/0x73 [pktgen]
[  296.822357]  [&lt;ffffffff8109528e&gt;] sys_delete_module+0x17e/0x2a0
[  296.822502]  [&lt;ffffffff81699652&gt;] system_call_fastpath+0x16/0x1b

Hold the pktgen_thread_lock while splicing pktgen_threads, and test
pktgen_exiting in pktgen_device_event() to make unload faster.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
