<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/core, branch v3.4</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/core?h=v3.4</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/core?h=v3.4'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-05-18T17:54:33Z</updated>
<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>
<entry>
<title>Revert "net: maintain namespace isolation between vlan and real device"</title>
<updated>2012-05-11T03:03:34Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-05-11T03:03:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=59b9997baba5242997ddc7bd96b1391f5275a5a4'/>
<id>urn:sha1:59b9997baba5242997ddc7bd96b1391f5275a5a4</id>
<content type='text'>
This reverts commit 8a83a00b0735190384a348156837918271034144.

It causes regressions for S390 devices, because it does an
unconditional DST drop on SKBs for vlans and the QETH device
needs the neighbour entry hung off the DST for certain things
on transmit.

Arnd can't remember exactly why he even needed this change.

Conflicts:

	drivers/net/macvlan.c
	net/8021q/vlan_dev.c
	net/core/dev.c

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>drop_monitor: prevent init path from scheduling on the wrong cpu</title>
<updated>2012-05-03T01:02:48Z</updated>
<author>
<name>Neil Horman</name>
<email>nhorman@tuxdriver.com</email>
</author>
<published>2012-05-01T08:18:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4fdcfa12843bca38d0c9deff70c8720e4e8f515f'/>
<id>urn:sha1:4fdcfa12843bca38d0c9deff70c8720e4e8f515f</id>
<content type='text'>
I just noticed after some recent updates, that the init path for the drop
monitor protocol has a minor error.  drop monitor maintains a per cpu structure,
that gets initalized from a single cpu.  Normally this is fine, as the protocol
isn't in use yet, but I recently made a change that causes a failed skb
allocation to reschedule itself .  Given the current code, the implication is
that this workqueue reschedule will take place on the wrong cpu.  If drop
monitor is used early during the boot process, its possible that two cpus will
access a single per-cpu structure in parallel, possibly leading to data
corruption.

This patch fixes the situation, by storing the cpu number that a given instance
of this per-cpu data should be accessed from.  In the case of a need for a
reschedule, the cpu stored in the struct is assigned the rescheule, rather than
the currently executing cpu

Tested successfully by myself.

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
CC: David Miller &lt;davem@davemloft.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>drop_monitor: Make updating data-&gt;skb smp safe</title>
<updated>2012-04-28T06:18:48Z</updated>
<author>
<name>Neil Horman</name>
<email>nhorman@tuxdriver.com</email>
</author>
<published>2012-04-27T10:11:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3885ca785a3618593226687ced84f3f336dc3860'/>
<id>urn:sha1:3885ca785a3618593226687ced84f3f336dc3860</id>
<content type='text'>
Eric Dumazet pointed out to me that the drop_monitor protocol has some holes in
its smp protections.  Specifically, its possible to replace data-&gt;skb while its
being written.  This patch corrects that by making data-&gt;skb an rcu protected
variable.  That will prevent it from being overwritten while a tracepoint is
modifying it.

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Reported-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: David Miller &lt;davem@davemloft.net&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>drop_monitor: fix sleeping in invalid context warning</title>
<updated>2012-04-28T06:18:48Z</updated>
<author>
<name>Neil Horman</name>
<email>nhorman@tuxdriver.com</email>
</author>
<published>2012-04-27T10:11:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cde2e9a651b76d8db36ae94cd0febc82b637e5dd'/>
<id>urn:sha1:cde2e9a651b76d8db36ae94cd0febc82b637e5dd</id>
<content type='text'>
Eric Dumazet pointed out this warning in the drop_monitor protocol to me:

