<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net/ppp, branch v4.7</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.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-07-09T03:46:37Z</updated>
<entry>
<title>ppp: defer netns reference release for ppp channel</title>
<updated>2016-07-09T03:46:37Z</updated>
<author>
<name>WANG Cong</name>
<email>xiyou.wangcong@gmail.com</email>
</author>
<published>2016-07-06T05:12:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=205e1e255c479f3fd77446415706463b282f94e4'/>
<id>urn:sha1:205e1e255c479f3fd77446415706463b282f94e4</id>
<content type='text'>
Matt reported that we have a NULL pointer dereference
in ppp_pernet() from ppp_connect_channel(),
i.e. pch-&gt;chan_net is NULL.

This is due to that a parallel ppp_unregister_channel()
could happen while we are in ppp_connect_channel(), during
which pch-&gt;chan_net set to NULL. Since we need a reference
to net per channel, it makes sense to sync the refcnt
with the life time of the channel, therefore we should
release this reference when we destroy it.

Fixes: 1f461dcdd296 ("ppp: take reference on channels netns")
Reported-by: Matt Bennett &lt;Matt.Bennett@alliedtelesis.co.nz&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: linux-ppp@vger.kernel.org
Cc: Guillaume Nault &lt;g.nault@alphalink.fr&gt;
Cc: Cyrill Gorcunov &lt;gorcunov@openvz.org&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Reviewed-by: Cyrill Gorcunov &lt;gorcunov@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ppp: add rtnetlink device creation support</title>
<updated>2016-04-29T20:09:44Z</updated>
<author>
<name>Guillaume Nault</name>
<email>g.nault@alphalink.fr</email>
</author>
<published>2016-04-28T15:55:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=96d934c70db6e1bc135600c57da1285eaf7efb26'/>
<id>urn:sha1:96d934c70db6e1bc135600c57da1285eaf7efb26</id>
<content type='text'>
Define PPP device handler for use with rtnetlink.
The only PPP specific attribute is IFLA_PPP_DEV_FD. It is mandatory and
contains the file descriptor of the associated /dev/ppp instance (the
file descriptor which would have been used for ioctl(PPPIOCNEWUNIT) in
the ioctl-based API). The PPP device is removed when this file
descriptor is released (same behaviour as with ioctl based PPP
devices).

PPP devices created with the rtnetlink API behave like the ones created
with ioctl(PPPIOCNEWUNIT). In particular existing ioctls work the same
way, no matter how the PPP device was created.
The rtnl callbacks are also assigned to ioctl based PPP devices. This
way, rtnl messages have the same effect on any PPP devices.
The immediate effect is that all PPP devices, even ioctl-based
ones, can now be removed with "ip link del".

A minor difference still exists between ioctl and rtnl based PPP
interfaces: in the device name, the number following the "ppp" prefix
corresponds to the PPP unit number for ioctl based devices, while it is
just an unrelated incrementing index for rtnl ones.

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>ppp: define reusable device creation functions</title>
<updated>2016-04-29T20:09:44Z</updated>
<author>
<name>Guillaume Nault</name>
<email>g.nault@alphalink.fr</email>
</author>
<published>2016-04-28T15:55:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7d9f0b48746d37e4381efc02da27535a0a1bac43'/>
<id>urn:sha1:7d9f0b48746d37e4381efc02da27535a0a1bac43</id>
<content type='text'>
Move PPP device initialisation and registration out of
ppp_create_interface().
This prepares code for device registration with rtnetlink.

While there, simplify the prototype of ppp_create_interface():

  * Since ppp_dev_configure() takes care of setting file-&gt;private_data,
    there's no need to return a ppp structure to ppp_unattached_ioctl()
    anymore.

  * The unit parameter is made read/write so that ppp_create_interface()
    can tell which unit number has been assigned.

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>ppp: take reference on channels netns</title>
<updated>2016-03-23T18:35:31Z</updated>
<author>
<name>Guillaume Nault</name>
<email>g.nault@alphalink.fr</email>
</author>
<published>2016-03-23T15:38:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1f461dcdd296eecedaffffc6bae2bfa90bd7eb89'/>
<id>urn:sha1:1f461dcdd296eecedaffffc6bae2bfa90bd7eb89</id>
<content type='text'>
Let channels hold a reference on their network namespace.
Some channel types, like ppp_async and ppp_synctty, can have their
userspace controller running in a different namespace. Therefore they
can't rely on them to preclude their netns from being removed from
under them.

