<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/net/ppp, branch v4.2.6</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.2.6</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.2.6'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2015-10-27T00:53:36Z</updated>
<entry>
<title>ppp: don't override sk-&gt;sk_state in pppoe_flush_dev()</title>
<updated>2015-10-27T00:53:36Z</updated>
<author>
<name>Guillaume Nault</name>
<email>g.nault@alphalink.fr</email>
</author>
<published>2015-09-30T09:45:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=eea189e9a30977feeea7fc1a1355557fef3d91f2'/>
<id>urn:sha1:eea189e9a30977feeea7fc1a1355557fef3d91f2</id>
<content type='text'>
[ Upstream commit e6740165b8f7f06d8caee0fceab3fb9d790a6fed ]

Since commit 2b018d57ff18 ("pppoe: drop PPPOX_ZOMBIEs in pppoe_release"),
pppoe_release() calls dev_put(po-&gt;pppoe_dev) if sk is in the
PPPOX_ZOMBIE state. But pppoe_flush_dev() can set sk-&gt;sk_state to
PPPOX_ZOMBIE _and_ reset po-&gt;pppoe_dev to NULL. This leads to the
following oops:

[  570.140800] BUG: unable to handle kernel NULL pointer dereference at 00000000000004e0
[  570.142931] IP: [&lt;ffffffffa018c701&gt;] pppoe_release+0x50/0x101 [pppoe]
[  570.144601] PGD 3d119067 PUD 3dbc1067 PMD 0
[  570.144601] Oops: 0000 [#1] SMP
[  570.144601] Modules linked in: l2tp_ppp l2tp_netlink l2tp_core ip6_udp_tunnel udp_tunnel pppoe pppox ppp_generic slhc loop crc32c_intel ghash_clmulni_intel jitterentropy_rng sha256_generic hmac drbg ansi_cprng aesni_intel aes_x86_64 ablk_helper cryptd lrw gf128mul glue_helper acpi_cpufreq evdev serio_raw processor button ext4 crc16 mbcache jbd2 virtio_net virtio_blk virtio_pci virtio_ring virtio
[  570.144601] CPU: 1 PID: 15738 Comm: ppp-apitest Not tainted 4.2.0 #1
[  570.144601] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Debian-1.8.2-1 04/01/2014
[  570.144601] task: ffff88003d30d600 ti: ffff880036b60000 task.ti: ffff880036b60000
[  570.144601] RIP: 0010:[&lt;ffffffffa018c701&gt;]  [&lt;ffffffffa018c701&gt;] pppoe_release+0x50/0x101 [pppoe]
[  570.144601] RSP: 0018:ffff880036b63e08  EFLAGS: 00010202
[  570.144601] RAX: 0000000000000000 RBX: ffff880034340000 RCX: 0000000000000206
[  570.144601] RDX: 0000000000000006 RSI: ffff88003d30dd20 RDI: ffff88003d30dd20
[  570.144601] RBP: ffff880036b63e28 R08: 0000000000000001 R09: 0000000000000000
[  570.144601] R10: 00007ffee9b50420 R11: ffff880034340078 R12: ffff8800387ec780
[  570.144601] R13: ffff8800387ec7b0 R14: ffff88003e222aa0 R15: ffff8800387ec7b0
[  570.144601] FS:  00007f5672f48700(0000) GS:ffff88003fc80000(0000) knlGS:0000000000000000
[  570.144601] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  570.144601] CR2: 00000000000004e0 CR3: 0000000037f7e000 CR4: 00000000000406a0
[  570.144601] Stack:
[  570.144601]  ffffffffa018f240 ffff8800387ec780 ffffffffa018f240 ffff8800387ec7b0
[  570.144601]  ffff880036b63e48 ffffffff812caabe ffff880039e4e000 0000000000000008
[  570.144601]  ffff880036b63e58 ffffffff812cabad ffff880036b63ea8 ffffffff811347f5
[  570.144601] Call Trace:
[  570.144601]  [&lt;ffffffff812caabe&gt;] sock_release+0x1a/0x75
[  570.144601]  [&lt;ffffffff812cabad&gt;] sock_close+0xd/0x11
[  570.144601]  [&lt;ffffffff811347f5&gt;] __fput+0xff/0x1a5
[  570.144601]  [&lt;ffffffff811348cb&gt;] ____fput+0x9/0xb
[  570.144601]  [&lt;ffffffff81056682&gt;] task_work_run+0x66/0x90
[  570.144601]  [&lt;ffffffff8100189e&gt;] prepare_exit_to_usermode+0x8c/0xa7
[  570.144601]  [&lt;ffffffff81001a26&gt;] syscall_return_slowpath+0x16d/0x19b
[  570.144601]  [&lt;ffffffff813babb1&gt;] int_ret_from_sys_call+0x25/0x9f
[  570.144601] Code: 48 8b 83 c8 01 00 00 a8 01 74 12 48 89 df e8 8b 27 14 e1 b8 f7 ff ff ff e9 b7 00 00 00 8a 43 12 a8 0b 74 1c 48 8b 83 a8 04 00 00 &lt;48&gt; 8b 80 e0 04 00 00 65 ff 08 48 c7 83 a8 04 00 00 00 00 00 00
[  570.144601] RIP  [&lt;ffffffffa018c701&gt;] pppoe_release+0x50/0x101 [pppoe]
[  570.144601]  RSP &lt;ffff880036b63e08&gt;
[  570.144601] CR2: 00000000000004e0
[  570.200518] ---[ end trace 46956baf17349563 ]---