[   38.352571] BUG: sleeping function called from invalid context at kernel/mutex.c:85
[   38.352576] in_atomic(): 1, irqs_disabled(): 0, pid: 4415, name: dropwatch
[   38.352580] Pid: 4415, comm: dropwatch Not tainted 3.4.0-rc2+ #71
[   38.352582] Call Trace:
[   38.352592]  [&lt;ffffffff8153aaf0&gt;] ? trace_napi_poll_hit+0xd0/0xd0
[   38.352599]  [&lt;ffffffff81063f2a&gt;] __might_sleep+0xca/0xf0
[   38.352606]  [&lt;ffffffff81655b16&gt;] mutex_lock+0x26/0x50
[   38.352610]  [&lt;ffffffff8153aaf0&gt;] ? trace_napi_poll_hit+0xd0/0xd0
[   38.352616]  [&lt;ffffffff810b72d9&gt;] tracepoint_probe_register+0x29/0x90
[   38.352621]  [&lt;ffffffff8153a585&gt;] set_all_monitor_traces+0x105/0x170
[   38.352625]  [&lt;ffffffff8153a8ca&gt;] net_dm_cmd_trace+0x2a/0x40
[   38.352630]  [&lt;ffffffff8154a81a&gt;] genl_rcv_msg+0x21a/0x2b0
[   38.352636]  [&lt;ffffffff810f8029&gt;] ? zone_statistics+0x99/0xc0
[   38.352640]  [&lt;ffffffff8154a600&gt;] ? genl_rcv+0x30/0x30
[   38.352645]  [&lt;ffffffff8154a059&gt;] netlink_rcv_skb+0xa9/0xd0
[   38.352649]  [&lt;ffffffff8154a5f0&gt;] genl_rcv+0x20/0x30
[   38.352653]  [&lt;ffffffff81549a7e&gt;] netlink_unicast+0x1ae/0x1f0
[   38.352658]  [&lt;ffffffff81549d76&gt;] netlink_sendmsg+0x2b6/0x310
[   38.352663]  [&lt;ffffffff8150824f&gt;] sock_sendmsg+0x10f/0x130
[   38.352668]  [&lt;ffffffff8150abe0&gt;] ? move_addr_to_kernel+0x60/0xb0
[   38.352673]  [&lt;ffffffff81515f04&gt;] ? verify_iovec+0x64/0xe0
[   38.352677]  [&lt;ffffffff81509c46&gt;] __sys_sendmsg+0x386/0x390
[   38.352682]  [&lt;ffffffff810ffaf9&gt;] ? handle_mm_fault+0x139/0x210
[   38.352687]  [&lt;ffffffff8165b5bc&gt;] ? do_page_fault+0x1ec/0x4f0
[   38.352693]  [&lt;ffffffff8106ba4d&gt;] ? set_next_entity+0x9d/0xb0
[   38.352699]  [&lt;ffffffff81310b49&gt;] ? tty_ldisc_deref+0x9/0x10
[   38.352703]  [&lt;ffffffff8106d363&gt;] ? pick_next_task_fair+0x63/0x140
[   38.352708]  [&lt;ffffffff8150b8d4&gt;] sys_sendmsg+0x44/0x80
[   38.352713]  [&lt;ffffffff8165f8e2&gt;] system_call_fastpath+0x16/0x1b

It stems from holding a spinlock (trace_state_lock) while attempting to register
or unregister tracepoint hooks, making in_atomic() true in this context, leading
to the warning when the tracepoint calls might_sleep() while its taking a mutex.
Since we only use the trace_state_lock to prevent trace protocol state races, as
well as hardware stat list updates on an rcu write side, we can just convert the
spinlock to a mutex to avoid this problem.

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Reported-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: David Miller &lt;davem@davemloft.net&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>drop_monitor: allow more events per second</title>
<updated>2012-04-21T20:28:38Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-04-19T07:16:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bbe362be5368b9f531b95a4a9b502ae2832e1dac'/>
<id>urn:sha1:bbe362be5368b9f531b95a4a9b502ae2832e1dac</id>
<content type='text'>
It seems there is a logic error in trace_drop_common(), since we store
only 64 drops, even if they are from same location.

This fix is a one liner, but we probably need more work to avoid useless
atomic dec/inc

Now I can watch 1 Mpps drops through dropwatch...

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netns: do not leak net_generic data on failed init</title>
<updated>2012-04-18T04:05:33Z</updated>
<author>
<name>Julian Anastasov</name>
<email>ja@ssi.bg</email>
</author>
<published>2012-04-16T04:43:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b922934d017f1cc831b017913ed7d1a56c558b43'/>
<id>urn:sha1:b922934d017f1cc831b017913ed7d1a56c558b43</id>
<content type='text'>
ops_init should free the net_generic data on
init failure and __register_pernet_operations should not
call ops_free when NET_NS is not enabled.

Signed-off-by: Julian Anastasov &lt;ja@ssi.bg&gt;
Reviewed-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: In unregister_netdevice_notifier unregister the netdevices.</title>
<updated>2012-04-13T15:01:43Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2012-04-06T15:33:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7d3d43dab4e978d8d9ad1acf8af15c9b1c4b0f0f'/>
<id>urn:sha1:7d3d43dab4e978d8d9ad1acf8af15c9b1c4b0f0f</id>
<content type='text'>
We already synthesize events in register_netdevice_notifier and synthesizing
events in unregister_netdevice_notifier allows to us remove the need for
special case cleanup code.

This change should be safe as it adds no new cases for existing callers
of unregiser_netdevice_notifier to handle.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: allow pskb_expand_head() to get maximum tailroom</title>
<updated>2012-04-11T14:10:43Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-04-10T20:08:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=87151b8689d890dfb495081f7be9b9e257f7a2df'/>
<id>urn:sha1:87151b8689d890dfb495081f7be9b9e257f7a2df</id>
<content type='text'>
Marc Merlin reported many order-1 allocations failures in TX path on its
wireless setup, that dont make any sense with MTU=1500 network, and non
SG capable hardware.

Turns out part of the problem comes from pskb_expand_head() not using
ksize() to get exact head size given by kmalloc(). Doing the same thing
than __alloc_skb() allows more tailroom in skb and can prevent future
reallocations.

As a bonus, struct skb_shared_info becomes cache line aligned.

Reported-by: Marc MERLIN &lt;marc@merlins.org&gt;
Tested-by: Marc MERLIN &lt;marc@merlins.org&gt;
Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