==================================================================
BUG: KASAN: use-after-free in ppp_unregister_channel+0x372/0x3a0 at
addr ffff880064e217e0
Read of size 8 by task syz-executor/11581
=============================================================================
BUG net_namespace (Not tainted): kasan: bad access detected
-----------------------------------------------------------------------------

Disabling lock debugging due to kernel taint
INFO: Allocated in copy_net_ns+0x6b/0x1a0 age=92569 cpu=3 pid=6906
[&lt;      none      &gt;] ___slab_alloc+0x4c7/0x500 kernel/mm/slub.c:2440
[&lt;      none      &gt;] __slab_alloc+0x4c/0x90 kernel/mm/slub.c:2469
[&lt;     inline     &gt;] slab_alloc_node kernel/mm/slub.c:2532
[&lt;     inline     &gt;] slab_alloc kernel/mm/slub.c:2574
[&lt;      none      &gt;] kmem_cache_alloc+0x23a/0x2b0 kernel/mm/slub.c:2579
[&lt;     inline     &gt;] kmem_cache_zalloc kernel/include/linux/slab.h:597
[&lt;     inline     &gt;] net_alloc kernel/net/core/net_namespace.c:325
[&lt;      none      &gt;] copy_net_ns+0x6b/0x1a0 kernel/net/core/net_namespace.c:360
[&lt;      none      &gt;] create_new_namespaces+0x2f6/0x610 kernel/kernel/nsproxy.c:95
[&lt;      none      &gt;] copy_namespaces+0x297/0x320 kernel/kernel/nsproxy.c:150
[&lt;      none      &gt;] copy_process.part.35+0x1bf4/0x5760 kernel/kernel/fork.c:1451
[&lt;     inline     &gt;] copy_process kernel/kernel/fork.c:1274
[&lt;      none      &gt;] _do_fork+0x1bc/0xcb0 kernel/kernel/fork.c:1723
[&lt;     inline     &gt;] SYSC_clone kernel/kernel/fork.c:1832
[&lt;      none      &gt;] SyS_clone+0x37/0x50 kernel/kernel/fork.c:1826
[&lt;      none      &gt;] entry_SYSCALL_64_fastpath+0x16/0x7a kernel/arch/x86/entry/entry_64.S:185

INFO: Freed in net_drop_ns+0x67/0x80 age=575 cpu=2 pid=2631
[&lt;      none      &gt;] __slab_free+0x1fc/0x320 kernel/mm/slub.c:2650
[&lt;     inline     &gt;] slab_free kernel/mm/slub.c:2805
[&lt;      none      &gt;] kmem_cache_free+0x2a0/0x330 kernel/mm/slub.c:2814
[&lt;     inline     &gt;] net_free kernel/net/core/net_namespace.c:341
[&lt;      none      &gt;] net_drop_ns+0x67/0x80 kernel/net/core/net_namespace.c:348
[&lt;      none      &gt;] cleanup_net+0x4e5/0x600 kernel/net/core/net_namespace.c:448
[&lt;      none      &gt;] process_one_work+0x794/0x1440 kernel/kernel/workqueue.c:2036
[&lt;      none      &gt;] worker_thread+0xdb/0xfc0 kernel/kernel/workqueue.c:2170
[&lt;      none      &gt;] kthread+0x23f/0x2d0 kernel/drivers/block/aoe/aoecmd.c:1303
[&lt;      none      &gt;] ret_from_fork+0x3f/0x70 kernel/arch/x86/entry/entry_64.S:468
INFO: Slab 0xffffea0001938800 objects=3 used=0 fp=0xffff880064e20000
flags=0x5fffc0000004080
INFO: Object 0xffff880064e20000 @offset=0 fp=0xffff880064e24200

CPU: 1 PID: 11581 Comm: syz-executor Tainted: G    B           4.4.0+
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
rel-1.8.2-0-g33fbe13 by qemu-project.org 04/01/2014
 00000000ffffffff ffff8800662c7790 ffffffff8292049d ffff88003e36a300
 ffff880064e20000 ffff880064e20000 ffff8800662c77c0 ffffffff816f2054
 ffff88003e36a300 ffffea0001938800 ffff880064e20000 0000000000000000