pppoe_flush_dev() has no reason to override sk-&gt;sk_state with
PPPOX_ZOMBIE. pppox_unbind_sock() already sets sk-&gt;sk_state to
PPPOX_DEAD, which is the correct state given that sk is unbound and
po-&gt;pppoe_dev is NULL.

Fixes: 2b018d57ff18 ("pppoe: drop PPPOX_ZOMBIEs in pppoe_release")
Tested-by: Oleksii Berezhniak &lt;core@irc.lg.ua&gt;
Signed-off-by: Guillaume Nault &lt;g.nault@alphalink.fr&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>ppp: fix lockdep splat in ppp_dev_uninit()</title>
<updated>2015-10-03T11:51:39Z</updated>
<author>
<name>Guillaume Nault</name>
<email>g.nault@alphalink.fr</email>
</author>
<published>2015-09-24T10:54:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4c8f9d6cf799cf77d6e0a2ad0d26e066be630bf9'/>
<id>urn:sha1:4c8f9d6cf799cf77d6e0a2ad0d26e066be630bf9</id>
<content type='text'>
[ Upstream commit 58a89ecaca53736aa465170530acea4f8be34ab4 ]

ppp_dev_uninit() locks all_ppp_mutex while under rtnl mutex protection.
ppp_create_interface() must then lock these mutexes in that same order
to avoid possible deadlock.

[  120.880011] ======================================================
[  120.880011] [ INFO: possible circular locking dependency detected ]
[  120.880011] 4.2.0 #1 Not tainted
[  120.880011] -------------------------------------------------------
[  120.880011] ppp-apitest/15827 is trying to acquire lock:
[  120.880011]  (&amp;pn-&gt;all_ppp_mutex){+.+.+.}, at: [&lt;ffffffffa0145f56&gt;] ppp_dev_uninit+0x64/0xb0 [ppp_generic]
[  120.880011]
[  120.880011] but task is already holding lock:
[  120.880011]  (rtnl_mutex){+.+.+.}, at: [&lt;ffffffff812e4255&gt;] rtnl_lock+0x12/0x14
[  120.880011]
[  120.880011] which lock already depends on the new lock.
[  120.880011]
[  120.880011]
[  120.880011] the existing dependency chain (in reverse order) is:
[  120.880011]
[  120.880011] -&gt; #1 (rtnl_mutex){+.+.+.}:
[  120.880011]        [&lt;ffffffff81073a6f&gt;] lock_acquire+0xcf/0x10e
[  120.880011]        [&lt;ffffffff813ab18a&gt;] mutex_lock_nested+0x56/0x341
[  120.880011]        [&lt;ffffffff812e4255&gt;] rtnl_lock+0x12/0x14
[  120.880011]        [&lt;ffffffff812d9d94&gt;] register_netdev+0x11/0x27
[  120.880011]        [&lt;ffffffffa0147b17&gt;] ppp_ioctl+0x289/0xc98 [ppp_generic]
[  120.880011]        [&lt;ffffffff8113b367&gt;] do_vfs_ioctl+0x4ea/0x532
[  120.880011]        [&lt;ffffffff8113b3fd&gt;] SyS_ioctl+0x4e/0x7d
[  120.880011]        [&lt;ffffffff813ad7d7&gt;] entry_SYSCALL_64_fastpath+0x12/0x6f
[  120.880011]
[  120.880011] -&gt; #0 (&amp;pn-&gt;all_ppp_mutex){+.+.+.}:
[  120.880011]        [&lt;ffffffff8107334e&gt;] __lock_acquire+0xb07/0xe76
[  120.880011]        [&lt;ffffffff81073a6f&gt;] lock_acquire+0xcf/0x10e
[  120.880011]        [&lt;ffffffff813ab18a&gt;] mutex_lock_nested+0x56/0x341
[  120.880011]        [&lt;ffffffffa0145f56&gt;] ppp_dev_uninit+0x64/0xb0 [ppp_generic]
[  120.880011]        [&lt;ffffffff812d5263&gt;] rollback_registered_many+0x19e/0x252
[  120.880011]        [&lt;ffffffff812d5381&gt;] rollback_registered+0x29/0x38
[  120.880011]        [&lt;ffffffff812d53fa&gt;] unregister_netdevice_queue+0x6a/0x77
[  120.880011]        [&lt;ffffffffa0146a94&gt;] ppp_release+0x42/0x79 [ppp_generic]
[  120.880011]        [&lt;ffffffff8112d9f6&gt;] __fput+0xec/0x192
[  120.880011]        [&lt;ffffffff8112dacc&gt;] ____fput+0x9/0xb
[  120.880011]        [&lt;ffffffff8105447a&gt;] task_work_run+0x66/0x80
[  120.880011]        [&lt;ffffffff81001801&gt;] prepare_exit_to_usermode+0x8c/0xa7
[  120.880011]        [&lt;ffffffff81001900&gt;] syscall_return_slowpath+0xe4/0x104
[  120.880011]        [&lt;ffffffff813ad931&gt;] int_ret_from_sys_call+0x25/0x9f
[  120.880011]
[  120.880011] other info that might help us debug this:
[  120.880011]
[  120.880011]  Possible unsafe locking scenario:
[  120.880011]
[  120.880011]        CPU0                    CPU1
[  120.880011]        ----                    ----
[  120.880011]   lock(rtnl_mutex);
[  120.880011]                                lock(&amp;pn-&gt;all_ppp_mutex);
[  120.880011]                                lock(rtnl_mutex);
[  120.880011]   lock(&amp;pn-&gt;all_ppp_mutex);
[  120.880011]
[  120.880011]  *** DEADLOCK ***