Call Trace:
 [&lt;     inline     &gt;] __dump_stack kernel/lib/dump_stack.c:15
 [&lt;ffffffff8292049d&gt;] dump_stack+0x6f/0xa2 kernel/lib/dump_stack.c:50
 [&lt;ffffffff816f2054&gt;] print_trailer+0xf4/0x150 kernel/mm/slub.c:654
 [&lt;ffffffff816f875f&gt;] object_err+0x2f/0x40 kernel/mm/slub.c:661
 [&lt;     inline     &gt;] print_address_description kernel/mm/kasan/report.c:138
 [&lt;ffffffff816fb0c5&gt;] kasan_report_error+0x215/0x530 kernel/mm/kasan/report.c:236
 [&lt;     inline     &gt;] kasan_report kernel/mm/kasan/report.c:259
 [&lt;ffffffff816fb4de&gt;] __asan_report_load8_noabort+0x3e/0x40 kernel/mm/kasan/report.c:280
 [&lt;     inline     &gt;] ? ppp_pernet kernel/include/linux/compiler.h:218
 [&lt;ffffffff83ad71b2&gt;] ? ppp_unregister_channel+0x372/0x3a0 kernel/drivers/net/ppp/ppp_generic.c:2392
 [&lt;     inline     &gt;] ppp_pernet kernel/include/linux/compiler.h:218
 [&lt;ffffffff83ad71b2&gt;] ppp_unregister_channel+0x372/0x3a0 kernel/drivers/net/ppp/ppp_generic.c:2392
 [&lt;     inline     &gt;] ? ppp_pernet kernel/drivers/net/ppp/ppp_generic.c:293
 [&lt;ffffffff83ad6f26&gt;] ? ppp_unregister_channel+0xe6/0x3a0 kernel/drivers/net/ppp/ppp_generic.c:2392
 [&lt;ffffffff83ae18f3&gt;] ppp_asynctty_close+0xa3/0x130 kernel/drivers/net/ppp/ppp_async.c:241
 [&lt;ffffffff83ae1850&gt;] ? async_lcp_peek+0x5b0/0x5b0 kernel/drivers/net/ppp/ppp_async.c:1000
 [&lt;ffffffff82c33239&gt;] tty_ldisc_close.isra.1+0x99/0xe0 kernel/drivers/tty/tty_ldisc.c:478
 [&lt;ffffffff82c332c0&gt;] tty_ldisc_kill+0x40/0x170 kernel/drivers/tty/tty_ldisc.c:744
 [&lt;ffffffff82c34943&gt;] tty_ldisc_release+0x1b3/0x260 kernel/drivers/tty/tty_ldisc.c:772
 [&lt;ffffffff82c1ef21&gt;] tty_release+0xac1/0x13e0 kernel/drivers/tty/tty_io.c:1901
 [&lt;ffffffff82c1e460&gt;] ? release_tty+0x320/0x320 kernel/drivers/tty/tty_io.c:1688
 [&lt;ffffffff8174de36&gt;] __fput+0x236/0x780 kernel/fs/file_table.c:208
 [&lt;ffffffff8174e405&gt;] ____fput+0x15/0x20 kernel/fs/file_table.c:244
 [&lt;ffffffff813595ab&gt;] task_work_run+0x16b/0x200 kernel/kernel/task_work.c:115
 [&lt;     inline     &gt;] exit_task_work kernel/include/linux/task_work.h:21
 [&lt;ffffffff81307105&gt;] do_exit+0x8b5/0x2c60 kernel/kernel/exit.c:750
 [&lt;ffffffff813fdd20&gt;] ? debug_check_no_locks_freed+0x290/0x290 kernel/kernel/locking/lockdep.c:4123
 [&lt;ffffffff81306850&gt;] ? mm_update_next_owner+0x6f0/0x6f0 kernel/kernel/exit.c:357
 [&lt;ffffffff813215e6&gt;] ? __dequeue_signal+0x136/0x470 kernel/kernel/signal.c:550
 [&lt;ffffffff8132067b&gt;] ? recalc_sigpending_tsk+0x13b/0x180 kernel/kernel/signal.c:145
 [&lt;ffffffff81309628&gt;] do_group_exit+0x108/0x330 kernel/kernel/exit.c:880
 [&lt;ffffffff8132b9d4&gt;] get_signal+0x5e4/0x14f0 kernel/kernel/signal.c:2307
 [&lt;     inline     &gt;] ? kretprobe_table_lock kernel/kernel/kprobes.c:1113
 [&lt;ffffffff8151d355&gt;] ? kprobe_flush_task+0xb5/0x450 kernel/kernel/kprobes.c:1158
 [&lt;ffffffff8115f7d3&gt;] do_signal+0x83/0x1c90 kernel/arch/x86/kernel/signal.c:712
 [&lt;ffffffff8151d2a0&gt;] ? recycle_rp_inst+0x310/0x310 kernel/include/linux/list.h:655
 [&lt;ffffffff8115f750&gt;] ? setup_sigcontext+0x780/0x780 kernel/arch/x86/kernel/signal.c:165
 [&lt;ffffffff81380864&gt;] ? finish_task_switch+0x424/0x5f0 kernel/kernel/sched/core.c:2692
 [&lt;     inline     &gt;] ? finish_lock_switch kernel/kernel/sched/sched.h:1099
 [&lt;ffffffff81380560&gt;] ? finish_task_switch+0x120/0x5f0 kernel/kernel/sched/core.c:2678
 [&lt;     inline     &gt;] ? context_switch kernel/kernel/sched/core.c:2807
 [&lt;ffffffff85d794e9&gt;] ? __schedule+0x919/0x1bd0 kernel/kernel/sched/core.c:3283
 [&lt;ffffffff81003901&gt;] exit_to_usermode_loop+0xf1/0x1a0 kernel/arch/x86/entry/common.c:247
 [&lt;     inline     &gt;] prepare_exit_to_usermode kernel/arch/x86/entry/common.c:282
 [&lt;ffffffff810062ef&gt;] syscall_return_slowpath+0x19f/0x210 kernel/arch/x86/entry/common.c:344
 [&lt;ffffffff85d88022&gt;] int_ret_from_sys_call+0x25/0x9f kernel/arch/x86/entry/entry_64.S:281
Memory state around the buggy address:
 ffff880064e21680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff880064e21700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
&gt;ffff880064e21780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                       ^
 ffff880064e21800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff880064e21880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Fixes: 273ec51dd7ce ("net: ppp_generic - introduce net-namespace functionality v2")
Reported-by: Baozeng Ding &lt;sploving1@gmail.com&gt;
Signed-off-by: Guillaume Nault &lt;g.nault@alphalink.fr&gt;
Reviewed-by: Cyrill Gorcunov &lt;gorcunov@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next</title>
<updated>2016-03-19T17:05:34Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-03-19T17:05:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1200b6809dfd9d73bc4c7db76d288c35fa4b2ebe'/>
<id>urn:sha1:1200b6809dfd9d73bc4c7db76d288c35fa4b2ebe</id>
<content type='text'>
Pull networking updates from David Miller:
 "Highlights:

   1) Support more Realtek wireless chips, from Jes Sorenson.

   2) New BPF types for per-cpu hash and arrap maps, from Alexei
      Starovoitov.

   3) Make several TCP sysctls per-namespace, from Nikolay Borisov.

   4) Allow the use of SO_REUSEPORT in order to do per-thread processing
   of incoming TCP/UDP connections.  The muxing can be done using a
   BPF program which hashes the incoming packet.  From Craig Gallek.

   5) Add a multiplexer for TCP streams, to provide a messaged based
      interface.  BPF programs can be used to determine the message
      boundaries.  From Tom Herbert.

   6) Add 802.1AE MACSEC support, from Sabrina Dubroca.

   7) Avoid factorial complexity when taking down an inetdev interface
      with lots of configured addresses.  We were doing things like
      traversing the entire address less for each address removed, and
      flushing the entire netfilter conntrack table for every address as
      well.

   8) Add and use SKB bulk free infrastructure, from Jesper Brouer.

   9) Allow offloading u32 classifiers to hardware, and implement for
      ixgbe, from John Fastabend.

  10) Allow configuring IRQ coalescing parameters on a per-queue basis,
      from Kan Liang.

  11) Extend ethtool so that larger link mode masks can be supported.
      From David Decotigny.

  12) Introduce devlink, which can be used to configure port link types
      (ethernet vs Infiniband, etc.), port splitting, and switch device
      level attributes as a whole.  From Jiri Pirko.

  13) Hardware offload support for flower classifiers, from Amir Vadai.

  14) Add "Local Checksum Offload".  Basically, for a tunneled packet
      the checksum of the outer header is 'constant' (because with the
      checksum field filled into the inner protocol header, the payload
      of the outer frame checksums to 'zero'), and we can take advantage
      of that in various ways.  From Edward Cree"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1548 commits)
  bonding: fix bond_get_stats()
  net: bcmgenet: fix dma api length mismatch
  net/mlx4_core: Fix backward compatibility on VFs
  phy: mdio-thunder: Fix some Kconfig typos
  lan78xx: add ndo_get_stats64
  lan78xx: handle statistics counter rollover
  RDS: TCP: Remove unused constant
  RDS: TCP: Add sysctl tunables for sndbuf/rcvbuf on rds-tcp socket
  net: smc911x: convert pxa dma to dmaengine
  team: remove duplicate set of flag IFF_MULTICAST
  bonding: remove duplicate set of flag IFF_MULTICAST
  net: fix a comment typo
  ethernet: micrel: fix some error codes
  ip_tunnels, bpf: define IP_TUNNEL_OPTS_MAX and use it
  bpf, dst: add and use dst_tclassid helper
  bpf: make skb-&gt;tc_classid also readable
  net: mvneta: bm: clarify dependencies
  cls_bpf: reset class and reuse major in da
  ldmvsw: Checkpatch sunvnet.c and sunvnet_common.c
  ldmvsw: Add ldmvsw.c driver code
  ...