Fixes: 8cb775bc0a34 ("ppp: fix device unregistration upon netns deletion")
Reported-by: Sedat Dilek &lt;sedat.dilek@gmail.com&gt;
Tested-by: Sedat Dilek &lt;sedat.dilek@gmail.com&gt;
Signed-off-by: Guillaume Nault &lt;g.nault@alphalink.fr&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>ppp: fix device unregistration upon netns deletion</title>
<updated>2015-08-17T19:22:20Z</updated>
<author>
<name>Guillaume Nault</name>
<email>g.nault@alphalink.fr</email>
</author>
<published>2015-08-14T08:42:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8cb775bc0a34dc596837e7da03fd22c747be618b'/>
<id>urn:sha1:8cb775bc0a34dc596837e7da03fd22c747be618b</id>
<content type='text'>
PPP devices may get automatically unregistered when their network
namespace is getting removed. This happens if the ppp control plane
daemon (e.g. pppd) exits while it is the last user of this namespace.

This leads to several races:

  * ppp_exit_net() may destroy the per namespace idr (pn-&gt;units_idr)
    before all file descriptors were released. Successive ppp_release()
    calls may then cleanup PPP devices with ppp_shutdown_interface() and
    try to use the already destroyed idr.

  * Automatic device unregistration may also happen before the
    ppp_release() call for that device gets executed. Once called on
    the file owning the device, ppp_release() will then clean it up and
    try to unregister it a second time.

To fix these issues, operations defined in ppp_shutdown_interface() are
moved to the PPP device's ndo_uninit() callback. This allows PPP
devices to be properly cleaned up by unregister_netdev() and friends.
So checking for ppp-&gt;owner is now an accurate test to decide if a PPP
device should be unregistered.

Setting ppp-&gt;owner is done in ppp_create_interface(), before device
registration, in order to avoid unprotected modification of this field.

Finally, ppp_exit_net() now starts by unregistering all remaining PPP
devices to ensure that none will get unregistered after the call to
idr_destroy().

Signed-off-by: Guillaume Nault &lt;g.nault@alphalink.fr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netfilter: Remove spurios included of netfilter.h</title>
<updated>2015-06-18T19:14:32Z</updated>
<author>
<name>Eric W Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2015-06-17T15:28:35Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8f481b50ea653ff0aea6accbb4bb02a15cf00531'/>
<id>urn:sha1:8f481b50ea653ff0aea6accbb4bb02a15cf00531</id>
<content type='text'>
While testing my netfilter changes I noticed several files where
recompiling unncessarily because they unncessarily included
netfilter.h.

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2015-05-13T18:31:43Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2015-05-13T18:31:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b04096ff33a977c01c8780ca3ee129dbd641bad4'/>
<id>urn:sha1:b04096ff33a977c01c8780ca3ee129dbd641bad4</id>
<content type='text'>
Four minor merge conflicts:

1) qca_spi.c renamed the local variable used for the SPI device
   from spi_device to spi, meanwhile the spi_set_drvdata() call
   got moved further up in the probe function.

2) Two changes were both adding new members to codel params
   structure, and thus we had overlapping changes to the
   initializer function.

3) 'net' was making a fix to sk_release_kernel() which is
   completely removed in 'net-next'.

4) In net_namespace.c, the rtnl_net_fill() call for GET operations
   had the command value fixed, meanwhile 'net-next' adjusted the
   argument signature a bit.

This also matches example merge resolutions posted by Stephen
Rothwell over the past two days.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>pppoe: drop pppoe device in pppoe_unbind_sock_work</title>
<updated>2015-05-11T16:58:22Z</updated>
<author>
<name>Felix Fietkau</name>
<email>nbd@openwrt.org</email>
</author>
<published>2015-05-09T21:08:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=665a6cd809f43eec2b51413816a4178a3390a870'/>
<id>urn:sha1:665a6cd809f43eec2b51413816a4178a3390a870</id>
<content type='text'>
After receiving a PADT and the socket is closed, user space will no
longer drop the reference to the pppoe device.
This leads to errors like this:

[  488.570000] unregister_netdevice: waiting for eth0.2 to become free. Usage count = 2

Fixes: 287f3a943fe ("pppoe: Use workqueue to die properly when a PADT is received")
Signed-off-by: Felix Fietkau &lt;nbd@openwrt.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Pass kern from net_proto_family.create to sk_alloc</title>
<updated>2015-05-11T14:50:17Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2015-05-09T02:09:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=11aa9c28b4209242a9de0a661a7b3405adb568a0'/>
<id>urn:sha1:11aa9c28b4209242a9de0a661a7b3405adb568a0</id>
<content type='text'>
In preparation for changing how struct net is refcounted
on kernel sockets pass the knowledge that we are creating
a kernel socket from sock_create_kern through to sk_alloc.

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>ppp: mppe: discard late packet in stateless mode</title>
<updated>2015-04-27T03:25:13Z</updated>
<author>
<name>Sylvain Rochet</name>
<email>sylvain.rochet@finsecur.com</email>
</author>
<published>2015-04-26T18:40:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=03654763148f9a3878b8b70c30d1ffce2fca3dff'/>
<id>urn:sha1:03654763148f9a3878b8b70c30d1ffce2fca3dff</id>
<content type='text'>
When PPP is used over a link which does not guarantee packet ordering,
we might get late MPPE packets. This is a problem because MPPE must be
kept synchronized and the current implementation does not drop them and
rekey 4095 times instead of 0, which is wrong.

In order to prevent rekeying about a whole count space times (~ 4095
times), drop packets which are not within the forward 4096/2 window and
increase sanity error counter.

Signed-off-by: Sylvain Rochet &lt;sylvain.rochet@finsecur.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ppp: mppe: sanity error path rework</title>
<updated>2015-04-27T03:25:13Z</updated>
<author>
<name>Sylvain Rochet</name>
<email>sylvain.rochet@finsecur.com</email>
</author>
<published>2015-04-26T18:40:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=325301892a2d348323e09598ae108ba26889f7f9'/>
<id>urn:sha1:325301892a2d348323e09598ae108ba26889f7f9</id>
<content type='text'>
We are going to need sanity error path a little further, rework to be
able to use the sanity error path anywhere in decompressor.

Signed-off-by: Sylvain Rochet &lt;sylvain.rochet@finsecur.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ppp: call skb_checksum_complete_unset in ppp_receive_frame</title>
<updated>2015-04-21T01:57:26Z</updated>
<author>
<name>Tom Herbert</name>
<email>tom@herbertland.com</email>
</author>
<published>2015-04-20T21:10:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3dfb05340ec6676e6fc71a9ae87bbbe66d3c2998'/>
<id>urn:sha1:3dfb05340ec6676e6fc71a9ae87bbbe66d3c2998</id>
<content type='text'>
Call checksum_complete_unset in PPP receive to discard checksum-complete
value. PPP does not pull checksum for headers and also modifies packet
as in VJ compression.

Signed-off-by: Tom Herbert &lt;tom@herbertland.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