</content>
</entry>
<entry>
<title>Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6</title>
<updated>2016-03-17T18:22:54Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-03-17T18:22:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=70477371dc350746d10431d74f0f213a8d59924c'/>
<id>urn:sha1:70477371dc350746d10431d74f0f213a8d59924c</id>
<content type='text'>
Pull crypto update from Herbert Xu:
 "Here is the crypto update for 4.6:

  API:
   - Convert remaining crypto_hash users to shash or ahash, also convert
     blkcipher/ablkcipher users to skcipher.
   - Remove crypto_hash interface.
   - Remove crypto_pcomp interface.
   - Add crypto engine for async cipher drivers.
   - Add akcipher documentation.
   - Add skcipher documentation.

  Algorithms:
   - Rename crypto/crc32 to avoid name clash with lib/crc32.
   - Fix bug in keywrap where we zero the wrong pointer.

  Drivers:
   - Support T5/M5, T7/M7 SPARC CPUs in n2 hwrng driver.
   - Add PIC32 hwrng driver.
   - Support BCM6368 in bcm63xx hwrng driver.
   - Pack structs for 32-bit compat users in qat.
   - Use crypto engine in omap-aes.
   - Add support for sama5d2x SoCs in atmel-sha.
   - Make atmel-sha available again.
   - Make sahara hashing available again.
   - Make ccp hashing available again.
   - Make sha1-mb available again.
   - Add support for multiple devices in ccp.
   - Improve DMA performance in caam.
   - Add hashing support to rockchip"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (116 commits)
  crypto: qat - remove redundant arbiter configuration
  crypto: ux500 - fix checks of error code returned by devm_ioremap_resource()
  crypto: atmel - fix checks of error code returned by devm_ioremap_resource()
  crypto: qat - Change the definition of icp_qat_uof_regtype
  hwrng: exynos - use __maybe_unused to hide pm functions
  crypto: ccp - Add abstraction for device-specific calls
  crypto: ccp - CCP versioning support
  crypto: ccp - Support for multiple CCPs
  crypto: ccp - Remove check for x86 family and model
  crypto: ccp - memset request context to zero during import
  lib/mpi: use "static inline" instead of "extern inline"
  lib/mpi: avoid assembler warning
  hwrng: bcm63xx - fix non device tree compatibility
  crypto: testmgr - allow rfc3686 aes-ctr variants in fips mode.
  crypto: qat - The AE id should be less than the maximal AE number
  lib/mpi: Endianness fix
  crypto: rockchip - add hash support for crypto engine in rk3288
  crypto: xts - fix compile errors
  crypto: doc - add skcipher API documentation
  crypto: doc - update AEAD AD handling
  ...
</content>
</entry>
<entry>
<title>ppp: ensure file-&gt;private_data can't be overridden</title>
<updated>2016-03-16T23:35:06Z</updated>
<author>
<name>Guillaume Nault</name>
<email>g.nault@alphalink.fr</email>
</author>
<published>2016-03-14T20:17:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e8e56ffd9d2973398b60ece1f1bebb8d67b4d032'/>
<id>urn:sha1:e8e56ffd9d2973398b60ece1f1bebb8d67b4d032</id>
<content type='text'>
Locking ppp_mutex must be done before dereferencing file-&gt;private_data,
otherwise it could be modified before ppp_unattached_ioctl() takes the
lock. This could lead ppp_unattached_ioctl() to override -&gt;private_data,
thus leaking reference to the ppp_file previously pointed to.

v2: lock all ppp_ioctl() instead of just checking private_data in
    ppp_unattached_ioctl(), to avoid ambiguous behaviour.

Fixes: f3ff8a4d80e8 ("ppp: push BKL down into the driver")
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>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2016-03-08T17:34:12Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2016-03-08T17:34:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=810813c47a564416f6306ae214e2661366c987a7'/>
<id>urn:sha1:810813c47a564416f6306ae214e2661366c987a7</id>
<content type='text'>
Several cases of overlapping changes, as well as one instance
(vxlan) of a bug fix in 'net' overlapping with code movement
in 'net-next'.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ppp: release rtnl mutex when interface creation fails</title>
<updated>2016-03-07T21:11:31Z</updated>
<author>
<name>Guillaume Nault</name>
<email>g.nault@alphalink.fr</email>
</author>
<published>2016-03-07T18:36:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6faac63a6986f29ef39827f460edd3a5ba64ad5c'/>
<id>urn:sha1:6faac63a6986f29ef39827f460edd3a5ba64ad5c</id>
<content type='text'>
Add missing rtnl_unlock() in the error path of ppp_create_interface().

Fixes: 58a89ecaca53 ("ppp: fix lockdep splat in ppp_dev_uninit()")
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>ppp: lock ppp-&gt;flags in ppp_read() and ppp_poll()</title>
<updated>2016-03-01T21:15:07Z</updated>
<author>
<name>Guillaume Nault</name>
<email>g.nault@alphalink.fr</email>
</author>
<published>2016-02-26T17:45:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=edffc2178d4ba10a61e150b42ef5e7d797714eb3'/>
<id>urn:sha1:edffc2178d4ba10a61e150b42ef5e7d797714eb3</id>
<content type='text'>
ppp_read() and ppp_poll() can be called concurrently with ppp_ioctl().
In this case, ppp_ioctl() might call ppp_ccp_closed(), which may update
ppp-&gt;flags while ppp_read() or ppp_poll() is reading it.
The update done by ppp_ccp_closed() isn't atomic due to the bit mask
operation ('ppp-&gt;flags &amp;= ~(SC_CCP_OPEN | SC_CCP_UP)'), so concurrent
readers might get transient values.
Reading incorrect ppp-&gt;flags may disturb the 'ppp-&gt;flags &amp; SC_LOOP_TRAFFIC'
test in ppp_read() and ppp_poll(), which in turn can lead to improper
decision on whether the PPP unit file is ready for reading or not.

Since ppp_ccp_closed() is protected by the Rx and Tx locks (with
ppp_lock()), taking the Rx lock is enough for ppp_read() and ppp_poll()
to guarantee that ppp_ccp_closed() won't update ppp-&gt;flags
concurrently.

The same reasoning applies to ppp-&gt;n_channels. The 'n_channels' field
can also be written to concurrently by ppp_ioctl() (through
ppp_connect_channel() or ppp_disconnect_channel()). These writes aren't
atomic (simple increment/decrement), but are protected by both the Rx
and Tx locks (like in the ppp-&gt;flags case). So holding the Rx lock
before reading ppp-&gt;n_channels also prevents concurrent writes.

Signed-off-by: Guillaume Nault &lt;g.nault@alphalink.fr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
