<feed xmlns='http://www.w3.org/2005/Atom'>
<title>xavi/android_kernel_m2note/drivers/net/ppp, branch ng-7.1.2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://gitea.privatedns.org/xavi/android_kernel_m2note/atom?h=ng-7.1.2</id>
<link rel='self' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/atom?h=ng-7.1.2'/>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/'/>
<updated>2018-11-29T16:49:05+00:00</updated>
<entry>
<title>Replace &lt;asm/uaccess.h&gt; with &lt;linux/uaccess.h&gt; globally</title>
<updated>2018-11-29T16:49:05+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-12-24T19:46:01+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=8588b01909e0145e5e84f5fe0a5353bd194f205c'/>
<id>urn:sha1:8588b01909e0145e5e84f5fe0a5353bd194f205c</id>
<content type='text'>
This was entirely automated, using the script by Al:

  PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*&lt;asm/uaccess.h&gt;'
  sed -i -e "s!$PATT!#include &lt;linux/uaccess.h&gt;!" \
        $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h)

to do the replacement at the end of the merge window.

Requested-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Moyster &lt;oysterized@gmail.com&gt;
</content>
</entry>
<entry>
<title>ppp: take reference on channels netns</title>
<updated>2017-12-03T14:55:04+00:00</updated>
<author>
<name>Guillaume Nault</name>
<email>g.nault@alphalink.fr</email>
</author>
<published>2016-03-23T15:38:55+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=b14a0eb404ae97b56150f42c766967dcab997e43'/>
<id>urn:sha1:b14a0eb404ae97b56150f42c766967dcab997e43</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
==================================================================

Change-Id: I591b30eafa1b57bd2e211e1f33c39128702ff0b0
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>drivers: net: ppp: fix maybe-uninitialized warning</title>
<updated>2017-05-23T17:16:21+00:00</updated>
<author>
<name>Nathan Chancellor</name>
<email>natechancellor@gmail.com</email>
</author>
<published>2017-01-27T04:53:05+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=6eb00aa946756890a3cfe4695c5a4b5d581d4fc5'/>
<id>urn:sha1:6eb00aa946756890a3cfe4695c5a4b5d581d4fc5</id>
<content type='text'>
drivers/net/ppp/ppp_generic.c: In function 'ppp_ioctl':
drivers/net/ppp/ppp_generic.c:774:23: warning: 'code' may be used uninitialized in this function [-Wmaybe-uninitialized]
    ppp-&gt;active_filter = code;
    ~~~~~~~~~~~~~~~~~~~^~~~~~
drivers/net/ppp/ppp_generic.c:760:21: warning: 'code' may be used uninitialized in this function [-Wmaybe-uninitialized]
    ppp-&gt;pass_filter = code;
    ~~~~~~~~~~~~~~~~~^~~~~~

Signed-off-by: Nathan Chancellor &lt;natechancellor@gmail.com&gt;
</content>
</entry>
<entry>
<title>UPSTREAM: ppp: defer netns reference release for ppp channel</title>
<updated>2017-04-11T08:57:32+00:00</updated>
<author>
<name>WANG Cong</name>
<email>xiyou.wangcong@gmail.com</email>
</author>
<published>2016-07-06T05:12:36+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=f4f183e4666a5626469f341babbd8e48d7ae62da'/>
<id>urn:sha1:f4f183e4666a5626469f341babbd8e48d7ae62da</id>
<content type='text'>
(cherry pick from commit 205e1e255c479f3fd77446415706463b282f94e4)

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;

Fixes: Change-Id: Iee0015eca5bd181954bb4896a3720f7549c5ed0b ("UPSTREAM:
ppp: take reference on channels netns")
Signed-off-by: Amit Pundir &lt;amit.pundir@linaro.org&gt;
Change-Id: I24d0bb6f349ab3829f63cfe935ed97b6913a3508
</content>
</entry>
<entry>
<title>Linux 3.10.102 (accumulative patch)</title>
<updated>2016-08-26T19:06:18+00:00</updated>
<author>
<name>Stefan Guendhoer</name>
<email>stefan@guendhoer.com</email>
</author>
<published>2016-06-18T18:57:35+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=1e0c74c9fb68682a41947b9d2af1933f8385c194'/>
<id>urn:sha1:1e0c74c9fb68682a41947b9d2af1933f8385c194</id>
<content type='text'>
commit ca1199fccf14540e86f6da955333e31d6fec5f3e
Author: Willy Tarreau &lt;w@1wt.eu&gt;
Date:   Sun Jun 12 11:41:54 2016 +0200

    Linux 3.10.102

commit fd1a096205147366e2cc9dc0a816e24f56946a83
Author: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Date:   Thu Apr 21 18:58:31 2016 +0900

    serial: samsung: Reorder the sequence of clock control when call s3c24xx_serial_set_termios()

    commit b8995f527aac143e83d3900ff39357651ea4e0f6 upstream.

    This patch fixes the broken serial log when changing the clock source
    of uart device. Before disabling the original clock source, this patch
    enables the new clock source to protect the clock off state for a split second.

    Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
    Reviewed-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 0fff1b1ff8c9c07caa1762b6c0b76b1dbbe20223
Author: Jiri Slaby &lt;jslaby@suse.cz&gt;
Date:   Tue May 3 17:05:54 2016 +0200

    tty: vt, return error when con_startup fails

    commit 6798df4c5fe0a7e6d2065cf79649a794e5ba7114 upstream.

    When csw-&gt;con_startup() fails in do_register_con_driver, we return no
    error (i.e. 0). This was changed back in 2006 by commit 3e795de763.
    Before that we used to return -ENODEV.

    So fix the return value to be -ENODEV in that case again.

    Fixes: 3e795de763 ("VT binding: Add binding/unbinding support for the VT console")
    Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
    Reported-by: "Dan Carpenter" &lt;dan.carpenter@oracle.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 49849df77f10d800990bb8cb3e4f974745967520
Author: Schemmel Hans-Christoph &lt;Hans-Christoph.Schemmel@gemalto.com&gt;
Date:   Fri Apr 29 08:51:06 2016 +0000

    USB: serial: option: add support for Cinterion PH8 and AHxx

    commit 444f94e9e625f6ec6bbe2cb232a6451c637f35a3 upstream.

    Added support for Gemalto's Cinterion PH8 and AHxx products
    with 2 RmNet Interfaces and products with 1 RmNet + 1 USB Audio interface.

    In addition some minor renaming and formatting.

    Signed-off-by: Hans-Christoph Schemmel &lt;hans-christoph.schemmel@gemalto.com&gt;
    [johan: sort current entries and trim trailing whitespace ]
    Cc: stable &lt;stable@vger.kernel.org&gt;
    Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 9d08a9916056a23f2c4818222cf90e800d3f77ec
Author: Johan Hovold &lt;johan@kernel.org&gt;
Date:   Sun May 8 20:07:57 2016 +0200

    USB: serial: io_edgeport: fix memory leaks in probe error path

    commit c8d62957d450cc1a22ce3242908709fe367ddc8e upstream.

    URBs and buffers allocated in attach for Epic devices would never be
    deallocated in case of a later probe error (e.g. failure to allocate
    minor numbers) as disconnect is then never called.

    Fix by moving deallocation to release and making sure that the
    URBs are first unlinked.

    Fixes: f9c99bb8b3a1 ("USB: usb-serial: replace shutdown with disconnect,
    release")
    Cc: stable &lt;stable@vger.kernel.org&gt;	# v2.6.31
    Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
    Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 1f983d0bebe54898bc35779815a23582ac38c9b7
Author: Johan Hovold &lt;johan@kernel.org&gt;
Date:   Sun May 8 20:08:02 2016 +0200

    USB: serial: quatech2: fix use-after-free in probe error path

    commit 028c49f5e02a257c94129cd815f7c8485f51d4ef upstream.

    The interface read URB is submitted in attach, but was only unlinked by
    the driver at disconnect.

    In case of a late probe error (e.g. due to failed minor allocation),
    disconnect is never called and we would end up with active URBs for an
    unbound interface. This in turn could lead to deallocated memory being
    dereferenced in the completion callback.

    Fixes: f7a33e608d9a ("USB: serial: add quatech2 usb to serial driver")
    Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
    Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 550d9c436e40dd384b22f2beea93e20c2e069600
Author: Johan Hovold &lt;johan@kernel.org&gt;
Date:   Sun May 8 20:07:58 2016 +0200

    USB: serial: keyspan: fix use-after-free in probe error path

    commit 35be1a71d70775e7bd7e45fa6d2897342ff4c9d2 upstream.

    The interface instat and indat URBs were submitted in attach, but never
    unlinked in release before deallocating the corresponding transfer
    buffers.

    In the case of a late probe error (e.g. due to failed minor allocation),
    disconnect would not have been called before release, causing the
    buffers to be freed while the URBs are still in use. We'd also end up
    with active URBs for an unbound interface.

    Fixes: f9c99bb8b3a1 ("USB: usb-serial: replace shutdown with disconnect,
    release")
    Cc: stable &lt;stable@vger.kernel.org&gt;	# v2.6.31
    Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
    Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit c21f25b36d258d04c0332609aaa68d895cfa8796
Author: Jiri Slaby &lt;jslaby@suse.cz&gt;
Date:   Sat Mar 19 11:49:43 2016 +0100

    Bluetooth: vhci: purge unhandled skbs

    commit 13407376b255325fa817798800117a839f3aa055 upstream.

    The write handler allocates skbs and queues them into data-&gt;readq.
    Read side should read them, if there is any. If there is none, skbs
    should be dropped by hdev-&gt;flush. But this happens only if the device
    is HCI_UP, i.e. hdev-&gt;power_on work was triggered already. When it was
    not, skbs stay allocated in the queue when /dev/vhci is closed. So
    purge the queue in -&gt;release.

    Program to reproduce:
    	#include &lt;err.h&gt;
    	#include &lt;fcntl.h&gt;
    	#include &lt;stdio.h&gt;
    	#include &lt;unistd.h&gt;

    	#include &lt;sys/stat.h&gt;
    	#include &lt;sys/types.h&gt;
    	#include &lt;sys/uio.h&gt;

    	int main()
    	{
    		char buf[] = { 0xff, 0 };
    		struct iovec iov = {
    			.iov_base = buf,
    			.iov_len = sizeof(buf),
    		};
    		int fd;

    		while (1) {
    			fd = open("/dev/vhci", O_RDWR);
    			if (fd &lt; 0)
    				err(1, "open");

    			usleep(50);

    			if (writev(fd, &amp;iov, 1) &lt; 0)
    				err(1, "writev");

    			usleep(50);

    			close(fd);
    		}

    		return 0;
    	}

    Result:
    kmemleak: 4609 new suspected memory leaks
    unreferenced object 0xffff88059f4d5440 (size 232):
      comm "vhci", pid 1084, jiffies 4294912542 (age 37569.296s)
      hex dump (first 32 bytes):
        20 f0 23 87 05 88 ff ff 20 f0 23 87 05 88 ff ff   .#..... .#.....
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
      backtrace:
    ...
        [&lt;ffffffff81ece010&gt;] __alloc_skb+0x0/0x5a0
        [&lt;ffffffffa021886c&gt;] vhci_create_device+0x5c/0x580 [hci_vhci]
        [&lt;ffffffffa0219436&gt;] vhci_write+0x306/0x4c8 [hci_vhci]

    Fixes: 23424c0d31 (Bluetooth: Add support creating virtual AMP controllers)
    Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
    Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit e9e0c8aded7f1c1bc5e6c01ee73ec29ec5942f6d
Author: Matt Gumbel &lt;matthew.k.gumbel@intel.com&gt;
Date:   Fri May 20 10:33:46 2016 +0300

    mmc: longer timeout for long read time quirk

    commit 32ecd320db39bcb007679ed42f283740641b81ea upstream.

    008GE0 Toshiba mmc in some Intel Baytrail tablets responds to
    MMC_SEND_EXT_CSD in 450-600ms.

    This patch will...

    () Increase the long read time quirk timeout from 300ms to 600ms. Original
       author of that quirk says 300ms was only a guess and that the number
       may need to be raised in the future.

    () Add this specific MMC to the quirk

    Signed-off-by: Matt Gumbel &lt;matthew.k.gumbel@intel.com&gt;
    Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
    Cc: stable@vger.kernel.org
    Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit e94c917abb4a6a083eda8831e63907d4c836fd53
Author: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Date:   Thu May 5 08:12:28 2016 +0300

    mmc: mmc: Fix partition switch timeout for some eMMCs

    commit 1c447116d017a98c90f8f71c8c5a611e0aa42178 upstream.

    Some eMMCs set the partition switch timeout too low.

    Now typically eMMCs are considered a critical component (e.g. because
    they store the root file system) and consequently are expected to be
    reliable.  Thus we can neglect the use case where eMMCs can't switch
    reliably and we might want a lower timeout to facilitate speedy
    recovery.

    Although we could employ a quirk for the cards that are affected (if
    we could identify them all), as described above, there is little
    benefit to having a low timeout, so instead simply set a minimum
    timeout.

    The minimum is set to 300ms somewhat arbitrarily - the examples that
    have been seen had a timeout of 10ms but were sometimes taking 60-70ms.

    Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
    Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 0cf266167e9f1e39bb411a49f1163f488f5a75e8
Author: Roger Quadros &lt;rogerq@ti.com&gt;
Date:   Mon May 9 11:28:37 2016 +0300

    mfd: omap-usb-tll: Fix scheduling while atomic BUG

    commit b49b927f16acee626c56a1af4ab4cb062f75b5df upstream.

    We shouldn't be calling clk_prepare_enable()/clk_prepare_disable()
    in an atomic context.

    Fixes the following issue:

    [    5.830970] ehci-omap: OMAP-EHCI Host Controller driver
    [    5.830974] driver_register 'ehci-omap'
    [    5.895849] driver_register 'wl1271_sdio'
    [    5.896870] BUG: scheduling while atomic: udevd/994/0x00000002
    [    5.896876] 4 locks held by udevd/994:
    [    5.896904]  #0:  (&amp;dev-&gt;mutex){......}, at: [&lt;c049597c&gt;] __driver_attach+0x60/0xac
    [    5.896923]  #1:  (&amp;dev-&gt;mutex){......}, at: [&lt;c049598c&gt;] __driver_attach+0x70/0xac
    [    5.896946]  #2:  (tll_lock){+.+...}, at: [&lt;c04c2630&gt;] omap_tll_enable+0x2c/0xd0
    [    5.896966]  #3:  (prepare_lock){+.+...}, at: [&lt;c05ce9c8&gt;] clk_prepare_lock+0x48/0xe0
    [    5.897042] Modules linked in: wlcore_sdio(+) ehci_omap(+) dwc3_omap snd_soc_ts3a225e leds_is31fl319x bq27xxx_battery_i2c tsc2007 bq27xxx_battery bq2429x_charger ina2xx tca8418_keypad as5013 leds_tca6507 twl6040_vibra gpio_twl6040 bmp085_i2c(+) palmas_gpadc usb3503 palmas_pwrbutton bmg160_i2c(+) bmp085 bma150(+) bmg160_core bmp280 input_polldev snd_soc_omap_mcbsp snd_soc_omap_mcpdm snd_soc_omap snd_pcm_dmaengine
    [    5.897048] Preemption disabled at:[&lt;  (null)&gt;]   (null)
    [    5.897051]
    [    5.897059] CPU: 0 PID: 994 Comm: udevd Not tainted 4.6.0-rc5-letux+ #233
    [    5.897062] Hardware name: Generic OMAP5 (Flattened Device Tree)
    [    5.897076] [&lt;c010e714&gt;] (unwind_backtrace) from [&lt;c010af34&gt;] (show_stack+0x10/0x14)
    [    5.897087] [&lt;c010af34&gt;] (show_stack) from [&lt;c040aa7c&gt;] (dump_stack+0x88/0xc0)
    [    5.897099] [&lt;c040aa7c&gt;] (dump_stack) from [&lt;c020c558&gt;] (__schedule_bug+0xac/0xd0)
    [    5.897111] [&lt;c020c558&gt;] (__schedule_bug) from [&lt;c06f3d44&gt;] (__schedule+0x88/0x7e4)
    [    5.897120] [&lt;c06f3d44&gt;] (__schedule) from [&lt;c06f46d8&gt;] (schedule+0x9c/0xc0)
    [    5.897129] [&lt;c06f46d8&gt;] (schedule) from [&lt;c06f4904&gt;] (schedule_preempt_disabled+0x14/0x20)
    [    5.897140] [&lt;c06f4904&gt;] (schedule_preempt_disabled) from [&lt;c06f64e4&gt;] (mutex_lock_nested+0x258/0x43c)
    [    5.897150] [&lt;c06f64e4&gt;] (mutex_lock_nested) from [&lt;c05ce9c8&gt;] (clk_prepare_lock+0x48/0xe0)
    [    5.897160] [&lt;c05ce9c8&gt;] (clk_prepare_lock) from [&lt;c05d0e7c&gt;] (clk_prepare+0x10/0x28)
    [    5.897169] [&lt;c05d0e7c&gt;] (clk_prepare) from [&lt;c04c2668&gt;] (omap_tll_enable+0x64/0xd0)
    [    5.897180] [&lt;c04c2668&gt;] (omap_tll_enable) from [&lt;c04c1728&gt;] (usbhs_runtime_resume+0x18/0x17c)
    [    5.897192] [&lt;c04c1728&gt;] (usbhs_runtime_resume) from [&lt;c049d404&gt;] (pm_generic_runtime_resume+0x2c/0x40)
    [    5.897202] [&lt;c049d404&gt;] (pm_generic_runtime_resume) from [&lt;c049f180&gt;] (__rpm_callback+0x38/0x68)
    [    5.897210] [&lt;c049f180&gt;] (__rpm_callback) from [&lt;c049f220&gt;] (rpm_callback+0x70/0x88)
    [    5.897218] [&lt;c049f220&gt;] (rpm_callback) from [&lt;c04a0a00&gt;] (rpm_resume+0x4ec/0x7ec)
    [    5.897227] [&lt;c04a0a00&gt;] (rpm_resume) from [&lt;c04a0f48&gt;] (__pm_runtime_resume+0x4c/0x64)
    [    5.897236] [&lt;c04a0f48&gt;] (__pm_runtime_resume) from [&lt;c04958dc&gt;] (driver_probe_device+0x30/0x70)
    [    5.897246] [&lt;c04958dc&gt;] (driver_probe_device) from [&lt;c04959a4&gt;] (__driver_attach+0x88/0xac)
    [    5.897256] [&lt;c04959a4&gt;] (__driver_attach) from [&lt;c04940f8&gt;] (bus_for_each_dev+0x50/0x84)
    [    5.897267] [&lt;c04940f8&gt;] (bus_for_each_dev) from [&lt;c0494e40&gt;] (bus_add_driver+0xcc/0x1e4)
    [    5.897276] [&lt;c0494e40&gt;] (bus_add_driver) from [&lt;c0496914&gt;] (driver_register+0xac/0xf4)
    [    5.897286] [&lt;c0496914&gt;] (driver_register) from [&lt;c01018e0&gt;] (do_one_initcall+0x100/0x1b8)
    [    5.897296] [&lt;c01018e0&gt;] (do_one_initcall) from [&lt;c01c7a54&gt;] (do_init_module+0x58/0x1c0)
    [    5.897304] [&lt;c01c7a54&gt;] (do_init_module) from [&lt;c01c8a3c&gt;] (SyS_finit_module+0x88/0x90)
    [    5.897313] [&lt;c01c8a3c&gt;] (SyS_finit_module) from [&lt;c0107120&gt;] (ret_fast_syscall+0x0/0x1c)
    [    5.912697] ------------[ cut here ]------------
    [    5.912711] WARNING: CPU: 0 PID: 994 at kernel/sched/core.c:2996 _raw_spin_unlock+0x28/0x58
    [    5.912717] DEBUG_LOCKS_WARN_ON(val &gt; preempt_count())

    Reported-by: H. Nikolaus Schaller &lt;hns@goldelico.com&gt;
    Tested-by: H. Nikolaus Schaller &lt;hns@goldelico.com&gt;
    Signed-off-by: Roger Quadros &lt;rogerq@ti.com&gt;
    Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit acd291378f60343d146b0157b64fbca97182c4ea
Author: Steven Rostedt (Red Hat) &lt;rostedt@goodmis.org&gt;
Date:   Fri May 13 09:34:12 2016 -0400

    ring-buffer: Prevent overflow of size in ring_buffer_resize()

    commit 59643d1535eb220668692a5359de22545af579f6 upstream.

    If the size passed to ring_buffer_resize() is greater than MAX_LONG - BUF_PAGE_SIZE
    then the DIV_ROUND_UP() will return zero.

    Here's the details:

      # echo 18014398509481980 &gt; /sys/kernel/debug/tracing/buffer_size_kb

    tracing_entries_write() processes this and converts kb to bytes.

     18014398509481980 &lt;&lt; 10 = 18446744073709547520

    and this is passed to ring_buffer_resize() as unsigned long size.

     size = DIV_ROUND_UP(size, BUF_PAGE_SIZE);

    Where DIV_ROUND_UP(a, b) is (a + b - 1)/b

    BUF_PAGE_SIZE is 4080 and here

     18446744073709547520 + 4080 - 1 = 18446744073709551599

    where 18446744073709551599 is still smaller than 2^64

     2^64 - 18446744073709551599 = 17

    But now 18446744073709551599 / 4080 = 4521260802379792

    and size = size * 4080 = 18446744073709551360

    This is checked to make sure its still greater than 2 * 4080,
    which it is.

    Then we convert to the number of buffer pages needed.

     nr_page = DIV_ROUND_UP(size, BUF_PAGE_SIZE)

    but this time size is 18446744073709551360 and

     2^64 - (18446744073709551360 + 4080 - 1) = -3823

    Thus it overflows and the resulting number is less than 4080, which makes

      3823 / 4080 = 0

    an nr_pages is set to this. As we already checked against the minimum that
    nr_pages may be, this causes the logic to fail as well, and we crash the
    kernel.

    There's no reason to have the two DIV_ROUND_UP() (that's just result of
    historical code changes), clean up the code and fix this bug.

    Cc: stable@vger.kernel.org # 3.5+
    Fixes: 83f40318dab00 ("ring-buffer: Make removal of ring buffer pages atomic")
    Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 1b5493498239d8c7087b6c337285b94eb22e98e4
Author: Steven Rostedt (Red Hat) &lt;rostedt@goodmis.org&gt;
Date:   Thu May 12 11:01:24 2016 -0400

    ring-buffer: Use long for nr_pages to avoid overflow failures

    commit 9b94a8fba501f38368aef6ac1b30e7335252a220 upstream.

    The size variable to change the ring buffer in ftrace is a long. The
    nr_pages used to update the ring buffer based on the size is int. On 64 bit
    machines this can cause an overflow problem.

    For example, the following will cause the ring buffer to crash:

     # cd /sys/kernel/debug/tracing
     # echo 10 &gt; buffer_size_kb
     # echo 8556384240 &gt; buffer_size_kb

    Then you get the warning of:

     WARNING: CPU: 1 PID: 318 at kernel/trace/ring_buffer.c:1527 rb_update_pages+0x22f/0x260

    Which is:

      RB_WARN_ON(cpu_buffer, nr_removed);

    Note each ring buffer page holds 4080 bytes.

    This is because:

     1) 10 causes the ring buffer to have 3 pages.
        (10kb requires 3 * 4080 pages to hold)

     2) (2^31 / 2^10  + 1) * 4080 = 8556384240
        The value written into buffer_size_kb is shifted by 10 and then passed
        to ring_buffer_resize(). 8556384240 * 2^10 = 8761737461760

     3) The size passed to ring_buffer_resize() is then divided by BUF_PAGE_SIZE
        which is 4080. 8761737461760 / 4080 = 2147484672

     4) nr_pages is subtracted from the current nr_pages (3) and we get:
        2147484669. This value is saved in a signed integer nr_pages_to_update

     5) 2147484669 is greater than 2^31 but smaller than 2^32, a signed int
        turns into the value of -2147482627

     6) As the value is a negative number, in update_pages_handler() it is
        negated and passed to rb_remove_pages() and 2147482627 pages will
        be removed, which is much larger than 3 and it causes the warning
        because not all the pages asked to be removed were removed.

    Link: https://bugzilla.kernel.org/show_bug.cgi?id=118001

    Fixes: 7a8e76a3829f1 ("tracing: unified trace buffer")
    Reported-by: Hao Qin &lt;QEver.cn@gmail.com&gt;
    Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 076765ee6acabf01d19bad64064e920998ca33ba
Author: Stefan Metzmacher &lt;metze@samba.org&gt;
Date:   Tue May 3 10:52:30 2016 +0200

    fs/cifs: correctly to anonymous authentication via NTLMSSP

    commit cfda35d98298131bf38fbad3ce4cd5ecb3cf18db upstream.

    See [MS-NLMP] 3.2.5.1.2 Server Receives an AUTHENTICATE_MESSAGE from the Client:

       ...
       Set NullSession to FALSE
       If (AUTHENTICATE_MESSAGE.UserNameLen == 0 AND
          AUTHENTICATE_MESSAGE.NtChallengeResponse.Length == 0 AND
          (AUTHENTICATE_MESSAGE.LmChallengeResponse == Z(1)
           OR
           AUTHENTICATE_MESSAGE.LmChallengeResponse.Length == 0))
           -- Special case: client requested anonymous authentication
           Set NullSession to TRUE
       ...

    Only server which map unknown users to guest will allow
    access using a non-null NTChallengeResponse.

    For Samba it's the "map to guest = bad user" option.

    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11913

    CC: Stable &lt;stable@vger.kernel.org&gt;
    Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
    Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit ee78aa28de7252c93cb35b62517fc71502891b33
Author: Kangjie Lu &lt;kangjielu@gmail.com&gt;
Date:   Sun May 8 12:10:14 2016 -0400

    net: fix a kernel infoleak in x25 module

    commit 79e48650320e6fba48369fccf13fd045315b19b8 upstream.

    Stack object "dte_facilities" is allocated in x25_rx_call_request(),
    which is supposed to be initialized in x25_negotiate_facilities.
    However, 5 fields (8 bytes in total) are not initialized. This
    object is then copied to userland via copy_to_user, thus infoleak
    occurs.

    Signed-off-by: Kangjie Lu &lt;kjlu@gatech.edu&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 2b3e8cb14e7524f2883326a2221c6728ec5ef96e
Author: Nikolay Aleksandrov &lt;nikolay@cumulusnetworks.com&gt;
Date:   Wed May 4 16:18:45 2016 +0200

    net: bridge: fix old ioctl unlocked net device walk

    commit 31ca0458a61a502adb7ed192bf9716c6d05791a5 upstream.

    get_bridge_ifindices() is used from the old "deviceless" bridge ioctl
    calls which aren't called with rtnl held. The comment above says that it is
    called with rtnl but that is not really the case.
    Here's a sample output from a test ASSERT_RTNL() which I put in
    get_bridge_ifindices and executed "brctl show":
    [  957.422726] RTNL: assertion failed at net/bridge//br_ioctl.c (30)
    [  957.422925] CPU: 0 PID: 1862 Comm: brctl Tainted: G        W  O
    4.6.0-rc4+ #157
    [  957.423009] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
    BIOS 1.8.1-20150318_183358- 04/01/2014
    [  957.423009]  0000000000000000 ffff880058adfdf0 ffffffff8138dec5
    0000000000000400
    [  957.423009]  ffffffff81ce8380 ffff880058adfe58 ffffffffa05ead32
    0000000000000001
    [  957.423009]  00007ffec1a444b0 0000000000000400 ffff880053c19130
    0000000000008940
    [  957.423009] Call Trace:
    [  957.423009]  [&lt;ffffffff8138dec5&gt;] dump_stack+0x85/0xc0
    [  957.423009]  [&lt;ffffffffa05ead32&gt;]
    br_ioctl_deviceless_stub+0x212/0x2e0 [bridge]
    [  957.423009]  [&lt;ffffffff81515beb&gt;] sock_ioctl+0x22b/0x290
    [  957.423009]  [&lt;ffffffff8126ba75&gt;] do_vfs_ioctl+0x95/0x700
    [  957.423009]  [&lt;ffffffff8126c159&gt;] SyS_ioctl+0x79/0x90
    [  957.423009]  [&lt;ffffffff8163a4c0&gt;] entry_SYSCALL_64_fastpath+0x23/0xc1

    Since it only reads bridge ifindices, we can use rcu to safely walk the net
    device list. Also remove the wrong rtnl comment above.

    Signed-off-by: Nikolay Aleksandrov &lt;nikolay@cumulusnetworks.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit ced4eef10a732bd33ee9289771fada4a07bf508d
Author: Ian Campbell &lt;ian.campbell@docker.com&gt;
Date:   Wed May 4 14:21:53 2016 +0100

    VSOCK: do not disconnect socket when peer has shutdown SEND only

    commit dedc58e067d8c379a15a8a183c5db318201295bb upstream.

    The peer may be expecting a reply having sent a request and then done a
    shutdown(SHUT_WR), so tearing down the whole socket at this point seems
    wrong and breaks for me with a client which does a SHUT_WR.

    Looking at other socket family's stream_recvmsg callbacks doing a shutdown
    here does not seem to be the norm and removing it does not seem to have
    had any adverse effects that I can see.

    I'm using Stefan's RFC virtio transport patches, I'm unsure of the impact
    on the vmci transport.

    Signed-off-by: Ian Campbell &lt;ian.campbell@docker.com&gt;
    Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
    Cc: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
    Cc: Claudio Imbrenda &lt;imbrenda@linux.vnet.ibm.com&gt;
    Cc: Andy King &lt;acking@vmware.com&gt;
    Cc: Dmitry Torokhov &lt;dtor@vmware.com&gt;
    Cc: Jorgen Hansen &lt;jhansen@vmware.com&gt;
    Cc: Adit Ranadive &lt;aditr@vmware.com&gt;
    Cc: netdev@vger.kernel.org
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit f9d691421747048d814785136d187595483bab4a
Author: Kangjie Lu &lt;kangjielu@gmail.com&gt;
Date:   Tue May 3 16:46:24 2016 -0400

    net: fix infoleak in rtnetlink

    commit 5f8e44741f9f216e33736ea4ec65ca9ac03036e6 upstream.

    The stack object âmapâ has a total size of 32 bytes. Its last 4
    bytes are padding generated by compiler. These padding bytes are
    not initialized and sent out via ânla_putâ.

    Signed-off-by: Kangjie Lu &lt;kjlu@gatech.edu&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 44efbfab13ad589048ebe2a914c58cdcfc9d84fb
Author: Kangjie Lu &lt;kangjielu@gmail.com&gt;
Date:   Tue May 3 16:35:05 2016 -0400

    net: fix infoleak in llc

    commit b8670c09f37bdf2847cc44f36511a53afc6161fd upstream.

    The stack object âinfoâ has a total size of 12 bytes. Its last byte
    is padding which is not initialized and leaked via âput_cmsgâ.

    Signed-off-by: Kangjie Lu &lt;kjlu@gatech.edu&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 58da198d99004f57a8f782869f0618d6d8049970
Author: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Date:   Wed Apr 20 23:23:08 2016 +0100

    atl2: Disable unimplemented scatter/gather feature

    commit f43bfaeddc79effbf3d0fcb53ca477cca66f3db8 upstream.

    atl2 includes NETIF_F_SG in hw_features even though it has no support
    for non-linear skbs.  This bug was originally harmless since the
    driver does not claim to implement checksum offload and that used to
    be a requirement for SG.

    Now that SG and checksum offload are independent features, if you
    explicitly enable SG *and* use one of the rare protocols that can use
    SG without checkusm offload, this potentially leaks sensitive
    information (before you notice that it just isn't working).  Therefore
    this obscure bug has been designated CVE-2016-2117.

    Reported-by: Justin Yackoski &lt;jyackoski@crypto-nite.com&gt;
    Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
    Fixes: ec5f06156423 ("net: Kill link between CSUM and SG features.")
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 13b89711a2ddc389efb2a220e2f34ab8ff47021b
Author: Mathias Krause &lt;minipli@googlemail.com&gt;
Date:   Sun Apr 10 12:52:28 2016 +0200

    packet: fix heap info leak in PACKET_DIAG_MCLIST sock_diag interface

    commit 309cf37fe2a781279b7675d4bb7173198e532867 upstream.

    Because we miss to wipe the remainder of i-&gt;addr[] in packet_mc_add(),
    pdiag_put_mclist() leaks uninitialized heap bytes via the
    PACKET_DIAG_MCLIST netlink attribute.

    Fix this by explicitly memset(0)ing the remaining bytes in i-&gt;addr[].

    Fixes: eea68e2f1a00 ("packet: Report socket mclist info via diag module")
    Signed-off-by: Mathias Krause &lt;minipli@googlemail.com&gt;
    Cc: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
    Cc: Pavel Emelyanov &lt;xemul@parallels.com&gt;
    Acked-by: Pavel Emelyanov &lt;xemul@virtuozzo.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 3b848d3d6116d5db4a135e94d62f430058c09670
Author: Chris Friesen &lt;chris.friesen@windriver.com&gt;
Date:   Fri Apr 8 15:21:30 2016 -0600

    route: do not cache fib route info on local routes with oif

    commit d6d5e999e5df67f8ec20b6be45e2229455ee3699 upstream.

    For local routes that require a particular output interface we do not want
    to cache the result.  Caching the result causes incorrect behaviour when
    there are multiple source addresses on the interface.  The end result
    being that if the intended recipient is waiting on that interface for the
    packet he won't receive it because it will be delivered on the loopback
    interface and the IP_PKTINFO ipi_ifindex will be set to the loopback
    interface as well.

    This can be tested by running a program such as "dhcp_release" which
    attempts to inject a packet on a particular interface so that it is
    received by another program on the same board.  The receiving process
    should see an IP_PKTINFO ipi_ifndex value of the source interface
    (e.g., eth1) instead of the loopback interface (e.g., lo).  The packet
    will still appear on the loopback interface in tcpdump but the important
    aspect is that the CMSG info is correct.

    Sample dhcp_release command line:

       dhcp_release eth1 192.168.204.222 02:11:33:22:44:66

    Signed-off-by: Allain Legacy &lt;allain.legacy@windriver.com&gt;
    Signed off-by: Chris Friesen &lt;chris.friesen@windriver.com&gt;
    Reviewed-by: Julian Anastasov &lt;ja@ssi.bg&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 49fabfb2ba27a6fd9322b7b89ba147d57dc18ca0
Author: David S. Miller &lt;davem@davemloft.net&gt;
Date:   Sun Apr 10 23:01:30 2016 -0400

    decnet: Do not build routes to devices without decnet private data.

    commit a36a0d4008488fa545c74445d69eaf56377d5d4e upstream.

    In particular, make sure we check for decnet private presence
    for loopback devices.

    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit d248f68a930661cf0ba06faa7867d1ab77a9abe3
Author: Tony Lindgren &lt;tony@atomide.com&gt;
Date:   Thu May 28 07:22:08 2015 -0700

    ARM: OMAP3: Fix booting with thumb2 kernel

    commit d8a50941c91a68da202aaa96a3dacd471ea9c693 upstream.

    We get a NULL pointer dereference on omap3 for thumb2 compiled kernels:

    Internal error: Oops: 80000005 [#1] SMP THUMB2
    ...
    [&lt;c046497b&gt;] (_raw_spin_unlock_irqrestore) from [&lt;c0024375&gt;]
    (omap3_enter_idle_bm+0xc5/0x178)
    [&lt;c0024375&gt;] (omap3_enter_idle_bm) from [&lt;c0374e63&gt;]
    (cpuidle_enter_state+0x77/0x27c)
    [&lt;c0374e63&gt;] (cpuidle_enter_state) from [&lt;c00627f1&gt;]
    (cpu_startup_entry+0x155/0x23c)
    [&lt;c00627f1&gt;] (cpu_startup_entry) from [&lt;c06b9a47&gt;]
    (start_kernel+0x32f/0x338)
    [&lt;c06b9a47&gt;] (start_kernel) from [&lt;8000807f&gt;] (0x8000807f)

    The power management related assembly on omaps needs to interact with
    ARM mode bootrom code, so we need to keep most of the related assembly
    in ARM mode.

    Turns out this error is because of missing ENDPROC for assembly code
    as suggested by Stephen Boyd &lt;sboyd@codeaurora.org&gt;. Let's fix the
    problem by adding ENDPROC in two places to sleep34xx.S.

    Let's also remove the now duplicate custom code for mode switching.
    This has been unnecessary since commit 6ebbf2ce437b ("ARM: convert
    all "mov.* pc, reg" to "bx reg" for ARMv6+").

    And let's also remove the comments about local variables, they are
    now just confusing after the ENDPROC.

    The reason why ENDPROC makes a difference is it sets .type and then
    the compiler knows what to do with the thumb bit as explained at:

    https://wiki.ubuntu.com/ARM/Thumb2PortingHowto

    Reported-by: Kevin Hilman &lt;khilman@kernel.org&gt;
    Tested-by: Kevin Hilman &lt;khilman@linaro.org&gt;
    Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 3f557d256fac2c83ae330c21524ebabb4657a392
Author: Andi Kleen &lt;ak@linux.intel.com&gt;
Date:   Sat Feb 8 08:52:00 2014 +0100

    asmlinkage, pnp: Make variables used from assembler code visible

    commit a99aa42d0253f033cbb85096d3f2bd82201321e6 upstream.

    Mark variables referenced from assembler files visible.

    This fixes compile problems with LTO.

    Cc: Jaroslav Kysela &lt;perex@perex.cz&gt;
    Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
    Link: http://lkml.kernel.org/r/1391845930-28580-4-git-send-email-ak@linux.intel.com
    Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 6985c64f126ff488cbe399e81fb23ee0477bf154
Author: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Date:   Mon May 9 09:31:47 2016 -0700

    Input: max8997-haptic - fix NULL pointer dereference

    commit 6ae645d5fa385f3787bf1723639cd907fe5865e7 upstream.

    NULL pointer derefence happens when booting with DTB because the
    platform data for haptic device is not set in supplied data from parent
    MFD device.

    The MFD device creates only platform data (from Device Tree) for itself,
    not for haptic child.

    Unable to handle kernel NULL pointer dereference at virtual address 0000009c
    pgd = c0004000
    	[0000009c] *pgd=00000000
    	Internal error: Oops: 5 [#1] PREEMPT SMP ARM
    	(max8997_haptic_probe) from [&lt;c03f9cec&gt;] (platform_drv_probe+0x4c/0xb0)
    	(platform_drv_probe) from [&lt;c03f8440&gt;] (driver_probe_device+0x214/0x2c0)
    	(driver_probe_device) from [&lt;c03f8598&gt;] (__driver_attach+0xac/0xb0)
    	(__driver_attach) from [&lt;c03f67ac&gt;] (bus_for_each_dev+0x68/0x9c)
    	(bus_for_each_dev) from [&lt;c03f7a38&gt;] (bus_add_driver+0x1a0/0x218)
    	(bus_add_driver) from [&lt;c03f8db0&gt;] (driver_register+0x78/0xf8)
    	(driver_register) from [&lt;c0101774&gt;] (do_one_initcall+0x90/0x1d8)
    	(do_one_initcall) from [&lt;c0a00dbc&gt;] (kernel_init_freeable+0x15c/0x1fc)
    	(kernel_init_freeable) from [&lt;c06bb5b4&gt;] (kernel_init+0x8/0x114)
    	(kernel_init) from [&lt;c0107938&gt;] (ret_from_fork+0x14/0x3c)

    Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
    Cc: &lt;stable@vger.kernel.org&gt;
    Fixes: 104594b01ce7 ("Input: add driver support for MAX8997-haptic")
    [k.kozlowski: Write commit message, add CC-stable]
    Signed-off-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
    Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 8613b37684fbca1f642b6e636b0dd8923fa0bfd9
Author: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Date:   Thu May 5 16:25:35 2016 -0400

    get_rock_ridge_filename(): handle malformed NM entries

    commit 99d825822eade8d827a1817357cbf3f889a552d6 upstream.

    Payloads of NM entries are not supposed to contain NUL.  When we run
    into such, only the part prior to the first NUL goes into the
    concatenation (i.e. the directory entry name being encoded by a bunch
    of NM entries).  We do stop when the amount collected so far + the
    claimed amount in the current NM entry exceed 254.  So far, so good,
    but what we return as the total length is the sum of *claimed*
    sizes, not the actual amount collected.  And that can grow pretty
    large - not unlimited, since you'd need to put CE entries in
    between to be able to get more than the maximum that could be
    contained in one isofs directory entry / continuation chunk and
    we are stop once we'd encountered 32 CEs, but you can get about 8Kb
    easily.  And that's what will be passed to readdir callback as the
    name length.  8Kb __copy_to_user() from a buffer allocated by
    __get_free_page()

    Cc: stable@vger.kernel.org # 0.98pl6+ (yes, really)
    Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit f220ec58d1e4f49cb6c761a859241c057844cdf2
Author: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Date:   Wed May 4 17:52:56 2016 +0800

    crypto: hash - Fix page length clamping in hash walk

    commit 13f4bb78cf6a312bbdec367ba3da044b09bf0e29 upstream.

    The crypto hash walk code is broken when supplied with an offset
    greater than or equal to PAGE_SIZE.  This patch fixes it by adjusting
    walk-&gt;pg and walk-&gt;offset when this happens.

    Cc: &lt;stable@vger.kernel.org&gt;
    Reported-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
    Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 73dd3ac10bf81213a89538654aa005be6432e52d
Author: Anton Blanchard &lt;anton@samba.org&gt;
Date:   Fri Apr 15 12:06:13 2016 +1000

    powerpc: scan_features() updates incorrect bits for REAL_LE

    commit 6997e57d693b07289694239e52a10d2f02c3a46f upstream.

    The REAL_LE feature entry in the ibm_pa_feature struct is missing an MMU
    feature value, meaning all the remaining elements initialise the wrong
    values.

    This means instead of checking for byte 5, bit 0, we check for byte 0,
    bit 0, and then we incorrectly set the CPU feature bit as well as MMU
    feature bit 1 and CPU user feature bits 0 and 2 (5).

    Checking byte 0 bit 0 (IBM numbering), means we're looking at the
    "Memory Management Unit (MMU)" feature - ie. does the CPU have an MMU.
    In practice that bit is set on all platforms which have the property.

    This means we set CPU_FTR_REAL_LE always. In practice that seems not to
    matter because all the modern cpus which have this property also
    implement REAL_LE, and we've never needed to disable it.

    We're also incorrectly setting MMU feature bit 1, which is:

      #define MMU_FTR_TYPE_8xx		0x00000002

    Luckily the only place that looks for MMU_FTR_TYPE_8xx is in Book3E
    code, which can't run on the same cpus as scan_features(). So this also
    doesn't matter in practice.

    Finally in the CPU user feature mask, we're setting bits 0 and 2. Bit 2
    is not currently used, and bit 0 is:

      #define PPC_FEATURE_PPC_LE		0x00000001

    Which says the CPU supports the old style "PPC Little Endian" mode.
    Again this should be harmless in practice as no 64-bit CPUs implement
    that mode.

    Fix the code by adding the missing initialisation of the MMU feature.

    Also add a comment marking CPU user feature bit 2 (0x4) as reserved. It
    would be unsafe to start using it as old kernels incorrectly set it.

    Fixes: 44ae3ab3358e ("powerpc: Free up some CPU feature bits by moving out MMU-related features")
    Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
    [mpe: Flesh out changelog, add comment reserving 0x4]
    Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit d7b49e545800e7ccf5b566d22d9f6572eaa0fbb3
Author: Andrey Gelman &lt;andrey.gelman@compulab.co.il&gt;
Date:   Tue Oct 6 15:43:43 2015 -0700

    Input: ads7846 - correct the value got from SPI

    commit 879f2fea8a5a748bcbf98d2cdce9139c045505d3 upstream.

    According to the touch controller spec, SPI return a 16 bit value, only 12
    bits are valid, they are bit[14-3].

    The value of MISO and MOSI can be configured when SPI is in idle mode.
    Currently this touch driver assumes the SPI bus sets the MOSI and MISO in
    low level when SPI bus is in idle mode. So the bit[15] of the value got
    from SPI bus is always 0. But when SPI bus congfigures the MOSI and MISO in
    high level during the SPI idle mode, the bit[15] of the value get from SPI
    is always 1. If bit[15] is not masked, we may get the wrong value.

    Mask the invalid bit to make sure the correct value gets returned.
    Regardless of the SPI bus idle configuration.

    Signed-off-by: Andrey Gelman &lt;andrey.gelman@compulab.co.il&gt;
    Signed-off-by: Haibo Chen &lt;haibo.chen@freescale.com&gt;
    Signed-off-by: Igor Grinberg &lt;grinberg@compulab.co.il&gt;
    Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 5e1a1e7fca96f0cd8129bac3dd605cc7cd86fd50
Author: Jasem Mutlaq &lt;mutlaqja@ikarustech.com&gt;
Date:   Tue Apr 19 10:38:27 2016 +0300

    USB: serial: cp210x: add Straizona Focusers device ids

    commit 613ac23a46e10d4d4339febdd534fafadd68e059 upstream.

    Adding VID:PID for Straizona Focusers to cp210x driver.

    Signed-off-by: Jasem Mutlaq &lt;mutlaqja@ikarustech.com&gt;
    Cc: stable &lt;stable@vger.kernel.org&gt;
    Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 15e27ea97ae7d9833e55e5937a4ecfa4a5dbf81f
Author: Mike Manning &lt;michael@bsch.com.au&gt;
Date:   Mon Apr 18 12:13:23 2016 +0000

    USB: serial: cp210x: add ID for Link ECU

    commit 1d377f4d690637a0121eac8701f84a0aa1e69a69 upstream.

    The Link ECU is an aftermarket ECU computer for vehicles that provides
    full tuning abilities as well as datalogging and displaying capabilities
    via the USB to Serial adapter built into the device.

    Signed-off-by: Mike Manning &lt;michael@bsch.com.au&gt;
    Cc: stable &lt;stable@vger.kernel.org&gt;
    Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 505a7a684b7071972c565488f6d1f9b8835c0dbd
Author: Prarit Bhargava &lt;prarit@redhat.com&gt;
Date:   Wed May 4 13:48:56 2016 +0800

    ACPICA: Dispatcher: Update thread ID for recursive method calls

    commit 93d68841a23a5779cef6fb9aa0ef32e7c5bd00da upstream.

    ACPICA commit 7a3bd2d962f221809f25ddb826c9e551b916eb25

    Set the mutex owner thread ID.
    Original patch from: Prarit Bhargava &lt;prarit@redhat.com&gt;

    Link: https://bugzilla.kernel.org/show_bug.cgi?id=115121
    Link: https://github.com/acpica/acpica/commit/7a3bd2d9
    Signed-off-by: Prarit Bhargava &lt;prarit@redhat.com&gt;
    Tested-by: Andy Lutomirski &lt;luto@kernel.org&gt; # On a Dell XPS 13 9350
    Signed-off-by: Bob Moore &lt;robert.moore@intel.com&gt;
    Signed-off-by: Lv Zheng &lt;lv.zheng@intel.com&gt;
    Cc: All applicable &lt;stable@vger.kernel.org&gt;
    Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit cd275e9ade6b4954c7954f0c4e7ab2a1f4c3522c
Author: Matt Fleming &lt;matt@codeblueprint.co.uk&gt;
Date:   Tue May 3 20:29:39 2016 +0100

    MAINTAINERS: Remove asterisk from EFI directory names

    commit e8dfe6d8f6762d515fcd4f30577f7bfcf7659887 upstream.

    Mark reported that having asterisks on the end of directory names
    confuses get_maintainer.pl when it encounters subdirectories, and that
    my name does not appear when run on drivers/firmware/efi/libstub.

    Reported-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
    Signed-off-by: Matt Fleming &lt;matt@codeblueprint.co.uk&gt;
    Cc: &lt;stable@vger.kernel.org&gt;
    Cc: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
    Cc: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
    Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
    Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
    Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/1462303781-8686-2-git-send-email-matt@codeblueprint.co.uk
    Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit e712c5d602274d15e8e23da16ba9a9acfc8fc181
Author: Linus Lüssing &lt;linus.luessing@c0d3.blue&gt;
Date:   Fri Mar 11 14:04:49 2016 +0100

    batman-adv: Fix broadcast/ogm queue limit on a removed interface

    commit c4fdb6cff2aa0ae740c5f19b6f745cbbe786d42f upstream.

    When removing a single interface while a broadcast or ogm packet is
    still pending then we will free the forward packet without releasing the
    queue slots again.

    This patch is supposed to fix this issue.

    Fixes: 6d5808d4ae1b ("batman-adv: Add missing hardif_free_ref in forw_packet_free")
    Signed-off-by: Linus Lüssing &lt;linus.luessing@c0d3.blue&gt;
    [sven@narfation.org: fix conflicts with current version]
    Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
    Signed-off-by: Marek Lindner &lt;mareklindner@neomailbox.ch&gt;
    Signed-off-by: Antonio Quartulli &lt;a@unstable.cc&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 5210e2409a2350a9cdf1871bddc1b3e94879f017
Author: Mathias Krause &lt;minipli@googlemail.com&gt;
Date:   Thu May 5 16:22:26 2016 -0700

    proc: prevent accessing /proc/&lt;PID&gt;/environ until it's ready

    commit 8148a73c9901a8794a50f950083c00ccf97d43b3 upstream.

    If /proc/&lt;PID&gt;/environ gets read before the envp[] array is fully set up
    in create_{aout,elf,elf_fdpic,flat}_tables(), we might end up trying to
    read more bytes than are actually written, as env_start will already be
    set but env_end will still be zero, making the range calculation
    underflow, allowing to read beyond the end of what has been written.

    Fix this as it is done for /proc/&lt;PID&gt;/cmdline by testing env_end for
    zero.  It is, apparently, intentionally set last in create_*_tables().

    This bug was found by the PaX size_overflow plugin that detected the
    arithmetic underflow of 'this_len = env_end - (env_start + src)' when
    env_end is still zero.

    The expected consequence is that userland trying to access
    /proc/&lt;PID&gt;/environ of a not yet fully set up process may get
    inconsistent data as we're in the middle of copying in the environment
    variables.

    Fixes: https://forums.grsecurity.net/viewtopic.php?f=3&amp;t=4363
    Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=116461
    Signed-off-by: Mathias Krause &lt;minipli@googlemail.com&gt;
    Cc: Emese Revfy &lt;re.emese@gmail.com&gt;
    Cc: Pax Team &lt;pageexec@freemail.hu&gt;
    Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
    Cc: Mateusz Guzik &lt;mguzik@redhat.com&gt;
    Cc: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
    Cc: Cyrill Gorcunov &lt;gorcunov@openvz.org&gt;
    Cc: Jarod Wilson &lt;jarod@redhat.com&gt;
    Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
    Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 7b640feea9d2e050c381d878db14748cb9005635
Author: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Date:   Wed Apr 20 13:34:31 2016 +0000

    ARM: SoCFPGA: Fix secondary CPU startup in thumb2 kernel

    commit 5616f36713ea77f57ae908bf2fef641364403c9f upstream.

    The secondary CPU starts up in ARM mode. When the kernel is compiled in
    thumb2 mode we have to explicitly compile the secondary startup
    trampoline in ARM mode, otherwise the CPU will go to Nirvana.

    Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
    Reported-by: Steffen Trumtrar &lt;s.trumtrar@pengutronix.de&gt;
    Suggested-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
    Signed-off-by: Dinh Nguyen &lt;dinguyen@opensource.altera.com&gt;
    Signed-off-by: Kevin Hilman &lt;khilman@baylibre.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 834f5956da4a7cd908821ffe585fab49a00acaed
Author: Arnd Bergmann &lt;arnd@arndb.de&gt;
Date:   Mon Mar 14 15:29:44 2016 +0100

    lpfc: fix misleading indentation

    commit aeb6641f8ebdd61939f462a8255b316f9bfab707 upstream.

    gcc-6 complains about the indentation of the lpfc_destroy_vport_work_array()
    call in lpfc_online(), which clearly doesn't look right:

    drivers/scsi/lpfc/lpfc_init.c: In function 'lpfc_online':
    drivers/scsi/lpfc/lpfc_init.c:2880:3: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation]
       lpfc_destroy_vport_work_array(phba, vports);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/scsi/lpfc/lpfc_init.c:2863:2: note: ...this 'if' clause, but it is not
      if (vports != NULL)
      ^~

    Looking at the patch that introduced this code, it's clear that the
    behavior is correct and the indentation is wrong.

    This fixes the indentation and adds curly braces around the previous
    if() block for clarity, as that is most likely what caused the code
    to be misindented in the first place.

    Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
    Fixes: 549e55cd2a1b ("[SCSI] lpfc 8.2.2 : Fix locking around HBA's port_list")
    Reviewed-by: Sebastian Herbszt &lt;herbszt@gmx.de&gt;
    Reviewed-by: Hannes Reinecke &lt;hare@suse.com&gt;
    Reviewed-by: Ewan D. Milne &lt;emilne@redhat.com&gt;
    Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit d3605b9c39cffb3cd67176083dc014696c29198c
Author: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Date:   Wed Feb 24 09:39:11 2016 +0100

    clk: versatile: sp810: support reentrance

    commit ec7957a6aa0aaf981fb8356dc47a2cdd01cde03c upstream.

    Despite care take to allocate clocks state containers the
    SP810 driver actually just supports creating one instance:
    all clocks registered for every instance will end up with the
    exact same name and __clk_init() will fail.

    Rename the timclken&lt;0&gt; .. timclken&lt;n&gt; to sp810_&lt;instance&gt;_&lt;n&gt;
    so every clock on every instance gets a unique name.

    This is necessary for the RealView PBA8 which has two SP810
    blocks: the second block will not register its clocks unless
    every clock on every instance is unique and results in boot
    logs like this:

    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 0 at ../drivers/clk/versatile/clk-sp810.c:137
      clk_sp810_of_setup+0x110/0x154()
    Modules linked in:
    CPU: 0 PID: 0 Comm: swapper/0 Not tainted
    4.5.0-rc2-00030-g352718fc39f6-dirty #225
    Hardware name: ARM RealView Machine (Device Tree Support)
    [&lt;c00167f8&gt;] (unwind_backtrace) from [&lt;c0013204&gt;]
                 (show_stack+0x10/0x14)
    [&lt;c0013204&gt;] (show_stack) from [&lt;c01a049c&gt;]
                 (dump_stack+0x84/0x9c)
    [&lt;c01a049c&gt;] (dump_stack) from [&lt;c0024990&gt;]
                 (warn_slowpath_common+0x74/0xb0)
    [&lt;c0024990&gt;] (warn_slowpath_common) from [&lt;c0024a68&gt;]
                 (warn_slowpath_null+0x1c/0x24)
    [&lt;c0024a68&gt;] (warn_slowpath_null) from [&lt;c051eb44&gt;]
                 (clk_sp810_of_setup+0x110/0x154)
    [&lt;c051eb44&gt;] (clk_sp810_of_setup) from [&lt;c051e3a4&gt;]
                 (of_clk_init+0x12c/0x1c8)
    [&lt;c051e3a4&gt;] (of_clk_init) from [&lt;c0504714&gt;]
                 (time_init+0x20/0x2c)
    [&lt;c0504714&gt;] (time_init) from [&lt;c0501b18&gt;]
                 (start_kernel+0x244/0x3c4)
    [&lt;c0501b18&gt;] (start_kernel) from [&lt;7000807c&gt;] (0x7000807c)
    ---[ end trace cb88537fdc8fa200 ]---

    Cc: Michael Turquette &lt;mturquette@baylibre.com&gt;
    Cc: Pawel Moll &lt;pawel.moll@arm.com&gt;
    Fixes: 6e973d2c4385 "clk: vexpress: Add separate SP810 driver"
    Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
    Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit f95bba828ffd675687395eef4e46894a6fd01594
Author: Dan Streetman &lt;dan.streetman@canonical.com&gt;
Date:   Thu Jan 14 13:42:32 2016 -0500

    nbd: ratelimit error msgs after socket close

    commit da6ccaaa79caca4f38b540b651238f87215217a2 upstream.

    Make the "Attempted send on closed socket" error messages generated in
    nbd_request_handler() ratelimited.

    When the nbd socket is shutdown, the nbd_request_handler() function emits
    an error message for every request remaining in its queue.  If the queue
    is large, this will spam a large amount of messages to the log.  There's
    no need for a separate error message for each request, so this patch
    ratelimits it.

    In the specific case this was found, the system was virtual and the error
    messages were logged to the serial port, which overwhelmed it.

    Fixes: 4d48a542b427 ("nbd: fix I/O hang on disconnected nbds")
    Signed-off-by: Dan Streetman &lt;dan.streetman@canonical.com&gt;
    Signed-off-by: Markus Pargmann &lt;mpa@pengutronix.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 049c18dabc8fa79b5b55cf78d615a93f2ccd97f0
Author: Marco Angaroni &lt;marcoangaroni@gmail.com&gt;
Date:   Sat Mar 5 12:10:02 2016 +0100

    ipvs: correct initial offset of Call-ID header search in SIP persistence engine

    commit 7617a24f83b5d67f4dab1844956be1cebc44aec8 upstream.

    The IPVS SIP persistence engine is not able to parse the SIP header
    "Call-ID" when such header is inserted in the first positions of
    the SIP message.

    When IPVS is configured with "--pe sip" option, like for example:
    ipvsadm -A -u 1.2.3.4:5060 -s rr --pe sip -p 120 -o
    some particular messages (see below for details) do not create entries
    in the connection template table, which can be listed with:
    ipvsadm -Lcn --persistent-conn

    Problematic SIP messages are SIP responses having "Call-ID" header
    positioned just after message first line:
    SIP/2.0 200 OK
    [Call-ID header here]
    [rest of the headers]

    When "Call-ID" header is positioned down (after a few other headers)
    it is correctly recognized.

    This is due to the data offset used in get_callid function call inside
    ip_vs_pe_sip.c file: since dptr already points to the start of the
    SIP message, the value of dataoff should be initially 0.
    Otherwise the header is searched starting from some bytes after the
    first character of the SIP message.

    Fixes: 758ff0338722 ("IPVS: sip persistence engine")
    Signed-off-by: Marco Angaroni &lt;marcoangaroni@gmail.com&gt;
    Acked-by: Julian Anastasov &lt;ja@ssi.bg&gt;
    Signed-off-by: Simon Horman &lt;horms@verge.net.au&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 5d814ad8d35e5e23e0c27fb0f0b80c1044ecefad
Author: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Date:   Thu Mar 31 09:38:51 2016 +0200

    compiler-gcc: disable -ftracer for __noclone functions

    commit 95272c29378ee7dc15f43fa2758cb28a5913a06d upstream.

    -ftracer can duplicate asm blocks causing compilation to fail in
    noclone functions.  For example, KVM declares a global variable
    in an asm like

        asm("2: ... \n
             .pushsection data \n
             .global vmx_return \n
             vmx_return: .long 2b");

    and -ftracer causes a double declaration.

    Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
    Cc: Michal Marek &lt;mmarek@suse.cz&gt;
    Cc: stable@vger.kernel.org
    Cc: kvm@vger.kernel.org
    Reported-by: Linda Walsh &lt;lkml@tlinx.org&gt;
    Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 26898db604e006918cead820ee8f897e09f37ca9
Author: Pali Rohár &lt;pali.rohar@gmail.com&gt;
Date:   Fri Feb 19 10:35:39 2016 -0800

    ARM: OMAP3: Add cpuidle parameters table for omap3430

    commit 98f42221501353067251fbf11e732707dbb68ce3 upstream.

    Based on CPU type choose generic omap3 or omap3430 specific cpuidle
    parameters. Parameters for omap3430 were measured on Nokia N900 device and
    added by commit 5a1b1d3a9efa ("OMAP3: RX-51: Pass cpu idle parameters")
    which were later removed by commit 231900afba52 ("ARM: OMAP3: cpuidle -
    remove rx51 cpuidle parameters table") due to huge code complexity.

    This patch brings cpuidle parameters for omap3430 devices again, but uses
    simple condition based on CPU type.

    Fixes: 231900afba52 ("ARM: OMAP3: cpuidle - remove rx51 cpuidle
    parameters table")
    Signed-off-by: Pali Rohár &lt;pali.rohar@gmail.com&gt;
    Acked-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
    Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit ab306782a133bc5274a357f7f25488375b04b201
Author: Borislav Petkov &lt;bp@suse.de&gt;
Date:   Mon Mar 7 16:44:44 2016 -0300

    perf stat: Document --detailed option

    commit f594bae08183fb6b57db55387794ece3e1edf6f6 upstream.

    I'm surprised this remained undocumented since at least 2011. And it is
    actually a very useful switch, as Steve and I came to realize recently.

    Add the text from

      2cba3ffb9a9d ("perf stat: Add -d -d and -d -d -d options to show more CPU events")

    which added the incrementing aspect to -d.

    Tested-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
    Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
    Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
    Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
    Cc: David Ahern &lt;dsahern@gmail.com&gt;
    Cc: Davidlohr Bueso &lt;dbueso@suse.com&gt;
    Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
    Cc: Mel Gorman &lt;mgorman@suse.com&gt;
    Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
    Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
    Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
    Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
    Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
    Fixes: 2cba3ffb9a9d ("perf stat: Add -d -d and -d -d -d options to show more CPU events")
    Link: http://lkml.kernel.org/r/1457347294-32546-1-git-send-email-bp@alien8.de
    Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 70415182b66cc3ca0167d989a7f40d5c437c4c0b
Author: Vitaly Kuznetsov &lt;vkuznets@redhat.com&gt;
Date:   Fri Feb 27 11:25:51 2015 -0800

    Drivers: hv: vmbus: prevent cpu offlining on newer hypervisors

    commit e513229b4c386e6c9f66298c13fde92f73e6e1ac upstream.

    When an SMP Hyper-V guest is running on top of 2012R2 Server and secondary
    cpus are sent offline (with echo 0 &gt; /sys/devices/system/cpu/cpu$cpu/online)
    the system freeze is observed. This happens due to the fact that on newer
    hypervisors (Win8, WS2012R2, ...) vmbus channel handlers are distributed
    across all cpus (see init_vp_index() function in drivers/hv/channel_mgmt.c)
    and on cpu offlining nobody reassigns them to CPU0. Prevent cpu offlining
    when vmbus is loaded until the issue is fixed host-side.

    This patch also disables hibernation but it is OK as it is also broken (MCE
    error is hit on resume). Suspend still works.

    Tested with WS2008R2 and WS2012R2.

    Signed-off-by: Vitaly Kuznetsov &lt;vkuznets@redhat.com&gt;
    Signed-off-by: K. Y. Srinivasan &lt;kys@microsoft.com&gt;
    [ 3chas3@gmail.com: rebase to 3.14-stable ]
    Signed-off-by: Chas Williams &lt;3chas3@gmail.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit df1da5a5477cc4fb1e8fa330851b0ad78255bfd4
Author: Vasily Kulikov &lt;segoon@openwall.com&gt;
Date:   Wed Sep 9 15:36:00 2015 -0700

    include/linux/poison.h: fix LIST_POISON{1,2} offset

    commit 8a5e5e02fc83aaf67053ab53b359af08c6c49aaf upstream.

    Poison pointer values should be small enough to find a room in
    non-mmap'able/hardly-mmap'able space.  E.g.  on x86 "poison pointer space"
    is located starting from 0x0.  Given unprivileged users cannot mmap
    anything below mmap_min_addr, it should be safe to use poison pointers
    lower than mmap_min_addr.

    The current poison pointer values of LIST_POISON{1,2} might be too big for
    mmap_min_addr values equal or less than 1 MB (common case, e.g.  Ubuntu
    uses only 0x10000).  There is little point to use such a big value given
    the "poison pointer space" below 1 MB is not yet exhausted.  Changing it
    to a smaller value solves the problem for small mmap_min_addr setups.

    The values are suggested by Solar Designer:
    http://www.openwall.com/lists/oss-security/2015/05/02/6

    Signed-off-by: Vasily Kulikov &lt;segoon@openwall.com&gt;
    Cc: Solar Designer &lt;solar@openwall.com&gt;
    Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
    Cc: "Kirill A. Shutemov" &lt;kirill.shutemov@linux.intel.com&gt;
    Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
    Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 310c45d174f51fd2087aeff2676e01bdbc0e4d34
Author: Michael Hennerich &lt;michael.hennerich@analog.com&gt;
Date:   Mon Feb 22 10:20:24 2016 +0100

    drivers/misc/ad525x_dpot: AD5274 fix RDAC read back errors

    commit f3df53e4d70b5736368a8fe8aa1bb70c1cb1f577 upstream.

    Fix RDAC read back errors caused by a typo. Value must shift by 2.

    Fixes: a4bd394956f2 ("drivers/misc/ad525x_dpot.c: new features")
    Signed-off-by: Michael Hennerich &lt;michael.hennerich@analog.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit e35d98315485e10cf3865e0495ec7d1e0d3a3379
Author: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Date:   Tue Mar 1 09:50:01 2016 +0100

    rtc: vr41xx: Wire up alarm_irq_enable

    commit a25f4a95ec3cded34c1250364eba704c5e4fdac4 upstream.

    drivers/rtc/rtc-vr41xx.c:229: warning: âvr41xx_rtc_alarm_irq_enableâ defined but not used

    Apparently the conversion to alarm_irq_enable forgot to wire up the
    callback.

    Fixes: 16380c153a69c378 ("RTC: Convert rtc drivers to use the alarm_irq_enable method")
    Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
    Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 8e806835e276d42158f7e0d1c3405127a24926c2
Author: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Date:   Mon Dec 14 14:29:23 2015 +0000

    misc/bmp085: Enable building as a module

    commit 50e6315dba721cbc24ccd6d7b299f1782f210a98 upstream.

    Commit 985087dbcb02 'misc: add support for bmp18x chips to the bmp085
    driver' changed the BMP085 config symbol to a boolean.  I see no
    reason why the shared code cannot be built as a module, so change it
    back to tristate.

    Fixes: 985087dbcb02 ("misc: add support for bmp18x chips to the bmp085 driver")
    Cc: Eric Andersson &lt;eric.andersson@unixphere.com&gt;
    Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
    Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 78d64c695eed7a7266de28f2796b2301bd34d02c
Author: Sushaanth Srirangapathi &lt;sushaanth.s@ti.com&gt;
Date:   Mon Feb 29 18:42:19 2016 +0530

    fbdev: da8xx-fb: fix videomodes of lcd panels

    commit 713fced8d10fa1c759c8fb6bf9aaa681bae68cad upstream.

    Commit 028cd86b794f4a ("video: da8xx-fb: fix the polarities of the
    hsync/vsync pulse") fixes polarities of HSYNC/VSYNC pulse but
    forgot to update known_lcd_panels[] which had sync values
    according to old logic. This breaks LCD at least on DA850 EVM.

    This patch fixes this issue and I have tested this for panel
    "Sharp_LK043T1DG01" using DA850 EVM board.

    Fixes: 028cd86b794f4a ("video: da8xx-fb: fix the polarities of the hsync/vsync pulse")
    Signed-off-by: Sushaanth Srirangapathi &lt;sushaanth.s@ti.com&gt;
    Signed-off-by: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 226a8ce3d88baef6a8160edf2d61826e15055d9b
Author: Arnd Bergmann &lt;arnd@arndb.de&gt;
Date:   Tue Mar 15 14:53:29 2016 -0700

    paride: make 'verbose' parameter an 'int' again

    commit dec63a4dec2d6d01346fd5d96062e67c0636852b upstream.

    gcc-6.0 found an ancient bug in the paride driver, which had a
    "module_param(verbose, bool, 0);" since before 2.6.12, but actually uses
    it to accept '0', '1' or '2' as arguments:

      drivers/block/paride/pd.c: In function 'pd_init_dev_parms':
      drivers/block/paride/pd.c:298:29: warning: comparison of constant '1' with boolean expression is always false [-Wbool-compare]
       #define DBMSG(msg) ((verbose&gt;1)?(msg):NULL)

    In 2012, Rusty did a cleanup patch that also changed the type of the
    variable to 'bool', which introduced what is now a gcc warning.

    This changes the type back to 'int' and adapts the module_param() line
    instead, so it should work as documented in case anyone ever cares about
    running the ancient driver with debugging.

    Fixes: 90ab5ee94171 ("module_param: make bool parameters really bool (drivers &amp; misc)")
    Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
    Rusty Russell &lt;rusty@rustcorp.com.au&gt;
    Cc: Tim Waugh &lt;tim@cyberelk.net&gt;
    Cc: Sudip Mukherjee &lt;sudipm.mukherjee@gmail.com&gt;
    Cc: Jens Axboe &lt;axboe@fb.com&gt;
    Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
    Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 378175d0ac887f3fb4b8644152f05ccccff7e8d2
Author: Ignat Korchagin &lt;ignat.korchagin@gmail.com&gt;
Date:   Thu Mar 17 18:00:29 2016 +0000

    USB: usbip: fix potential out-of-bounds write

    commit b348d7dddb6c4fbfc810b7a0626e8ec9e29f7cbb upstream.

    Fix potential out-of-bounds write to urb-&gt;transfer_buffer
    usbip handles network communication directly in the kernel. When receiving a
    packet from its peer, usbip code parses headers according to protocol. As
    part of this parsing urb-&gt;actual_length is filled. Since the input for
    urb-&gt;actual_length comes from the network, it should be treated as untrusted.
    Any entity controlling the network may put any value in the input and the
    preallocated urb-&gt;transfer_buffer may not be large enough to hold the data.
    Thus, the malicious entity is able to write arbitrary data to kernel memory.

    Signed-off-by: Ignat Korchagin &lt;ignat.korchagin@gmail.com&gt;
    Cc: Sasha Levin &lt;sasha.levin@oracle.com&gt;
    Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 8a872b18df6f08c45ec89d55826ba08cd39756c3
Author: Roman Pen &lt;roman.penyaev@profitbricks.com&gt;
Date:   Tue Apr 26 13:15:35 2016 +0200

    workqueue: fix ghost PENDING flag while doing MQ IO

    commit 346c09f80459a3ad97df1816d6d606169a51001a upstream.

    The bug in a workqueue leads to a stalled IO request in MQ ctx-&gt;rq_list
    with the following backtrace:

    [  601.347452] INFO: task kworker/u129:5:1636 blocked for more than 120 seconds.
    [  601.347574]       Tainted: G           O    4.4.5-1-storage+ #6
    [  601.347651] "echo 0 &gt; /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [  601.348142] kworker/u129:5  D ffff880803077988     0  1636      2 0x00000000
    [  601.348519] Workqueue: ibnbd_server_fileio_wq ibnbd_dev_file_submit_io_worker [ibnbd_server]
    [  601.348999]  ffff880803077988 ffff88080466b900 ffff8808033f9c80 ffff880803078000
    [  601.349662]  ffff880807c95000 7fffffffffffffff ffffffff815b0920 ffff880803077ad0
    [  601.350333]  ffff8808030779a0 ffffffff815b01d5 0000000000000000 ffff880803077a38
    [  601.350965] Call Trace:
    [  601.351203]  [&lt;ffffffff815b0920&gt;] ? bit_wait+0x60/0x60
    [  601.351444]  [&lt;ffffffff815b01d5&gt;] schedule+0x35/0x80
    [  601.351709]  [&lt;ffffffff815b2dd2&gt;] schedule_timeout+0x192/0x230
    [  601.351958]  [&lt;ffffffff812d43f7&gt;] ? blk_flush_plug_list+0xc7/0x220
    [  601.352208]  [&lt;ffffffff810bd737&gt;] ? ktime_get+0x37/0xa0
    [  601.352446]  [&lt;ffffffff815b0920&gt;] ? bit_wait+0x60/0x60
    [  601.352688]  [&lt;ffffffff815af784&gt;] io_schedule_timeout+0xa4/0x110
    [  601.352951]  [&lt;ffffffff815b3a4e&gt;] ? _raw_spin_unlock_irqrestore+0xe/0x10
    [  601.353196]  [&lt;ffffffff815b093b&gt;] bit_wait_io+0x1b/0x70
    [  601.353440]  [&lt;ffffffff815b056d&gt;] __wait_on_bit+0x5d/0x90
    [  601.353689]  [&lt;ffffffff81127bd0&gt;] wait_on_page_bit+0xc0/0xd0
    [  601.353958]  [&lt;ffffffff81096db0&gt;] ? autoremove_wake_function+0x40/0x40
    [  601.354200]  [&lt;ffffffff81127cc4&gt;] __filemap_fdatawait_range+0xe4/0x140
    [  601.354441]  [&lt;ffffffff81127d34&gt;] filemap_fdatawait_range+0x14/0x30
    [  601.354688]  [&lt;ffffffff81129a9f&gt;] filemap_write_and_wait_range+0x3f/0x70
    [  601.354932]  [&lt;ffffffff811ced3b&gt;] blkdev_fsync+0x1b/0x50
    [  601.355193]  [&lt;ffffffff811c82d9&gt;] vfs_fsync_range+0x49/0xa0
    [  601.355432]  [&lt;ffffffff811cf45a&gt;] blkdev_write_iter+0xca/0x100
    [  601.355679]  [&lt;ffffffff81197b1a&gt;] __vfs_write+0xaa/0xe0
    [  601.355925]  [&lt;ffffffff81198379&gt;] vfs_write+0xa9/0x1a0
    [  601.356164]  [&lt;ffffffff811c59d8&gt;] kernel_write+0x38/0x50

    The underlying device is a null_blk, with default parameters:

      queue_mode    = MQ
      submit_queues = 1

    Verification that nullb0 has something inflight:

    root@pserver8:~# cat /sys/block/nullb0/inflight
           0        1
    root@pserver8:~# find /sys/block/nullb0/mq/0/cpu* -name rq_list -print -exec cat {} \;
    ...
    /sys/block/nullb0/mq/0/cpu2/rq_list
    CTX pending:
            ffff8838038e2400
    ...

    During debug it became clear that stalled request is always inserted in
    the rq_list from the following path:

       save_stack_trace_tsk + 34
       blk_mq_insert_requests + 231
       blk_mq_flush_plug_list + 281
       blk_flush_plug_list + 199
       wait_on_page_bit + 192
       __filemap_fdatawait_range + 228
       filemap_fdatawait_range + 20
       filemap_write_and_wait_range + 63
       blkdev_fsync + 27
       vfs_fsync_range + 73
       blkdev_write_iter + 202
       __vfs_write + 170
       vfs_write + 169
       kernel_write + 56

    So blk_flush_plug_list() was called with from_schedule == true.

    If from_schedule is true, that means that finally blk_mq_insert_requests()
    offloads execution of __blk_mq_run_hw_queue() and uses kblockd workqueue,
    i.e. it calls kblockd_schedule_delayed_work_on().

    That means, that we race with another CPU, which is about to execute
    __blk_mq_run_hw_queue() work.

    Further debugging shows the following traces from different CPUs:

      CPU#0                                  CPU#1
      ----------------------------------     -------------------------------
      reqeust A inserted
      STORE hctx-&gt;ctx_map[0] bit marked
      kblockd_schedule...() returns 1
      &lt;schedule to kblockd workqueue&gt;
                                             request B inserted
                                             STORE hctx-&gt;ctx_map[1] bit marked
                                             kblockd_schedule...() returns 0
      *** WORK PENDING bit is cleared ***
      flush_busy_ctxs() is executed, but
      bit 1, set by CPU#1, is not observed

    As a result request B pended forever.

    This behaviour can be explained by speculative LOAD of hctx-&gt;ctx_map on
    CPU#0, which is reordered with clear of PENDING bit and executed _before_
    actual STORE of bit 1 on CPU#1.

    The proper fix is an explicit full barrier &lt;mfence&gt;, which guarantees
    that clear of PENDING bit is to be executed before all possible
    speculative LOADS or STORES inside actual work function.

    Signed-off-by: Roman Pen &lt;roman.penyaev@profitbricks.com&gt;
    Cc: Gioh Kim &lt;gi-oh.kim@profitbricks.com&gt;
    Cc: Michael Wang &lt;yun.wang@profitbricks.com&gt;
    Cc: Tejun Heo &lt;tj@kernel.org&gt;
    Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
    Cc: linux-block@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Cc: stable@vger.kernel.org
    Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit e2d8aa417e1466340ed75e421e44b36c0517eec0
Author: Laszlo Ersek &lt;lersek@redhat.com&gt;
Date:   Thu Apr 21 18:21:11 2016 +0200

    efi: Fix out-of-bounds read in variable_matches()

    commit 630ba0cc7a6dbafbdee43795617c872b35cde1b4 upstream.

    The variable_matches() function can currently read "var_name[len]", for
    example when:

     - var_name[0] == 'a',
     - len == 1
     - match_name points to the NUL-terminated string "ab".

    This function is supposed to accept "var_name" inputs that are not
    NUL-terminated (hence the "len" parameter"). Document the function, and
    access "var_name[*match]" only if "*match" is smaller than "len".

    Reported-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
    Signed-off-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
    Cc: Peter Jones &lt;pjones@redhat.com&gt;
    Cc: Matthew Garrett &lt;mjg59@coreos.com&gt;
    Cc: Jason Andryuk &lt;jandryuk@gmail.com&gt;
    Cc: Jani Nikula &lt;jani.nikula@linux.intel.com&gt;
    Cc: &lt;stable@vger.kernel.org&gt; # v3.10+
    Link: http://thread.gmane.org/gmane.comp.freedesktop.xorg.drivers.intel/86906
    Signed-off-by: Matt Fleming &lt;matt@codeblueprint.co.uk&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit fba8a3ecb46d3cdd96ee53711fb30580e42e42f2
Author: Arnd Bergmann &lt;arnd@arndb.de&gt;
Date:   Mon Jan 25 18:07:33 2016 +0100

    ASoC: s3c24xx: use const snd_soc_component_driver pointer

    commit ba4bc32eaa39ba7687f0958ae90eec94da613b46 upstream.

    An older patch to convert the API in the s3c i2s driver
    ended up passing a const pointer into a function that takes
    a non-const pointer, so we now get a warning:

    sound/soc/samsung/s3c2412-i2s.c: In function 's3c2412_iis_dev_probe':
    sound/soc/samsung/s3c2412-i2s.c:172:9: error: passing argument 3 of 's3c_i2sv2_register_component' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]

    However, the s3c_i2sv2_register_component() function again
    passes the pointer into another function taking a const, so
    we just need to change its prototype.

    Fixes: eca3b01d0885 ("ASoC: switch over to use snd_soc_register_component() on s3c i2s")
    Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
    Reviewed-by: Krzysztof Kozlowski &lt;k.kozlowski@samsung.com&gt;
    Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 8d418eb36789e23e9b5ed41648fb93c88a7c30fa
Author: Tony Luck &lt;tony.luck@intel.com&gt;
Date:   Fri Apr 29 15:42:25 2016 +0200

    EDAC: i7core, sb_edac: Don't return NOTIFY_BAD from mce_decoder callback

    commit c4fc1956fa31003bfbe4f597e359d751568e2954 upstream.

    Both of these drivers can return NOTIFY_BAD, but this terminates
    processing other callbacks that were registered later on the chain.
    Since the driver did nothing to log the error it seems wrong to prevent
    other interested parties from seeing it. E.g. neither of them had even
    bothered to check the type of the error to see if it was a memory error
    before the return NOTIFY_BAD.

    Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
    Acked-by: Aristeu Rozanski &lt;aris@redhat.com&gt;
    Acked-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
    Cc: linux-edac &lt;linux-edac@vger.kernel.org&gt;
    Cc: &lt;stable@vger.kernel.org&gt;
    Link: http://lkml.kernel.org/r/72937355dd92318d2630979666063f8a2853495b.1461864507.git.tony.luck@intel.com
    Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit faf35c269ae62e88b23e271682a18c6f0d5f83a0
Author: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Date:   Wed Apr 13 13:59:14 2016 +1000

    i2c: cpm: Fix build break due to incompatible pointer types

    commit 609d5a1b2b35bb62b4b3750396e55453160c2a17 upstream.

    Since commit ea8daa7b9784 ("kbuild: Add option to turn incompatible
    pointer check into error"), assignments from an incompatible pointer
    types have become a hard error, eg:

      drivers/i2c/busses/i2c-cpm.c:545:91: error: passing argument 3 of
      'dma_alloc_coherent' from incompatible pointer type

    Fix the build break by converting txdma &amp; rxdma to dma_addr_t.

    Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
    Signed-off-by: Wolfram Sang &lt;wsa@the-dreams.de&gt;
    Cc: stable@kernel.org
    Fixes: ea8daa7b9784
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit adaad9d866105bcb8f87293a0a675f573a39129d
Author: Vladis Dronov &lt;vdronov@redhat.com&gt;
Date:   Thu Mar 31 10:53:42 2016 -0700

    Input: gtco - fix crash on detecting device without endpoints

    commit 162f98dea487206d9ab79fc12ed64700667a894d upstream.

    The gtco driver expects at least one valid endpoint. If given malicious
    descriptors that specify 0 for the number of endpoints, it will crash in
    the probe function. Ensure there is at least one endpoint on the interface
    before using it.

    Also let's fix a minor coding style issue.

    The full correct report of this issue can be found in the public
    Red Hat Bugzilla:

    https://bugzilla.redhat.com/show_bug.cgi?id=1283385

    Reported-by: Ralf Spenneberg &lt;ralf@spenneberg.net&gt;
    Signed-off-by: Vladis Dronov &lt;vdronov@redhat.com&gt;
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 3af67b1b6b4d3dc6e05bdb76aa1a3d2c4f185630
Author: Dmitry Ivanov &lt;dmitrijs.ivanovs@ubnt.com&gt;
Date:   Wed Apr 6 17:23:18 2016 +0300

    nl80211: check netlink protocol in socket release notification

    commit 8f815cdde3e550e10c2736990d791f60c2ce43eb upstream.

    A non-privileged user can create a netlink socket with the same port_id as
    used by an existing open nl80211 netlink socket (e.g. as used by a hostapd
    process) with a different protocol number.

    Closing this socket will then lead to the notification going to nl80211's
    socket release notification handler, and possibly cause an action such as
    removing a virtual interface.

    Fix this issue by checking that the netlink protocol is NETLINK_GENERIC.
    Since generic netlink has no notifier chain of its own, we can't fix the
    problem more generically.

    Fixes: 026331c4d9b5 ("cfg80211/mac80211: allow registering for and sending action frames")
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Ivanov &lt;dima@ubnt.com&gt;
    [rewrite commit message]
    Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit b0b535780e3b4ddc29c76bafddf54d2c4f933322
Author: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Date:   Fri Mar 18 22:42:40 2016 +0800

    crypto: gcm - Fix rfc4543 decryption crash

    This bug has already bee fixed upstream since 4.2.  However, it
    was fixed during the AEAD conversion so no fix was backported to
    the older kernels.

    When we do an RFC 4543 decryption, we will end up writing the
    ICV beyond the end of the dst buffer.  This should lead to a
    crash but for some reason it was never noticed.

    This patch fixes it by only writing back the ICV for encryption.

    Fixes: d733ac90f9fe ("crypto: gcm - fix rfc4543 to handle async...")
    Reported-by: Patrick Meyer &lt;patrick.meyer@vasgard.com&gt;
    Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 7fbd6329c2f17ffcca4d846fac0ba2870ce7947b
Author: Robert Dobrowolski &lt;robert.dobrowolski@linux.intel.com&gt;
Date:   Thu Mar 24 03:30:07 2016 -0700

    usb: hcd: out of bounds access in for_each_companion

    commit e86103a75705c7c530768f4ffaba74cf382910f2 upstream.

    On BXT platform Host Controller and Device Controller figure as
    same PCI device but with different device function. HCD should
    not pass data to Device Controller but only to Host Controllers.
    Checking if companion device is Host Controller, otherwise skip.

    Cc: &lt;stable@vger.kernel.org&gt;
    Signed-off-by: Robert Dobrowolski &lt;robert.dobrowolski@linux.intel.com&gt;
    Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit e1d540872b9866c587a534815a482373bab8e8a8
Author: Lu Baolu &lt;baolu.lu@linux.intel.com&gt;
Date:   Fri Apr 8 16:25:09 2016 +0300

    usb: xhci: fix wild pointers in xhci_mem_cleanup

    commit 71504062a7c34838c3fccd92c447f399d3cb5797 upstream.

    This patch fixes some wild pointers produced by xhci_mem_cleanup.
    These wild pointers will cause system crash if xhci_mem_cleanup()
    is called twice.

    Reported-and-tested-by: Pengcheng Li &lt;lpc.li@hisilicon.com&gt;
    Signed-off-by: Lu Baolu &lt;baolu.lu@linux.intel.com&gt;
    Signed-off-by: Mathias Nyman &lt;mathias.nyman@linux.intel.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    [wt: struct xhci_hcd has no ext_caps members in 3.10 ]

    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 87e4617a54ff86b928872749aa584c449c3da55c
Author: Vladis Dronov &lt;vdronov@redhat.com&gt;
Date:   Mon Nov 16 15:55:11 2015 -0200

    usbvision: fix crash on detecting device with invalid configuration

    commit fa52bd506f274b7619955917abfde355e3d19ffe upstream.

    The usbvision driver crashes when a specially crafted usb device with invalid
    number of interfaces or endpoints is detected. This fix adds checks that the
    device has proper configuration expected by the driver.

    Reported-by: Ralf Spenneberg &lt;ralf@spenneberg.net&gt;
    Signed-off-by: Vladis Dronov &lt;vdronov@redhat.com&gt;
    Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit c5b5d09d9bb003bac7747b2c41d0f4454e98b684
Author: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
Date:   Fri Mar 27 19:39:09 2015 -0300

    usbvision: fix leak of usb_dev on failure paths in usbvision_probe()

    commit afd270d1a45043cef14341bcceff62ed50e8dc9a upstream.

    There is no usb_put_dev() on failure paths in usbvision_probe().

    Found by Linux Driver Verification project (linuxtesting.org).

    Signed-off-by: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
    Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
    Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 6645b8275f9de0704892dff783da45eeb85a1ae9
Author: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
Date:   Mon Jun 10 17:32:29 2013 -0300

    usbvision-video: fix memory leak of alt_max_pkt_size

    commit 090c65b694c362adb19ec9c27de216a808ee443c upstream.

    1. usbvision-&gt;alt_max_pkt_size is not deallocated anywhere.
    2. if allocation of usbvision-&gt;alt_max_pkt_size fails,
    there is no proper deallocation of already acquired resources.
    The patch adds kfree(usbvision-&gt;alt_max_pkt_size) to
    usbvision_release() as soon as other deallocations happen there.
    It calls usbvision_release() if allocation of
    usbvision-&gt;alt_max_pkt_size fails as soon as usbvision_release()
    is safe to work with incompletely initialized usbvision structure.
    Found by Linux Driver Verification project (linuxtesting.org).

    Signed-off-by: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
    Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
    Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@redhat.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit f839050dd43e02821a6a06c4a4ea35e283ccf925
Author: Nicolai Hähnle &lt;nicolai.haehnle@amd.com&gt;
Date:   Tue Mar 15 12:56:45 2016 -0500

    drm/radeon: hold reference to fences in radeon_sa_bo_new (3.17 and older)

    [Backport of upstream commit f6ff4f67cdf8455d0a4226eeeaf5af17c37d05eb, with
     an additional NULL pointer guard that is required for kernels 3.17 and older.

     To be precise, any kernel that does *not* have commit 954605ca3 "drm/radeon:
     use common fence implementation for fences, v4" requires this additional
     NULL pointer guard.]

    An arbitrary amount of time can pass between spin_unlock and
    radeon_fence_wait_any, so we need to ensure that nobody frees the
    fences from under us.

    Based on the analogous fix for amdgpu.

    Signed-off-by: Nicolai Hähnle &lt;nicolai.haehnle@amd.com&gt;
    Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt; (v1 + fix)
    Tested-by: Lutz Euler &lt;lutz.euler@freenet.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 7ed849b98b4504fe56d3c9493eaed5b562422d09
Author: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Date:   Wed Mar 23 12:17:09 2016 -0400

    HID: usbhid: fix inconsistent reset/resume/reset-resume behavior

    commit 972e6a993f278b416a8ee3ec65475724fc36feb2 upstream.

    The usbhid driver has inconsistently duplicated code in its post-reset,
    resume, and reset-resume pathways.

    	reset-resume doesn't check HID_STARTED before trying to
    	restart the I/O queues.

    	resume fails to clear the HID_SUSPENDED flag if HID_STARTED
    	isn't set.

    	resume calls usbhid_restart_queues() with usbhid-&gt;lock held
    	and the others call it without holding the lock.

    The first item in particular causes a problem following a reset-resume
    if the driver hasn't started up its I/O.  URB submission fails because
    usbhid-&gt;urbin is NULL, and this triggers an unending reset-retry loop.

    This patch fixes the problem by creating a new subroutine,
    hid_restart_io(), to carry out all the common activities.  It also
    adds some checks that were missing in the original code:

    	After a reset, there's no need to clear any halted endpoints.

    	After a resume, if a reset is pending there's no need to
    	restart any I/O until the reset is finished.

    	After a resume, if the interrupt-IN endpoint is halted there's
    	no need to submit the input URB until the halt has been
    	cleared.

    Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
    Reported-by: Daniel Fraga &lt;fragabr@gmail.com&gt;
    Tested-by: Daniel Fraga &lt;fragabr@gmail.com&gt;
    CC: &lt;stable@vger.kernel.org&gt;
    Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 6a2ba9c0267965dda669d3eadb8f8dfcbb710e20
Author: Theodore Ts'o &lt;tytso@mit.edu&gt;
Date:   Fri Apr 1 01:31:28 2016 -0400

    ext4: add lockdep annotations for i_data_sem

    commit daf647d2dd58cec59570d7698a45b98e580f2076 upstream.

    With the internal Quota feature, mke2fs creates empty quota inodes and
    quota usage tracking is enabled as soon as the file system is mounted.
    Since quotacheck is no longer preallocating all of the blocks in the
    quota inode that are likely needed to be written to, we are now seeing
    a lockdep false positive caused by needing to allocate a quota block
    from inside ext4_map_blocks(), while holding i_data_sem for a data
    inode.  This results in this complaint:

      Possible unsafe locking scenario:

            CPU0                    CPU1
            ----                    ----
       lock(&amp;ei-&gt;i_data_sem);
                                    lock(&amp;s-&gt;s_dquot.dqio_mutex);
                                    lock(&amp;ei-&gt;i_data_sem);
       lock(&amp;s-&gt;s_dquot.dqio_mutex);

    Google-Bug-Id: 27907753

    Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 4407936bbefc0887c32349a511ab9e0f9a36624d
Author: Yoshihiro Shimoda &lt;yoshihiro.shimoda.uh@renesas.com&gt;
Date:   Thu Mar 10 11:30:15 2016 +0900

    usb: renesas_usbhs: disable TX IRQ before starting TX DMAC transfer

    commit 6490865c67825277b29638e839850882600b48ec upstream.

    This patch adds a code to surely disable TX IRQ of the pipe before
    starting TX DMAC transfer. Otherwise, a lot of unnecessary TX IRQs
    may happen in rare cases when DMAC is used.

    Fixes: e73a989 ("usb: renesas_usbhs: add DMAEngine support")
    Cc: &lt;stable@vger.kernel.org&gt; # v3.1+
    Signed-off-by: Yoshihiro Shimoda &lt;yoshihiro.shimoda.uh@renesas.com&gt;
    Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 5a6df60e67a07a3f2f531719102120f17a77e115
Author: Yoshihiro Shimoda &lt;yoshihiro.shimoda.uh@renesas.com&gt;
Date:   Thu Mar 10 11:30:14 2016 +0900

    usb: renesas_usbhs: avoid NULL pointer derefernce in usbhsf_pkt_handler()

    commit 894f2fc44f2f3f48c36c973b1123f6ab298be160 upstream.

    When unexpected situation happened (e.g. tx/rx irq happened while
    DMAC is used), the usbhsf_pkt_handler() was possible to cause NULL
    pointer dereference like the followings:

    Unable to handle kernel NULL pointer dereference at virtual address 00000000
    pgd = c0004000
    [00000000] *pgd=00000000
    Internal error: Oops: 80000007 [#1] SMP ARM
    Modules linked in: usb_f_acm u_serial g_serial libcomposite
    CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.5.0-rc6-00842-gac57066-dirty #63
    Hardware name: Generic R8A7790 (Flattened Device Tree)
    task: c0729c00 ti: c0724000 task.ti: c0724000
    PC is at 0x0
    LR is at usbhsf_pkt_handler+0xac/0x118
    pc : [&lt;00000000&gt;]    lr : [&lt;c03257e0&gt;]    psr: 60000193
    sp : c0725db8  ip : 00000000  fp : c0725df4
    r10: 00000001  r9 : 00000193  r8 : ef3ccab4
    r7 : ef3cca10  r6 : eea4586c  r5 : 00000000  r4 : ef19ceb4
    r3 : 00000000  r2 : 0000009c  r1 : c0725dc4  r0 : ef19ceb4

    This patch adds a condition to avoid the dereference.

    Fixes: e73a989 ("usb: renesas_usbhs: add DMAEngine support")
    Cc: &lt;stable@vger.kernel.org&gt; # v3.1+
    Signed-off-by: Yoshihiro Shimoda &lt;yoshihiro.shimoda.uh@renesas.com&gt;
    Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit d840a0cb38332bfa6d08f5bf36bdf7425a8d197c
Author: Thadeu Lima de Souza Cascardo &lt;cascardo@redhat.com&gt;
Date:   Fri Apr 1 17:17:50 2016 -0300

    ip6_tunnel: set rtnl_link_ops before calling register_netdevice

    commit b6ee376cb0b7fb4e7e07d6cd248bd40436fb9ba6 upstream.

    When creating an ip6tnl tunnel with ip tunnel, rtnl_link_ops is not set
    before ip6_tnl_create2 is called. When register_netdevice is called, there
    is no linkinfo attribute in the NEWLINK message because of that.

    Setting rtnl_link_ops before calling register_netdevice fixes that.

    Fixes: 0b112457229d ("ip6tnl: add support of link creation via rtnl")
    Signed-off-by: Thadeu Lima de Souza Cascardo &lt;cascardo@redhat.com&gt;
    Acked-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 0ad91c67ea1655b3a382c4e9e9e8857053901a48
Author: Haishuang Yan &lt;yanhaishuang@cmss.chinamobile.com&gt;
Date:   Sun Apr 3 22:09:24 2016 +0800

    ipv6: l2tp: fix a potential issue in l2tp_ip6_recv

    commit be447f305494e019dfc37ea4cdf3b0e4200b4eba upstream.

    pskb_may_pull() can change skb-&gt;data, so we have to load ptr/optr at the
    right place.

    Signed-off-by: Haishuang Yan &lt;yanhaishuang@cmss.chinamobile.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit e8bf435fb751d0d13c387079aff10ddd9fd6f7af
Author: Haishuang Yan &lt;yanhaishuang@cmss.chinamobile.com&gt;
Date:   Sun Apr 3 22:09:23 2016 +0800

    ipv4: l2tp: fix a potential issue in l2tp_ip_recv

    commit 5745b8232e942abd5e16e85fa9b27cc21324acf0 upstream.

    pskb_may_pull() can change skb-&gt;data, so we have to load ptr/optr at the
    right place.

    Signed-off-by: Haishuang Yan &lt;yanhaishuang@cmss.chinamobile.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit c75e78a494a14906831d2dbd149dff94cdd54b66
Author: Bjørn Mork &lt;bjorn@mork.no&gt;
Date:   Mon Mar 28 22:38:16 2016 +0200

    qmi_wwan: add "D-Link DWM-221 B1" device id

    commit e84810c7b85a2d7897797b3ad3e879168a8e032a upstream.

    Thomas reports:
    "Windows:

    00 diagnostics
    01 modem
    02 at-port
    03 nmea
    04 nic

    Linux:

    T:  Bus=02 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#=  4 Spd=480 MxCh= 0
    D:  Ver= 2.00 Cls=00(&gt;ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=2001 ProdID=7e19 Rev=02.32
    S:  Manufacturer=Mobile Connect
    S:  Product=Mobile Connect
    S:  SerialNumber=0123456789ABCDEF
    C:  #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA
    I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
    I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
    I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
    I:  If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
    I:  If#= 5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage"

    Reported-by: Thomas Schäfer &lt;tschaefer@t-online.de&gt;
    Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit c57d15c3c4ecee01fb151a717a0f4b280e73ae24
Author: Guillaume Nault &lt;g.nault@alphalink.fr&gt;
Date:   Wed Mar 23 16:38:55 2016 +0100

    ppp: take reference on channels netns

    commit 1f461dcdd296eecedaffffc6bae2bfa90bd7eb89 upstream.

    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;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit fb7d23cba8d89ed9f7cb629efab26c08a7384cb0
Author: Manish Chopra &lt;manish.chopra@qlogic.com&gt;
Date:   Tue Mar 15 07:13:45 2016 -0400

    qlge: Fix receive packets drop.

    commit 2c9a266afefe137bff06bbe0fc48b4d3b3cb348c upstream.

    When running small packets [length &lt; 256 bytes] traffic, packets were
    being dropped due to invalid data in those packets which were
    delivered by the driver upto the stack. Using pci_dma_sync_single_for_cpu
    ensures copying latest and updated data into skb from the receive buffer.

    Signed-off-by: Sony Chacko &lt;sony.chacko@qlogic.com&gt;
    Signed-off-by: Manish Chopra &lt;manish.chopra@qlogic.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit d6a8ef9f850f408ad1a50f8f8e5009b0a98cfd2d
Author: Arnd Bergmann &lt;arnd@arndb.de&gt;
Date:   Mon Mar 14 15:18:36 2016 +0100

    ath9k: fix buffer overrun for ar9287

    commit 83d6f1f15f8cce844b0a131cbc63e444620e48b5 upstream.

    Code that was added back in 2.6.38 has an obvious overflow
    when accessing a static array, and at the time it was added
    only a code comment was put in front of it as a reminder
    to have it reviewed properly.

    This has not happened, but gcc-6 now points to the specific
    overflow:

    drivers/net/wireless/ath/ath9k/eeprom.c: In function 'ath9k_hw_get_gain_boundaries_pdadcs':
    drivers/net/wireless/ath/ath9k/eeprom.c:483:44: error: array subscript is above array bounds [-Werror=array-bounds]
         maxPwrT4[i] = data_9287[idxL].pwrPdg[i][4];
                       ~~~~~~~~~~~~~~~~~~~~~~~~~^~~

    It turns out that the correct array length exists in the local
    'intercepts' variable of this function, so we can just use that
    instead of hardcoding '4', so this patch changes all three
    instances to use that variable. The other two instances were
    already correct, but it's more consistent this way.

    Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
    Fixes: 940cd2c12ebf ("ath9k_hw: merge the ar9287 version of ath9k_hw_get_gain_boundaries_pdadcs")
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 4d882b64d6b6cf5eb612fe3f6555e7f3558d38df
Author: Arnd Bergmann &lt;arnd@arndb.de&gt;
Date:   Mon Mar 14 15:18:35 2016 +0100

    farsync: fix off-by-one bug in fst_add_one

    commit e725a66c0202b5f36c2f9d59d26a65c53bbf21f7 upstream.

    gcc-6 finds an out of bounds access in the fst_add_one function
    when calculating the end of the mmio area:

    drivers/net/wan/farsync.c: In function 'fst_add_one':
    drivers/net/wan/farsync.c:418:53: error: index 2 denotes an offset greater than size of 'u8[2][8192] {aka unsigned char[2][8192]}' [-Werror=array-bounds]
     #define BUF_OFFSET(X)   (BFM_BASE + offsetof(struct buf_window, X))
                                                         ^
    include/linux/compiler-gcc.h:158:21: note: in definition of macro '__compiler_offsetof'
      __builtin_offsetof(a, b)
                         ^
    drivers/net/wan/farsync.c:418:37: note: in expansion of macro 'offsetof'
     #define BUF_OFFSET(X)   (BFM_BASE + offsetof(struct buf_window, X))
                                         ^~~~~~~~
    drivers/net/wan/farsync.c:2519:36: note: in expansion of macro 'BUF_OFFSET'
                                      + BUF_OFFSET ( txBuffer[i][NUM_TX_BUFFER][0]);
                                        ^~~~~~~~~~

    The warning is correct, but not critical because this appears
    to be a write-only variable that is set by each WAN driver but
    never accessed afterwards.

    I'm taking the minimal fix here, using the correct pointer by
    pointing 'mem_end' to the last byte inside of the register area
    as all other WAN drivers do, rather than the first byte outside of
    it. An alternative would be to just remove the mem_end member
    entirely.

    Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 8ba9ba1ab9b1773dc879d21dab59b9b7d57d14ff
Author: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Date:   Mon Mar 14 09:56:35 2016 -0300

    net: Fix use after free in the recvmmsg exit path

    commit 34b88a68f26a75e4fded796f1a49c40f82234b7d upstream.

    The syzkaller fuzzer hit the following use-after-free:

      Call Trace:
       [&lt;ffffffff8175ea0e&gt;] __asan_report_load8_noabort+0x3e/0x40 mm/kasan/report.c:295
       [&lt;ffffffff851cc31a&gt;] __sys_recvmmsg+0x6fa/0x7f0 net/socket.c:2261
       [&lt;     inline     &gt;] SYSC_recvmmsg net/socket.c:2281
       [&lt;ffffffff851cc57f&gt;] SyS_recvmmsg+0x16f/0x180 net/socket.c:2270
       [&lt;ffffffff86332bb6&gt;] entry_SYSCALL_64_fastpath+0x16/0x7a
      arch/x86/entry/entry_64.S:185

    And, as Dmitry rightly assessed, that is because we can drop the
    reference and then touch it when the underlying recvmsg calls return
    some packets and then hit an error, which will make recvmmsg to set
    sock-&gt;sk-&gt;sk_err, oops, fix it.

    Reported-and-Tested-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Cc: Alexander Potapenko &lt;glider@google.com&gt;
    Cc: Eric Dumazet &lt;edumazet@google.com&gt;
    Cc: Kostya Serebryany &lt;kcc@google.com&gt;
    Cc: Sasha Levin &lt;sasha.levin@oracle.com&gt;
    Fixes: a2e2725541fa ("net: Introduce recvmmsg socket syscall")
    http://lkml.kernel.org/r/20160122211644.GC2470@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@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;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 0babba1b597af867aa0036c168a3096f95836310
Author: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.com&gt;
Date:   Tue Mar 8 01:36:28 2016 +0300

    sh_eth: fix NULL pointer dereference in sh_eth_ring_format()

    commit c1b7fca65070bfadca94dd53a4e6b71cd4f69715 upstream.

    In a low memory situation, if netdev_alloc_skb() fails on a first RX ring
    loop iteration  in sh_eth_ring_format(), 'rxdesc' is still NULL.  Avoid
    kernel oops by adding the 'rxdesc' check after the loop.

    Reported-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
    Signed-off-by: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 952bca89c853f66d2abf0c971080a8ea2d1dd7b0
Author: Bill Sommerfeld &lt;wsommerfeld@google.com&gt;
Date:   Fri Mar 4 14:47:21 2016 -0800

    udp6: fix UDP/IPv6 encap resubmit path

    commit 59dca1d8a6725a121dae6c452de0b2611d5865dc upstream.

    IPv4 interprets a negative return value from a protocol handler as a
    request to redispatch to a new protocol.  In contrast, IPv6 interprets a
    negative value as an error, and interprets a positive value as a request
    for redispatch.

    UDP for IPv6 was unaware of this difference.  Change __udp6_lib_rcv() to
    return a positive value for redispatch.  Note that the socket's
    encap_rcv hook still needs to return a negative value to request
    dispatch, and in the case of IPv6 packets, adjust IP6CB(skb)-&gt;nhoff to
    identify the byte containing the next protocol.

    Signed-off-by: Bill Sommerfeld &lt;wsommerfeld@google.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit cfa74bdc32606cbcca59635f47e6069980cc1202
Author: Oliver Neukum &lt;oneukum@suse.com&gt;
Date:   Mon Mar 7 11:31:10 2016 +0100

    usbnet: cleanup after bind() in probe()

    commit 1666984c8625b3db19a9abc298931d35ab7bc64b upstream.

    In case bind() works, but a later error forces bailing
    in probe() in error cases work and a timer may be scheduled.
    They must be killed. This fixes an error case related to
    the double free reported in
    http://www.spinics.net/lists/netdev/msg367669.html
    and needs to go on top of Linus' fix to cdc-ncm.

    Signed-off-by: Oliver Neukum &lt;ONeukum@suse.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 13eec5c1f4aebb114fce51e7286562485bb8cd8c
Author: Bjørn Mork &lt;bjorn@mork.no&gt;
Date:   Thu Mar 3 22:20:53 2016 +0100

    cdc_ncm: toggle altsetting to force reset before setup

    commit 48906f62c96cc2cd35753e59310cb70eb08cc6a5 upstream.

    Some devices will silently fail setup unless they are reset first.
    This is necessary even if the data interface is already in
    altsetting 0, which it will be when the device is probed for the
    first time.  Briefly toggling the altsetting forces a function
    reset regardless of the initial state.

    This fixes a setup problem observed on a number of Huawei devices,
    appearing to operate in NTB-32 mode even if we explicitly set them
    to NTB-16 mode.

    Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit abcb7fb8535f0e7f87150e0ffbeac5a0ff285718
Author: Florian Westphal &lt;fw@strlen.de&gt;
Date:   Tue Mar 1 16:15:16 2016 +0100

    ipv6: re-enable fragment header matching in ipv6_find_hdr

    commit 5d150a985520bbe3cb2aa1ceef24a7e32f20c15f upstream.

    When ipv6_find_hdr is used to find a fragment header
    (caller specifies target NEXTHDR_FRAGMENT) we erronously return
    -ENOENT for all fragments with nonzero offset.

    Before commit 9195bb8e381d, when target was specified, we did not
    enter the exthdr walk loop as nexthdr == target so this used to work.

    Now we do (so we can skip empty route headers). When we then stumble upon
    a frag with nonzero frag_off we must return -ENOENT ("header not found")
    only if the caller did not specifically request NEXTHDR_FRAGMENT.

    This allows nfables exthdr expression to match ipv6 fragments, e.g. via

    nft add rule ip6 filter input frag frag-off gt 0

    Fixes: 9195bb8e381d ("ipv6: improve ipv6_find_hdr() to skip empty routing headers")
    Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 9ad2f2e8e1ddc3844df8c96cc0d18c61e3416512
Author: Xin Long &lt;lucien.xin@gmail.com&gt;
Date:   Sun Feb 28 10:03:51 2016 +0800

    sctp: lack the check for ports in sctp_v6_cmp_addr

    commit 40b4f0fd74e46c017814618d67ec9127ff20f157 upstream.

    As the member .cmp_addr of sctp_af_inet6, sctp_v6_cmp_addr should also check
    the port of addresses, just like sctp_v4_cmp_addr, cause it's invoked by
    sctp_cmp_addr_exact().

    Now sctp_v6_cmp_addr just check the port when two addresses have different
    family, and lack the port check for two ipv6 addresses. that will make
    sctp_hash_cmp() cannot work well.

    so fix it by adding ports comparison in sctp_v6_cmp_addr().

    Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 6bd21b4a2c0c5691b57f1e7748d6688acfb04def
Author: Diego Viola &lt;diego.viola@gmail.com&gt;
Date:   Tue Feb 23 12:04:04 2016 -0300

    net: jme: fix suspend/resume on JMC260

    commit ee50c130c82175eaa0820c96b6d3763928af2241 upstream.

    The JMC260 network card fails to suspend/resume because the call to
    jme_start_irq() was too early, moving the call to jme_start_irq() after
    the call to jme_reset_link() makes it work.

    Prior this change suspend/resume would fail unless /sys/power/pm_async=0
    was explicitly specified.

    Relevant bug report: https://bugzilla.kernel.org/show_bug.cgi?id=112351

    Signed-off-by: Diego Viola &lt;diego.viola@gmail.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 0e57779aef22ba4951ea34e9abbdd3f4659d5450
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Fri Apr 1 12:28:16 2016 +0200

    ALSA: timer: Use mod_timer() for rearming the system timer

    commit 4a07083ed613644c96c34a7dd2853dc5d7c70902 upstream.

    ALSA system timer backend stops the timer via del_timer() without sync
    and leaves del_timer_sync() at the close instead.  This is because of
    the restriction by the design of ALSA timer: namely, the stop callback
    may be called from the timer handler, and calling the sync shall lead
    to a hangup.  However, this also triggers a kernel BUG() when the
    timer is rearmed immediately after stopping without sync:
     kernel BUG at kernel/time/timer.c:966!
     Call Trace:
      &lt;IRQ&gt;
      [&lt;ffffffff8239c94e&gt;] snd_timer_s_start+0x13e/0x1a0
      [&lt;ffffffff8239e1f4&gt;] snd_timer_interrupt+0x504/0xec0
      [&lt;ffffffff8122fca0&gt;] ? debug_check_no_locks_freed+0x290/0x290
      [&lt;ffffffff8239ec64&gt;] snd_timer_s_function+0xb4/0x120
      [&lt;ffffffff81296b72&gt;] call_timer_fn+0x162/0x520
      [&lt;ffffffff81296add&gt;] ? call_timer_fn+0xcd/0x520
      [&lt;ffffffff8239ebb0&gt;] ? snd_timer_interrupt+0xec0/0xec0
      ....

    It's the place where add_timer() checks the pending timer.  It's clear
    that this may happen after the immediate restart without sync in our
    cases.

    So, the workaround here is just to use mod_timer() instead of
    add_timer().  This looks like a band-aid fix, but it's a right move,
    as snd_timer_interrupt() takes care of the continuous rearm of timer.

    Reported-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
    Cc: &lt;stable@vger.kernel.org&gt;
    Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 247ed0d3957b6635ba82ecd9573a921c4bfe06c4
Author: Helge Deller &lt;deller@gmx.de&gt;
Date:   Fri Apr 8 18:18:48 2016 +0200

    parisc: Fix kernel crash with reversed copy_from_user()

    commit ef72f3110d8b19f4c098a0bff7ed7d11945e70c6 upstream.

    The kernel module testcase (lib/test_user_copy.c) exhibited a kernel
    crash on parisc if the parameters for copy_from_user were reversed
    ("illegal reversed copy_to_user" testcase).

    Fix this potential crash by checking the fault handler if the faulting
    address is in the exception table.

    Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
    Cc: Kees Cook &lt;keescook@chromium.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit ac6a8eb7a78c166c5f33696a1f617c0fc304d372
Author: Helge Deller &lt;deller@gmx.de&gt;
Date:   Fri Apr 8 18:11:33 2016 +0200

    parisc: Avoid function pointers for kernel exception routines

    commit e3893027a300927049efc1572f852201eb785142 upstream.

    We want to avoid the kernel module loader to create function pointers
    for the kernel fixup routines of get_user() and put_user(). Changing
    the external reference from function type to int type fixes this.

    This unbreaks exception handling for get_user() and put_user() when
    called from a kernel module.

    Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
    Cc: stable@vger.kernel.org
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 1c6a2c4cf5f472a3833fcfe0d31adc6f5785cba5
Author: Guenter Roeck &lt;linux@roeck-us.net&gt;
Date:   Sat Mar 26 12:28:05 2016 -0700

    hwmon: (max1111) Return -ENODEV from max1111_read_channel if not instantiated

    commit 3c2e2266a5bd2d1cef258e6e54dca1d99946379f upstream.

    arm:pxa_defconfig can result in the following crash if the max1111 driver
    is not instantiated.

    Unhandled fault: page domain fault (0x01b) at 0x00000000
    pgd = c0004000
    [00000000] *pgd=00000000
    Internal error: : 1b [#1] PREEMPT ARM
    Modules linked in:
    CPU: 0 PID: 300 Comm: kworker/0:1 Not tainted 4.5.0-01301-g1701f680407c #10
    Hardware name: SHARP Akita
    Workqueue: events sharpsl_charge_toggle
    task: c390a000 ti: c391e000 task.ti: c391e000
    PC is at max1111_read_channel+0x20/0x30
    LR is at sharpsl_pm_pxa_read_max1111+0x2c/0x3c
    pc : [&lt;c03aaab0&gt;]    lr : [&lt;c0024b50&gt;]    psr: 20000013
    ...
    [&lt;c03aaab0&gt;] (max1111_read_channel) from [&lt;c0024b50&gt;]
    					(sharpsl_pm_pxa_read_max1111+0x2c/0x3c)
    [&lt;c0024b50&gt;] (sharpsl_pm_pxa_read_max1111) from [&lt;c00262e0&gt;]
    					(spitzpm_read_devdata+0x5c/0xc4)
    [&lt;c00262e0&gt;] (spitzpm_read_devdata) from [&lt;c0024094&gt;]
    					(sharpsl_check_battery_temp+0x78/0x110)
    [&lt;c0024094&gt;] (sharpsl_check_battery_temp) from [&lt;c0024f9c&gt;]
    					(sharpsl_charge_toggle+0x48/0x110)
    [&lt;c0024f9c&gt;] (sharpsl_charge_toggle) from [&lt;c004429c&gt;]
    					(process_one_work+0x14c/0x48c)
    [&lt;c004429c&gt;] (process_one_work) from [&lt;c0044618&gt;] (worker_thread+0x3c/0x5d4)
    [&lt;c0044618&gt;] (worker_thread) from [&lt;c004a238&gt;] (kthread+0xd0/0xec)
    [&lt;c004a238&gt;] (kthread) from [&lt;c000a670&gt;] (ret_from_fork+0x14/0x24)

    This can occur because the SPI controller driver (SPI_PXA2XX) is built as
    module and thus not necessarily loaded. While building SPI_PXA2XX into the
    kernel would make the problem disappear, it appears prudent to ensure that
    the driver is instantiated before accessing its data structures.

    Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
    Cc: stable@vger.kernel.org
    Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 750fc132a8fe380d651ccc5d11992d9ffa4c03e7
Author: Andi Kleen &lt;ak@linux.intel.com&gt;
Date:   Tue Mar 1 14:25:24 2016 -0800

    perf/x86/intel: Fix PEBS data source interpretation on Nehalem/Westmere

    commit e17dc65328057c00db7e1bfea249c8771a78b30b upstream.

    Jiri reported some time ago that some entries in the PEBS data source table
    in perf do not agree with the SDM. We investigated and the bits
    changed for Sandy Bridge, but the SDM was not updated.

    perf already implements the bits correctly for Sandy Bridge
    and later. This patch patches it up for Nehalem and Westmere.

    Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
    Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
    Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
    Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
    Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
    Cc: jolsa@kernel.org
    Link: http://lkml.kernel.org/r/1456871124-15985-1-git-send-email-andi@firstfloor.org
    Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 0579a12791e483fcaaad76748fb163ec855102a4
Author: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Date:   Fri Mar 4 15:59:42 2016 +0100

    sched/cputime: Fix steal time accounting vs. CPU hotplug

    commit e9532e69b8d1d1284e8ecf8d2586de34aec61244 upstream.

    On CPU hotplug the steal time accounting can keep a stale rq-&gt;prev_steal_time
    value over CPU down and up. So after the CPU comes up again the delta
    calculation in steal_account_process_tick() wreckages itself due to the
    unsigned math:

    	 u64 steal = paravirt_steal_clock(smp_processor_id());

    	 steal -= this_rq()-&gt;prev_steal_time;

    So if steal is smaller than rq-&gt;prev_steal_time we end up with an insane large
    value which then gets added to rq-&gt;prev_steal_time, resulting in a permanent
    wreckage of the accounting. As a consequence the per CPU stats in /proc/stat
    become stale.

    Nice trick to tell the world how idle the system is (100%) while the CPU is
    100% busy running tasks. Though we prefer realistic numbers.

    None of the accounting values which use a previous value to account for
    fractions is reset at CPU hotplug time. update_rq_clock_task() has a sanity
    check for prev_irq_time and prev_steal_time_rq, but that sanity check solely
    deals with clock warps and limits the /proc/stat visible wreckage. The
    prev_time values are still wrong.

    Solution is simple: Reset rq-&gt;prev_*_time when the CPU is plugged in again.

    Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
    Acked-by: Rik van Riel &lt;riel@redhat.com&gt;
    Cc: &lt;stable@vger.kernel.org&gt;
    Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
    Cc: Glauber Costa &lt;glommer@parallels.com&gt;
    Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
    Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
    Fixes: commit 095c0aa83e52 "sched: adjust scheduler cpu power for stolen time"
    Fixes: commit aa483808516c "sched: Remove irq time from available CPU power"
    Fixes: commit e6e6685accfa "KVM guest: Steal time accounting"
    Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1603041539490.3686@nanos
    Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 155025b224f3483e781e55f31719d80b4cf719fd
Author: Aaro Koskinen &lt;aaro.koskinen@iki.fi&gt;
Date:   Sat Feb 20 22:27:48 2016 +0200

    mtd: onenand: fix deadlock in onenand_block_markbad

    commit 5e64c29e98bfbba1b527b0a164f9493f3db9e8cb upstream.

    Commit 5942ddbc500d ("mtd: introduce mtd_block_markbad interface")
    incorrectly changed onenand_block_markbad() to call mtd_block_markbad
    instead of onenand_chip's block_markbad function. As a result the function
    will now recurse and deadlock. Fix by reverting the change.

    Fixes: 5942ddbc500d ("mtd: introduce mtd_block_markbad interface")
    Signed-off-by: Aaro Koskinen &lt;aaro.koskinen@iki.fi&gt;
    Acked-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
    Cc: &lt;stable@vger.kernel.org&gt;
    Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 898eeac1638e9c353ba112d8106ba97ff4831676
Author: Joseph Qi &lt;joseph.qi@huawei.com&gt;
Date:   Fri Mar 25 14:21:29 2016 -0700

    ocfs2/dlm: fix BUG in dlm_move_lockres_to_recovery_list

    commit be12b299a83fc807bbaccd2bcb8ec50cbb0cb55c upstream.

    When master handles convert request, it queues ast first and then
    returns status.  This may happen that the ast is sent before the request
    status because the above two messages are sent by two threads.  And
    right after the ast is sent, if master down, it may trigger BUG in
    dlm_move_lockres_to_recovery_list in the requested node because ast
    handler moves it to grant list without clear lock-&gt;convert_pending.  So
    remove BUG_ON statement and check if the ast is processed in
    dlmconvert_remote.

    Signed-off-by: Joseph Qi &lt;joseph.qi@huawei.com&gt;
    Reported-by: Yiwen Jiang &lt;jiangyiwen@huawei.com&gt;
    Cc: Junxiao Bi &lt;junxiao.bi@oracle.com&gt;
    Cc: Mark Fasheh &lt;mfasheh@suse.de&gt;
    Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
    Cc: Tariq Saeed &lt;tariq.x.saeed@oracle.com&gt;
    Cc: Junxiao Bi &lt;junxiao.bi@oracle.com&gt;
    Cc: &lt;stable@vger.kernel.org&gt;
    Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
    Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 70f5f65c32aa2131118295f61383d877d41f5da1
Author: Joseph Qi &lt;joseph.qi@huawei.com&gt;
Date:   Fri Mar 25 14:21:26 2016 -0700

    ocfs2/dlm: fix race between convert and recovery

    commit ac7cf246dfdbec3d8fed296c7bf30e16f5099dac upstream.

    There is a race window between dlmconvert_remote and
    dlm_move_lockres_to_recovery_list, which will cause a lock with
    OCFS2_LOCK_BUSY in grant list, thus system hangs.

    dlmconvert_remote
    {
            spin_lock(&amp;res-&gt;spinlock);
            list_move_tail(&amp;lock-&gt;list, &amp;res-&gt;converting);
            lock-&gt;convert_pending = 1;
            spin_unlock(&amp;res-&gt;spinlock);

            status = dlm_send_remote_convert_request();
            &gt;&gt;&gt;&gt;&gt;&gt; race window, master has queued ast and return DLM_NORMAL,
                   and then down before sending ast.
                   this node detects master down and calls
                   dlm_move_lockres_to_recovery_list, which will revert the
                   lock to grant list.
                   Then OCFS2_LOCK_BUSY won't be cleared as new master won't
                   send ast any more because it thinks already be authorized.

            spin_lock(&amp;res-&gt;spinlock);
            lock-&gt;convert_pending = 0;
            if (status != DLM_NORMAL)
                    dlm_revert_pending_convert(res, lock);
            spin_unlock(&amp;res-&gt;spinlock);
    }

    In this case, check if res-&gt;state has DLM_LOCK_RES_RECOVERING bit set
    (res is still in recovering) or res master changed (new master has
    finished recovery), reset the status to DLM_RECOVERING, then it will
    retry convert.

    Signed-off-by: Joseph Qi &lt;joseph.qi@huawei.com&gt;
    Reported-by: Yiwen Jiang &lt;jiangyiwen@huawei.com&gt;
    Reviewed-by: Junxiao Bi &lt;junxiao.bi@oracle.com&gt;
    Cc: Mark Fasheh &lt;mfasheh@suse.de&gt;
    Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
    Cc: Tariq Saeed &lt;tariq.x.saeed@oracle.com&gt;
    Cc: Junxiao Bi &lt;junxiao.bi@oracle.com&gt;
    Cc: &lt;stable@vger.kernel.org&gt;
    Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
    Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 0db38337a504f9b783e7244703b8c090f8cbf2ad
Author: Vladis Dronov &lt;vdronov@redhat.com&gt;
Date:   Wed Mar 23 11:53:46 2016 -0700

    Input: ati_remote2 - fix crashes on detecting device with invalid descriptor

    commit 950336ba3e4a1ffd2ca60d29f6ef386dd2c7351d upstream.

    The ati_remote2 driver expects at least two interfaces with one
    endpoint each. If given malicious descriptor that specify one
    interface or no endpoints, it will crash in the probe function.
    Ensure there is at least two interfaces and one endpoint for each
    interface before using it.

    The full disclosure: http://seclists.org/bugtraq/2016/Mar/90

    Reported-by: Ralf Spenneberg &lt;ralf@spenneberg.net&gt;
    Signed-off-by: Vladis Dronov &lt;vdronov@redhat.com&gt;
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit da23ec55b4ee3bd1c2e9ae2f89aea163e74b1887
Author: Oliver Neukum &lt;oneukum@suse.com&gt;
Date:   Thu Mar 17 14:00:17 2016 -0700

    Input: ims-pcu - sanity check against missing interfaces

    commit a0ad220c96692eda76b2e3fd7279f3dcd1d8a8ff upstream.

    A malicious device missing interface can make the driver oops.
    Add sanity checking.

    Signed-off-by: Oliver Neukum &lt;ONeukum@suse.com&gt;
    CC: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 869dc279331a7f2bffbd4c3edd8a63fd2fd67e42
Author: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Date:   Thu Feb 18 00:16:14 2016 +0100

    scripts/coccinelle: modernize &amp;

    commit 1b669e713f277a4d4b3cec84e13d16544ac8286d upstream.

    &amp; is no longer allowed in column 0, since Coccinelle 1.0.4.

    Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
    Tested-by: Nishanth Menon &lt;nm@ti.com&gt;
    Cc: stable@vger.kernel.org
    Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 2ec6dac110fe364dfc6ba140ba4ec3f4f47bbb3d
Author: Steven Rostedt (Red Hat) &lt;rostedt@goodmis.org&gt;
Date:   Tue Mar 22 17:30:58 2016 -0400

    tracing: Fix trace_printk() to print when not using bprintk()

    commit 3debb0a9ddb16526de8b456491b7db60114f7b5e upstream.

    The trace_printk() code will allocate extra buffers if the compile detects
    that a trace_printk() is used. To do this, the format of the trace_printk()
    is saved to the __trace_printk_fmt section, and if that section is bigger
    than zero, the buffers are allocated (along with a message that this has
    happened).

    If trace_printk() uses a format that is not a constant, and thus something
    not guaranteed to be around when the print happens, the compiler optimizes
    the fmt out, as it is not used, and the __trace_printk_fmt section is not
    filled. This means the kernel will not allocate the special buffers needed
    for the trace_printk() and the trace_printk() will not write anything to the
    tracing buffer.

    Adding a "__used" to the variable in the __trace_printk_fmt section will
    keep it around, even though it is set to NULL. This will keep the string
    from being printed in the debugfs/tracing/printk_formats section as it is
    not needed.

    Reported-by: Vlastimil Babka &lt;vbabka@suse.cz&gt;
    Fixes: 07d777fe8c398 "tracing: Add percpu buffers for trace_printk()"
    Cc: stable@vger.kernel.org # v3.5+
    Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 3f3f1fce3c1af5720308ec83a3d2ffb328a028aa
Author: Steven Rostedt (Red Hat) &lt;rostedt@goodmis.org&gt;
Date:   Fri Mar 18 15:46:48 2016 -0400

    tracing: Fix crash from reading trace_pipe with sendfile

    commit a29054d9478d0435ab01b7544da4f674ab13f533 upstream.

    If tracing contains data and the trace_pipe file is read with sendfile(),
    then it can trigger a NULL pointer dereference and various BUG_ON within the
    VM code.

    There's a patch to fix this in the splice_to_pipe() code, but it's also a
    good idea to not let that happen from trace_pipe either.

    Link: http://lkml.kernel.org/r/1457641146-9068-1-git-send-email-rabin@rab.in

    Cc: stable@vger.kernel.org # 2.6.30+
    Reported-by: Rabin Vincent &lt;rabin.vincent@gmail.com&gt;
    Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit e5509925495c66013d6985d7823f947540b9ceb0
Author: Steven Rostedt (Red Hat) &lt;rostedt@goodmis.org&gt;
Date:   Fri Mar 18 12:27:43 2016 -0400

    tracing: Have preempt(irqs)off trace preempt disabled functions

    commit cb86e05390debcc084cfdb0a71ed4c5dbbec517d upstream.

    Joel Fernandes reported that the function tracing of preempt disabled
    sections was not being reported when running either the preemptirqsoff or
    preemptoff tracers. This was due to the fact that the function tracer
    callback for those tracers checked if irqs were disabled before tracing. But
    this fails when we want to trace preempt off locations as well.

    Joel explained that he wanted to see funcitons where interrupts are enabled
    but preemption was disabled. The expected output he wanted:

       &lt;...&gt;-2265    1d.h1 3419us : preempt_count_sub &lt;-irq_exit
       &lt;...&gt;-2265    1d..1 3419us : __do_softirq &lt;-irq_exit
       &lt;...&gt;-2265    1d..1 3419us : msecs_to_jiffies &lt;-__do_softirq
       &lt;...&gt;-2265    1d..1 3420us : irqtime_account_irq &lt;-__do_softirq
       &lt;...&gt;-2265    1d..1 3420us : __local_bh_disable_ip &lt;-__do_softirq
       &lt;...&gt;-2265    1..s1 3421us : run_timer_softirq &lt;-__do_softirq
       &lt;...&gt;-2265    1..s1 3421us : hrtimer_run_pending &lt;-run_timer_softirq
       &lt;...&gt;-2265    1..s1 3421us : _raw_spin_lock_irq &lt;-run_timer_softirq
       &lt;...&gt;-2265    1d.s1 3422us : preempt_count_add &lt;-_raw_spin_lock_irq
       &lt;...&gt;-2265    1d.s2 3422us : _raw_spin_unlock_irq &lt;-run_timer_softirq
       &lt;...&gt;-2265    1..s2 3422us : preempt_count_sub &lt;-_raw_spin_unlock_irq
       &lt;...&gt;-2265    1..s1 3423us : rcu_bh_qs &lt;-__do_softirq
       &lt;...&gt;-2265    1d.s1 3423us : irqtime_account_irq &lt;-__do_softirq
       &lt;...&gt;-2265    1d.s1 3423us : __local_bh_enable &lt;-__do_softirq

    There's a comment saying that the irq disabled check is because there's a
    possible race that tracing_cpu may be set when the function is executed. But
    I don't remember that race. For now, I added a check for preemption being
    enabled too to not record the function, as there would be no race if that
    was the case. I need to re-investigate this, as I'm now thinking that the
    tracing_cpu will always be correct. But no harm in keeping the check for
    now, except for the slight performance hit.

    Link: http://lkml.kernel.org/r/1457770386-88717-1-git-send-email-agnel.joel@gmail.com

    Fixes: 5e6d2b9cfa3a "tracing: Use one prologue for the preempt irqs off tracer function tracers"
    Cc: stable@vget.kernel.org # 2.6.37+
    Reported-by: Joel Fernandes &lt;agnel.joel@gmail.com&gt;
    Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit aeda7369852a3e26a3d5de94da716232f1f4a6af
Author: Mario Kleiner &lt;mario.kleiner.de@gmail.com&gt;
Date:   Sun Mar 6 02:39:53 2016 +0100

    drm/radeon: Don't drop DP 2.7 Ghz link setup on some cards.

    commit 459ee1c3fd097ab56ababd8ff4bb7ef6a792de33 upstream.

    As observed on Apple iMac10,1, DCE-3.2, RV-730,
    link rate of 2.7 Ghz is not selected, because
    the args.v1.ucConfig flag setting for 2.7 Ghz
    gets overwritten by a following assignment of
    the transmitter to use.

    Move link rate setup a few lines down to fix this.
    In practice this didn't have any positive or
    negative effect on display setup on the tested
    iMac10,1 so i don't know if backporting to stable
    makes sense or not.

    Signed-off-by: Mario Kleiner &lt;mario.kleiner.de@gmail.com&gt;
    Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
    Cc: stable@vger.kernel.org
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit e018f7b88562201a9d179aafa7028bfa72167a7e
Author: Gabriel Krisman Bertazi &lt;krisman@linux.vnet.ibm.com&gt;
Date:   Thu Feb 25 13:54:20 2016 -0300

    ipr: Fix regression when loading firmware

    commit 21b81716c6bff24cda52dc75588455f879ddbfe9 upstream.

    Commit d63c7dd5bcb9 ("ipr: Fix out-of-bounds null overwrite") removed
    the end of line handling when storing the update_fw sysfs attribute.
    This changed the userpace API because it started refusing writes
    terminated by a line feed, which broke the update tools we already have.

    This patch re-adds that handling, so both a write terminated by a line
    feed or not can make it through with the update.

    Fixes: d63c7dd5bcb9 ("ipr: Fix out-of-bounds null overwrite")
    Signed-off-by: Gabriel Krisman Bertazi &lt;krisman@linux.vnet.ibm.com&gt;
    Cc: Insu Yun &lt;wuninsu@gmail.com&gt;
    Acked-by: Brian King &lt;brking@linux.vnet.ibm.com&gt;
    Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit c7f5b11ef43abc9e274cf664311ff7bcf5d76cd6
Author: Insu Yun &lt;wuninsu@gmail.com&gt;
Date:   Wed Jan 6 12:44:01 2016 -0500

    ipr: Fix out-of-bounds null overwrite

    commit d63c7dd5bcb9441af0526d370c43a65ca2c980d9 upstream.

    Return value of snprintf is not bound by size value, 2nd argument.
    (https://www.kernel.org/doc/htmldocs/kernel-api/API-snprintf.html).
    Return value is number of printed chars, can be larger than 2nd
    argument.  Therefore, it can write null byte out of bounds ofbuffer.
    Since snprintf puts null, it does not need to put additional null byte.

    Signed-off-by: Insu Yun &lt;wuninsu@gmail.com&gt;
    Reviewed-by: Shane Seymour &lt;shane.seymour@hpe.com&gt;
    Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 7af534dea77d1c526b83a4105178e1a79da09811
Author: Aurelien Jacquiot &lt;a-jacquiot@ti.com&gt;
Date:   Tue Mar 22 14:25:42 2016 -0700

    rapidio/rionet: fix deadlock on SMP

    commit 36915976eca58f2eefa040ba8f9939672564df61 upstream.

    Fix deadlocking during concurrent receive and transmit operations on SMP
    platforms caused by the use of incorrect lock: on transmit 'tx_lock'
    spinlock should be used instead of 'lock' which is used for receive
    operation.

    This fix is applicable to kernel versions starting from v2.15.

    Signed-off-by: Aurelien Jacquiot &lt;a-jacquiot@ti.com&gt;
    Signed-off-by: Alexandre Bounine &lt;alexandre.bounine@idt.com&gt;
    Cc: Matt Porter &lt;mporter@kernel.crashing.org&gt;
    Cc: Andre van Herk &lt;andre.van.herk@prodrive-technologies.com&gt;
    Cc: &lt;stable@vger.kernel.org&gt;
    Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
    Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit f6d033a30988b931df2dac378e5171fe8c2d3c8a
Author: Jes Sorensen &lt;Jes.Sorensen@redhat.com&gt;
Date:   Tue Feb 16 16:44:24 2016 -0500

    md/raid5: Compare apples to apples (or sectors to sectors)

    commit e7597e69dec59b65c5525db1626b9d34afdfa678 upstream.

    'max_discard_sectors' is in sectors, while 'stripe' is in bytes.

    This fixes the problem where DISCARD would get disabled on some larger
    RAID5 configurations (6 or more drives in my testing), while it worked
    as expected with smaller configurations.

    Fixes: 620125f2bf8 ("MD: raid5 trim support")
    Cc: stable@vger.kernel.org v3.7+
    Signed-off-by: Jes Sorensen &lt;Jes.Sorensen@redhat.com&gt;
    Signed-off-by: Shaohua Li &lt;shli@fb.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit c716151e12aed51879ca4825c5452e1cd7d0b77e
Author: Max Filippov &lt;jcmvbkbc@gmail.com&gt;
Date:   Thu Mar 3 18:34:29 2016 +0300

    xtensa: clear all DBREAKC registers on start

    commit 7de7ac785ae18a2cdc78d7560f48e3213d9ea0ab upstream.

    There are XCHAL_NUM_DBREAK registers, clear them all.
    This also fixes cryptic assembler error message with binutils 2.25 when
    XCHAL_NUM_DBREAK is 0:

      as: out of memory allocating 18446744073709551575 bytes after a total
      of 495616 bytes

    Cc: stable@vger.kernel.org
    Signed-off-by: Max Filippov &lt;jcmvbkbc@gmail.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit fd5924d8b354ea5a44668ce20d51cc46057e4181
Author: Max Filippov &lt;jcmvbkbc@gmail.com&gt;
Date:   Tue Feb 9 01:02:38 2016 +0300

    xtensa: ISS: don't hang if stdin EOF is reached

    commit 362014c8d9d51d504c167c44ac280169457732be upstream.

    Simulator stdin may be connected to a file, when its end is reached
    kernel hangs in infinite loop inside rs_poll, because simc_poll always
    signals that descriptor 0 is readable and simc_read always returns 0.
    Check simc_read return value and exit loop if it's not positive. Also
    don't rewind polling timer if it's zero.

    Cc: stable@vger.kernel.org
    Signed-off-by: Max Filippov &lt;jcmvbkbc@gmail.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 929522bfe429c0f9e834c93bdcb9e6a0292245cd
Author: Rabin Vincent &lt;rabin@rab.in&gt;
Date:   Thu Mar 10 21:19:06 2016 +0100

    splice: handle zero nr_pages in splice_to_pipe()

    commit d6785d9152147596f60234157da2b02540c3e60f upstream.

    Running the following command:

     busybox cat /sys/kernel/debug/tracing/trace_pipe &gt; /dev/null

    with any tracing enabled pretty very quickly leads to various NULL
    pointer dereferences and VM BUG_ON()s, such as these:

     BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
     IP: [&lt;ffffffff8119df6c&gt;] generic_pipe_buf_release+0xc/0x40
     Call Trace:
      [&lt;ffffffff811c48a3&gt;] splice_direct_to_actor+0x143/0x1e0
      [&lt;ffffffff811c42e0&gt;] ? generic_pipe_buf_nosteal+0x10/0x10
      [&lt;ffffffff811c49cf&gt;] do_splice_direct+0x8f/0xb0
      [&lt;ffffffff81196869&gt;] do_sendfile+0x199/0x380
      [&lt;ffffffff81197600&gt;] SyS_sendfile64+0x90/0xa0
      [&lt;ffffffff8192cbee&gt;] entry_SYSCALL_64_fastpath+0x12/0x6d

     page dumped because: VM_BUG_ON_PAGE(atomic_read(&amp;page-&gt;_count) == 0)
     kernel BUG at include/linux/mm.h:367!
     invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
     RIP: [&lt;ffffffff8119df9c&gt;] generic_pipe_buf_release+0x3c/0x40
     Call Trace:
      [&lt;ffffffff811c48a3&gt;] splice_direct_to_actor+0x143/0x1e0
      [&lt;ffffffff811c42e0&gt;] ? generic_pipe_buf_nosteal+0x10/0x10
      [&lt;ffffffff811c49cf&gt;] do_splice_direct+0x8f/0xb0
      [&lt;ffffffff81196869&gt;] do_sendfile+0x199/0x380
      [&lt;ffffffff81197600&gt;] SyS_sendfile64+0x90/0xa0
      [&lt;ffffffff8192cd1e&gt;] tracesys_phase2+0x84/0x89

    (busybox's cat uses sendfile(2), unlike the coreutils version)

    This is because tracing_splice_read_pipe() can call splice_to_pipe()
    with spd-&gt;nr_pages == 0.  spd_pages underflows in splice_to_pipe() and
    we fill the page pointers and the other fields of the pipe_buffers with
    garbage.

    All other callers of splice_to_pipe() avoid calling it when nr_pages ==
    0, and we could make tracing_splice_read_pipe() do that too, but it
    seems reasonable to have splice_to_page() handle this condition
    gracefully.

    Cc: stable@vger.kernel.org
    Signed-off-by: Rabin Vincent &lt;rabin@rab.in&gt;
    Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
    Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 9bd0caf31ca013ed42e4a00dd2872035975e5b04
Author: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Date:   Sun Feb 28 17:44:09 2016 +0200

    watchdog: rc32434_wdt: fix ioctl error handling

    commit 10e7ac22cdd4d211cef99afcb9371b70cb175be6 upstream.

    Calling return copy_to_user(...) in an ioctl will not do the right thing
    if there's a pagefault: copy_to_user returns the number of bytes not
    copied in this case.

    Fix up watchdog/rc32434_wdt to do
    	return copy_to_user(...)) ?  -EFAULT : 0;

    instead.

    Cc: stable@vger.kernel.org
    Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
    Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
    Signed-off-by: Wim Van Sebroeck &lt;wim@iguana.be&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit f5b0d85307a93e081aa254c9cb28a44de8ff8e81
Author: Eric Wheeler &lt;git@linux.ewheeler.net&gt;
Date:   Mon Mar 7 15:17:50 2016 -0800

    bcache: fix cache_set_flush() NULL pointer dereference on OOM

    commit f8b11260a445169989d01df75d35af0f56178f95 upstream.

    When bch_cache_set_alloc() fails to kzalloc the cache_set, the
    asyncronous closure handling tries to dereference a cache_set that
    hadn't yet been allocated inside of cache_set_flush() which is called
    by __cache_set_unregister() during cleanup.  This appears to happen only
    during an OOM condition on bcache_register.

    Signed-off-by: Eric Wheeler &lt;bcache@linux.ewheeler.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 7493d128722687a2f43c3cf6feef04f3b81e5bcb
Author: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Date:   Wed Mar 9 23:47:25 2016 -0500

    jbd2: fix FS corruption possibility in jbd2_journal_destroy() on umount path

    commit c0a2ad9b50dd80eeccd73d9ff962234590d5ec93 upstream.

    On umount path, jbd2_journal_destroy() writes latest transaction ID
    (-&gt;j_tail_sequence) to be used at next mount.

    The bug is that -&gt;j_tail_sequence is not holding latest transaction ID
    in some cases. So, at next mount, there is chance to conflict with
    remaining (not overwritten yet) transactions.

    	mount (id=10)
    	write transaction (id=11)
    	write transaction (id=12)
    	umount (id=10) &lt;= the bug doesn't write latest ID

    	mount (id=10)
    	write transaction (id=11)
    	crash

    	mount
    	[recovery process]
    		transaction (id=11)
    		transaction (id=12) &lt;= valid transaction ID, but old commit
                                           must not replay

    Like above, this bug become the cause of recovery failure, or FS
    corruption.

    So why -&gt;j_tail_sequence doesn't point latest ID?

    Because if checkpoint transactions was reclaimed by memory pressure
    (i.e. bdev_try_to_free_page()), then -&gt;j_tail_sequence is not updated.
    (And another case is, __jbd2_journal_clean_checkpoint_list() is called
    with empty transaction.)

    So in above cases, -&gt;j_tail_sequence is not pointing latest
    transaction ID at umount path. Plus, REQ_FLUSH for checkpoint is not
    done too.

    So, to fix this problem with minimum changes, this patch updates
    -&gt;j_tail_sequence, and issue REQ_FLUSH.  (With more complex changes,
    some optimizations would be possible to avoid unnecessary REQ_FLUSH
    for example though.)

    BTW,

    	journal-&gt;j_tail_sequence =
    		++journal-&gt;j_transaction_sequence;

    Increment of -&gt;j_transaction_sequence seems to be unnecessary, but
    ext3 does this.

    Signed-off-by: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
    Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
    Cc: stable@vger.kernel.org
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit f4795a4ed887792f58afdf757047644bf8fdc7ce
Author: Vittorio Gambaletta (VittGam) &lt;linuxbugs@vittgam.net&gt;
Date:   Sun Mar 13 22:19:34 2016 +0100

    ALSA: intel8x0: Add clock quirk entry for AD1981B on IBM ThinkPad X41.

    commit 4061db03dd71d195b9973ee466f6ed32f6a3fc16 upstream.

    The clock measurement on the AC'97 audio card found in the IBM ThinkPad X41
    will often fail, so add a quirk entry to fix it.

    Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=441087
    Cc: &lt;stable@vger.kernel.org&gt;
    Signed-off-by: Vittorio Gambaletta &lt;linuxbugs@vittgam.net&gt;
    Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 68d6ceb7beb9e95ec76eec9eb32085ec2bae7301
Author: Tiffany Lin &lt;tiffany.lin@mediatek.com&gt;
Date:   Tue Jan 19 05:56:50 2016 -0200

    media: v4l2-compat-ioctl32: fix missing length copy in put_v4l2_buffer32

    commit 7df5ab8774aa383c6d2bff00688d004585d96dfd upstream.

    In v4l2-compliance utility, test QUERYBUF required correct length
    value to go through each planar to check planar's length in
    multi-planar buffer type

    Signed-off-by: Tiffany Lin &lt;tiffany.lin@mediatek.com&gt;
    Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
    Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
    Cc: &lt;stable@vger.kernel.org&gt;      # for v3.7 and up
    Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit d2d7a79a63d5476b6b5d988dc6fe10db86781c9c
Author: Hans de Goede &lt;hdegoede@redhat.com&gt;
Date:   Sun Feb 7 09:24:29 2016 -0200

    bttv: Width must be a multiple of 16 when capturing planar formats

    commit 5c915c68763889f0183a1cc61c84bb228b60124a upstream.

    On my bttv card "Hauppauge WinTV [card=10]" capturing in YV12 fmt at max
    size results in a solid green rectangle being captured (all colors 0 in
    YUV).

    This turns out to be caused by max-width (924) not being a multiple of 16.

    We've likely never hit this problem before since normally xawtv / tvtime,
    etc. will prefer packed pixel formats. But when using a video card which
    is using xf86-video-modesetting + glamor, only planar XVideo fmts are
    available, and xawtv will chose a matching capture format to avoid needing
    to do conversion, triggering the solid green window problem.

    Cc: stable@vger.kernel.org
    Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
    Acked-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
    Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit d86c21c5fd6c6b05ebd9a4cda74d3b6d8a87f896
Author: Sebastian Frias &lt;sf84@laposte.net&gt;
Date:   Fri Dec 18 17:40:05 2015 +0100

    8250: use callbacks to access UART_DLL/UART_DLM

    commit 0b41ce991052022c030fd868e03877700220b090 upstream.

    Some UART HW has a single register combining UART_DLL/UART_DLM
    (this was probably forgotten in the change that introduced the
    callbacks, commit b32b19b8ffc05cbd3bf91c65e205f6a912ca15d9)

    Fixes: b32b19b8ffc0 ("[SERIAL] 8250: set divisor register correctly ...")

    Signed-off-by: Sebastian Frias &lt;sf84@laposte.net&gt;
    Reviewed-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 1c7f227a50d9944c0b6d360c9b9fa0f31004420a
Author: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Date:   Sat Jan 9 17:48:45 2016 -0800

    net: irda: Fix use-after-free in irtty_open()

    commit 401879c57f01cbf2da204ad2e8db910525c6dbea upstream.

    The N_IRDA line discipline may access the previous line discipline's closed
    and already-fre private data on open [1].

    The tty-&gt;disc_data field _never_ refers to valid data on entry to the
    line discipline's open() method. Rather, the ldisc is expected to
    initialize that field for its own use for the lifetime of the instance
    (ie. from open() to close() only).

    [1]
        ==================================================================
        BUG: KASAN: use-after-free in irtty_open+0x422/0x550 at addr ffff8800331dd068
        Read of size 4 by task a.out/13960
        =============================================================================
        BUG kmalloc-512 (Tainted: G    B          ): kasan: bad access detected
        -----------------------------------------------------------------------------
        ...
        Call Trace:
         [&lt;ffffffff815fa2ae&gt;] __asan_report_load4_noabort+0x3e/0x40 mm/kasan/report.c:279
         [&lt;ffffffff836938a2&gt;] irtty_open+0x422/0x550 drivers/net/irda/irtty-sir.c:436
         [&lt;ffffffff829f1b80&gt;] tty_ldisc_open.isra.2+0x60/0xa0 drivers/tty/tty_ldisc.c:447
         [&lt;ffffffff829f21c0&gt;] tty_set_ldisc+0x1a0/0x940 drivers/tty/tty_ldisc.c:567
         [&lt;     inline     &gt;] tiocsetd drivers/tty/tty_io.c:2650
         [&lt;ffffffff829da49e&gt;] tty_ioctl+0xace/0x1fd0 drivers/tty/tty_io.c:2883
         [&lt;     inline     &gt;] vfs_ioctl fs/ioctl.c:43
         [&lt;ffffffff816708ac&gt;] do_vfs_ioctl+0x57c/0xe60 fs/ioctl.c:607
         [&lt;     inline     &gt;] SYSC_ioctl fs/ioctl.c:622
         [&lt;ffffffff81671204&gt;] SyS_ioctl+0x74/0x80 fs/ioctl.c:613
         [&lt;ffffffff852a7876&gt;] entry_SYSCALL_64_fastpath+0x16/0x7a

    Reported-and-tested-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Cc: &lt;stable@vger.kernel.org&gt;
    Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 67352ca5b3169980183c5912386c44aa47a19435
Author: Josh Boyer &lt;jwboyer@fedoraproject.org&gt;
Date:   Mon Mar 14 09:33:40 2016 -0700

    Input: powermate - fix oops with malicious USB descriptors

    commit 9c6ba456711687b794dcf285856fc14e2c76074f upstream.

    The powermate driver expects at least one valid USB endpoint in its
    probe function.  If given malicious descriptors that specify 0 for
    the number of endpoints, it will crash.  Validate the number of
    endpoints on the interface before using them.

    The full report for this issue can be found here:
    http://seclists.org/bugtraq/2016/Mar/85

    Reported-by: Ralf Spenneberg &lt;ralf@spenneberg.net&gt;
    Cc: stable &lt;stable@vger.kernel.org&gt;
    Signed-off-by: Josh Boyer &lt;jwboyer@fedoraproject.org&gt;
    Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 4bf0746d3616561b408fb41dfe9104eb62b3da59
Author: Hans de Goede &lt;hdegoede@redhat.com&gt;
Date:   Fri Jan 22 08:53:55 2016 -0200

    pwc: Add USB id for Philips Spc880nc webcam

    commit 7445e45d19a09e5269dc85f17f9635be29d2f76c upstream.

    SPC 880NC PC camera discussions:
    	http://www.pclinuxos.com/forum/index.php/topic,135688.0.html

    Cc: stable@vger.kernel.org
    Reported-by: Kikim &lt;klucznik0@op.pl&gt;
    Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
    Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 071e3031f80d3d145aaa26b182755a86277da72b
Author: Bjørn Mork &lt;bjorn@mork.no&gt;
Date:   Thu Apr 7 12:09:17 2016 +0200

    USB: option: add "D-Link DWM-221 B1" device id

    commit d48d5691ebf88a15d95ba96486917ffc79256536 upstream.

    Thomas reports:
    "Windows:

    00 diagnostics
    01 modem
    02 at-port
    03 nmea
    04 nic

    Linux:

    T:  Bus=02 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#=  4 Spd=480 MxCh= 0
    D:  Ver= 2.00 Cls=00(&gt;ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=2001 ProdID=7e19 Rev=02.32
    S:  Manufacturer=Mobile Connect
    S:  Product=Mobile Connect
    S:  SerialNumber=0123456789ABCDEF
    C:  #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA
    I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
    I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
    I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
    I:  If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
    I:  If#= 5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage"

    Reported-by: Thomas Schäfer &lt;tschaefer@t-online.de&gt;
    Cc: &lt;stable@vger.kernel.org&gt;
    Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
    Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 284d34afa88b7681e7060bb7f401b1662891c5c9
Author: Martyn Welch &lt;martyn.welch@collabora.co.uk&gt;
Date:   Tue Mar 29 17:47:29 2016 +0100

    USB: serial: cp210x: Adding GE Healthcare Device ID

    commit cddc9434e3dcc37a85c4412fb8e277d3a582e456 upstream.

    The CP2105 is used in the GE Healthcare Remote Alarm Box, with the
    Manufacturer ID of 0x1901 and Product ID of 0x0194.

    Signed-off-by: Martyn Welch &lt;martyn.welch@collabora.co.uk&gt;
    Cc: stable &lt;stable@vger.kernel.org&gt;
    Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit e5ffd637a997e910f05b520ec1022e26ea7e2e73
Author: Oliver Neukum &lt;oneukum@suse.com&gt;
Date:   Thu Mar 31 12:04:25 2016 -0400

    USB: cypress_m8: add endpoint sanity check

    commit c55aee1bf0e6b6feec8b2927b43f7a09a6d5f754 upstream.

    An attack using missing endpoints exists.

    CVE-2016-3137

    Signed-off-by: Oliver Neukum &lt;ONeukum@suse.com&gt;
    CC: stable@vger.kernel.org
    Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 129e6372f40a423bcded0a6dae547205edf652fb
Author: Oliver Neukum &lt;oneukum@suse.com&gt;
Date:   Thu Mar 31 12:04:26 2016 -0400

    USB: digi_acceleport: do sanity checking for the number of ports

    commit 5a07975ad0a36708c6b0a5b9fea1ff811d0b0c1f upstream.

    The driver can be crashed with devices that expose crafted descriptors
    with too few endpoints.

    See: http://seclists.org/bugtraq/2016/Mar/61

    Signed-off-by: Oliver Neukum &lt;ONeukum@suse.com&gt;
    [johan: fix OOB endpoint check and add error messages ]
    Cc: stable &lt;stable@vger.kernel.org&gt;
    Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit ffb372d838110dfa0efe00ce046ff282eeba1248
Author: Oliver Neukum &lt;oneukum@suse.com&gt;
Date:   Thu Mar 31 12:04:24 2016 -0400

    USB: mct_u232: add sanity checking in probe

    commit 4e9a0b05257f29cf4b75f3209243ed71614d062e upstream.

    An attack using the lack of sanity checking in probe is known. This
    patch checks for the existence of a second port.

    CVE-2016-3136

    Signed-off-by: Oliver Neukum &lt;ONeukum@suse.com&gt;
    CC: stable@vger.kernel.org
    [johan: add error message ]
    Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 1b282e30c7e0ee96c89de0faa6cb5e4e6be45e7b
Author: Oliver Neukum &lt;oneukum@suse.com&gt;
Date:   Wed Mar 16 13:26:17 2016 +0100

    USB: usb_driver_claim_interface: add sanity checking

    commit 0b818e3956fc1ad976bee791eadcbb3b5fec5bfd upstream.

    Attacks that trick drivers into passing a NULL pointer
    to usb_driver_claim_interface() using forged descriptors are
    known. This thwarts them by sanity checking.

    Signed-off-by: Oliver Neukum &lt;ONeukum@suse.com&gt;
    CC: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 28fa0e461bedf9c74932a9fca4b0be9eb440312d
Author: Josh Boyer &lt;jwboyer@fedoraproject.org&gt;
Date:   Mon Mar 14 10:42:38 2016 -0400

    USB: iowarrior: fix oops with malicious USB descriptors

    commit 4ec0ef3a82125efc36173062a50624550a900ae0 upstream.

    The iowarrior driver expects at least one valid endpoint.  If given
    malicious descriptors that specify 0 for the number of endpoints,
    it will crash in the probe function.  Ensure there is at least
    one endpoint on the interface before using it.

    The full report of this issue can be found here:
    http://seclists.org/bugtraq/2016/Mar/87

    Reported-by: Ralf Spenneberg &lt;ralf@spenneberg.net&gt;
    Cc: stable &lt;stable@vger.kernel.org&gt;
    Signed-off-by: Josh Boyer &lt;jwboyer@fedoraproject.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit d5f0867608e0fd8369de929d272ecb3ad7e5e654
Author: Oliver Neukum &lt;oneukum@suse.com&gt;
Date:   Tue Mar 15 10:14:04 2016 +0100

    USB: cdc-acm: more sanity checking

    commit 8835ba4a39cf53f705417b3b3a94eb067673f2c9 upstream.

    An attack has become available which pretends to be a quirky
    device circumventing normal sanity checks and crashes the kernel
    by an insufficient number of interfaces. This patch adds a check
    to the code path for quirky devices.

    Signed-off-by: Oliver Neukum &lt;ONeukum@suse.com&gt;
    CC: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 68d8ecd4c48051273bbf611c53c260e24a528422
Author: Oliver Neukum &lt;oneukum@suse.com&gt;
Date:   Wed Feb 10 11:33:18 2016 +0100

    usb: retry reset if a device times out

    commit 264904ccc33c604d4b3141bbd33808152dfac45b upstream.

    Some devices I got show an inability to operate right after
    power on if they are already connected. They are beyond recovery
    if the descriptors are requested multiple times. So in case of
    a timeout we rather bail early and reset again. But it must be
    done only on the first loop lest we get into a reset/time out
    spiral that can be overcome with a retry.

    This patch is a rework of a patch that fell through the cracks.
    http://www.spinics.net/lists/linux-usb/msg103263.html

    Signed-off-by: Oliver Neukum &lt;oneukum@suse.com&gt;
    CC: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit eb236fd583ed1138fa1a66151db27e093316f128
Author: Maurizio Lombardi &lt;mlombard@redhat.com&gt;
Date:   Fri Mar 4 10:41:49 2016 +0100

    be2iscsi: set the boot_kset pointer to NULL in case of failure

    commit 84bd64993f916bcf86270c67686ecf4cea7b8933 upstream.

    In beiscsi_setup_boot_info(), the boot_kset pointer should be set to
    NULL in case of failure otherwise an invalid pointer dereference may
    occur later.

    Cc: &lt;stable@vger.kernel.org&gt;
    Signed-off-by: Maurizio Lombardi &lt;mlombard@redhat.com&gt;
    Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
    Reviewed-by: Jitendra Bhivare &lt;jitendra.bhivare@broadcom.com&gt;
    Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 324d4df9b16f52fc991c91a2dc0cfe31e4894c17
Author: Raghava Aditya Renukunta &lt;raghavaaditya.renukunta@pmcs.com&gt;
Date:   Wed Feb 3 15:06:02 2016 -0800

    aacraid: Fix memory leak in aac_fib_map_free

    commit f88fa79a61726ce9434df9b4aede36961f709f17 upstream.

    aac_fib_map_free() calls pci_free_consistent() without checking that
    dev-&gt;hw_fib_va is not NULL and dev-&gt;max_fib_size is not zero.If they are
    indeed NULL/0, this will result in a hang as pci_free_consistent() will
    attempt to invalidate cache for the entire 64-bit address space
    (which would take a very long time).

    Fixed by adding a check to make sure that dev-&gt;hw_fib_va and
    dev-&gt;max_fib_size are not NULL and 0 respectively.

    Fixes: 9ad5204d6 - "[SCSI]aacraid: incorrect dma mapping mask during blinked recover or user initiated reset"
    Cc: stable@vger.kernel.org

    Signed-off-by: Raghava Aditya Renukunta &lt;raghavaaditya.renukunta@pmcs.com&gt;
    Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
    Reviewed-by: Tomas Henzl &lt;thenzl@redhat.com&gt;
    Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 64adb59fc5aec77495432307754228432ce6968d
Author: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Date:   Thu Mar 3 00:31:29 2016 -0500

    sg: fix dxferp in from_to case

    commit 5ecee0a3ee8d74b6950cb41e8989b0c2174568d4 upstream.

    One of the strange things that the original sg driver did was let the
    user provide both a data-out buffer (it followed the sg_header+cdb)
    _and_ specify a reply length greater than zero. What happened was that
    the user data-out buffer was copied into some kernel buffers and then
    the mid level was told a read type operation would take place with the
    data from the device overwriting the same kernel buffers. The user would
    then read those kernel buffers back into the user space.

    From what I can tell, the above action was broken by commit fad7f01e61bf
    ("sg: set dxferp to NULL for READ with the older SG interface") in 2008
    and syzkaller found that out recently.

    Make sure that a user space pointer is passed through when data follows
    the sg_header structure and command.  Fix the abnormal case when a
    non-zero reply_len is also given.

    Fixes: fad7f01e61bf737fe8a3740d803f000db57ecac6
    Cc: &lt;stable@vger.kernel.org&gt; #v2.6.28+
    Signed-off-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
    Reviewed-by: Ewan Milne &lt;emilne@redhat.com&gt;
    Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 721485b62f0f23cf243309ee746cb8d66bd2a079
Author: Andy Lutomirski &lt;luto@kernel.org&gt;
Date:   Wed Mar 16 14:14:22 2016 -0700

    x86/iopl: Fix iopl capability check on Xen PV

    commit c29016cf41fe9fa994a5ecca607cf5f1cd98801e upstream.

    iopl(3) is supposed to work if iopl is already 3, even if
    unprivileged.  This didn't work right on Xen PV.  Fix it.

    Reviewewd-by: Jan Beulich &lt;JBeulich@suse.com&gt;
    Signed-off-by: Andy Lutomirski &lt;luto@kernel.org&gt;
    Cc: Andrew Cooper &lt;andrew.cooper3@citrix.com&gt;
    Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
    Cc: Boris Ostrovsky &lt;boris.ostrovsky@oracle.com&gt;
    Cc: Borislav Petkov &lt;bp@alien8.de&gt;
    Cc: Brian Gerst &lt;brgerst@gmail.com&gt;
    Cc: David Vrabel &lt;david.vrabel@citrix.com&gt;
    Cc: Denys Vlasenko &lt;dvlasenk@redhat.com&gt;
    Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
    Cc: Jan Beulich &lt;JBeulich@suse.com&gt;
    Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
    Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
    Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
    Cc: stable@vger.kernel.org
    Link: http://lkml.kernel.org/r/8ce12013e6e4c0a44a97e316be4a6faff31bd5ea.1458162709.git.luto@kernel.org
    Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit a47831b0d8428904ef290ad06e3acbd3bb5a8312
Author: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
Date:   Sat Apr 27 16:11:17 2013 -0700

    x86, processor-flags: Fix the datatypes and add bit number defines

    commit d1fbefcb3aa608599a3c9e4582cbeeb6ba6c8939 upstream.

    The control registers are unsigned long (32 bits on i386, 64 bits on
    x86-64), and so make that manifest in the data type for the various
    constants.  Add defines with a _BIT suffix which defines the bit
    number, as opposed to the bit mask.

    This should resolve some issues with ~bitmask that Linus discovered.

    Reported-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
    Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
    Link: http://lkml.kernel.org/n/tip-cwckhbrib2aux1qbteaebij0@git.kernel.org
    [wt: backported to 3.10 only to keep next patch clean]

    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit f85cb76155fb908b966a422a1a4f6b5f7cce5de2
Author: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
Date:   Sat Apr 27 16:37:47 2013 -0700

    x86: Rename X86_CR4_RDWRGSFS to X86_CR4_FSGSBASE

    commit afcbf13fa6d53d8a97eafaca1dcb344331d2ce0c upstream.

    Rename X86_CR4_RDWRGSFS to X86_CR4_FSGSBASE to match the SDM.

    Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
    Cc: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
    Cc: Gleb Natapov &lt;gleb@redhat.com&gt;
    Link: http://lkml.kernel.org/n/tip-buq1evi5dpykxx7ak6amaam0@git.kernel.org
    [wt: backported to 3.10 only to keep next patch clean]

    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit bb37dac1d940c3bfee710c925460a769c00ad7a7
Author: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
Date:   Sat Apr 27 16:07:49 2013 -0700

    linux/const.h: Add _BITUL() and _BITULL()

    commit 2fc016c5bd8aad2e201cdf71b9fb4573f94775bd upstream.

    Add macros for single bit definitions of a specific type.  These are
    similar to the BIT() macro that already exists, but with a few
    exceptions:

    1. The namespace is such that they can be used in uapi definitions.
    2. The type is set with the _AC() macro to allow it to be used in
       assembly.
    3. The type is explicitly specified to be UL or ULL.

    Signed-off-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
    Link: http://lkml.kernel.org/n/tip-nbca8p7cg6jyjoit7klh3o91@git.kernel.org
    [wt: backported to 3.10 only to keep next patch clean]

    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit fa75115240f1930d2364484047ba6bb88ac2a6d2
Author: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Date:   Thu Feb 25 14:35:57 2016 -0600

    PCI: Disable IO/MEM decoding for devices with non-compliant BARs

    commit b84106b4e2290c081cdab521fa832596cdfea246 upstream.

    The PCI config header (first 64 bytes of each device's config space) is
    defined by the PCI spec so generic software can identify the device and
    manage its usage of I/O, memory, and IRQ resources.

    Some non-spec-compliant devices put registers other than BARs where the
    BARs should be.  When the PCI core sizes these "BARs", the reads and writes
    it does may have unwanted side effects, and the "BAR" may appear to
    describe non-sensical address space.

    Add a flag bit to mark non-compliant devices so we don't touch their BARs.
    Turn off IO/MEM decoding to prevent the devices from consuming address
    space, since we can't read the BARs to find out what that address space
    would be.

    Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
    Tested-by: Andi Kleen &lt;ak@linux.intel.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit a3fda4b44dc0a885a08d634e423cfb7e0dfb99e1
Author: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Date:   Wed Jan 20 12:54:51 2016 +0300

    EDAC, amd64_edac: Shift wrapping issue in f1x_get_norm_dct_addr()

    commit 6f3508f61c814ee852c199988a62bd954c50dfc1 upstream.

    dct_sel_base_off is declared as a u64 but we're only using the lower 32
    bits because of a shift wrapping bug. This can possibly truncate the
    upper 16 bits of DctSelBaseOffset[47:26], causing us to misdecode the CS
    row.

    Fixes: c8e518d5673d ('amd64_edac: Sanitize f10_get_base_addr_offset')
    Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
    Cc: Aravind Gopalakrishnan &lt;Aravind.Gopalakrishnan@amd.com&gt;
    Cc: linux-edac &lt;linux-edac@vger.kernel.org&gt;
    Cc: &lt;stable@vger.kernel.org&gt;
    Link: http://lkml.kernel.org/r/20160120095451.GB19898@mwanda
    Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit f556290916cc40b8504f9f20baf21e7099a77376
Author: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Date:   Mon Mar 21 10:15:25 2016 +0100

    KVM: fix spin_lock_init order on x86

    commit e9ad4ec8379ad1ba6f68b8ca1c26b50b5ae0a327 upstream.

    Moving the initialization earlier is needed in 4.6 because
    kvm_arch_init_vm is now using mmu_lock, causing lockdep to
    complain:

    [  284.440294] INFO: trying to register non-static key.
    [  284.445259] the code is fine but needs lockdep annotation.
    [  284.450736] turning off the locking correctness validator.
    ...
    [  284.528318]  [&lt;ffffffff810aecc3&gt;] lock_acquire+0xd3/0x240
    [  284.533733]  [&lt;ffffffffa0305aa0&gt;] ? kvm_page_track_register_notifier+0x20/0x60 [kvm]
    [  284.541467]  [&lt;ffffffff81715581&gt;] _raw_spin_lock+0x41/0x80
    [  284.546960]  [&lt;ffffffffa0305aa0&gt;] ? kvm_page_track_register_notifier+0x20/0x60 [kvm]
    [  284.554707]  [&lt;ffffffffa0305aa0&gt;] kvm_page_track_register_notifier+0x20/0x60 [kvm]
    [  284.562281]  [&lt;ffffffffa02ece70&gt;] kvm_mmu_init_vm+0x20/0x30 [kvm]
    [  284.568381]  [&lt;ffffffffa02dbf7a&gt;] kvm_arch_init_vm+0x1ea/0x200 [kvm]
    [  284.574740]  [&lt;ffffffffa02bff3f&gt;] kvm_dev_ioctl+0xbf/0x4d0 [kvm]

    However, it also helps fixing a preexisting problem, which is why this
    patch is also good for stable kernels: kvm_create_vm was incrementing
    current-&gt;mm-&gt;mm_count but not decrementing it at the out_err label (in
    case kvm_init_mmu_notifier failed).  The new initialization order makes
    it possible to add the required mmdrop without adding a new error label.

    Reported-by: Borislav Petkov &lt;bp@alien8.de&gt;
    Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit a6821c1796d76e8b51c8ec9f05f603569bd7c918
Author: Radim KrÄmÃ¡Å &lt;rkrcmar@redhat.com&gt;
Date:   Wed Mar 2 22:56:38 2016 +0100

    KVM: i8254: change PIT discard tick policy

    commit 7dd0fdff145c5be7146d0ac06732ae3613412ac1 upstream.

    Discard policy uses ack_notifiers to prevent injection of PIT interrupts
    before EOI from the last one.

    This patch changes the policy to always try to deliver the interrupt,
    which makes a difference when its vector is in ISR.
    Old implementation would drop the interrupt, but proposed one injects to
    IRR, like real hardware would.

    The old policy breaks legacy NMI watchdogs, where PIT is used through
    virtual wire (LVT0): PIT never sends an interrupt before receiving EOI,
    thus a guest deadlock with disabled interrupts will stop NMIs.

    Note that NMI doesn't do EOI, so PIT also had to send a normal interrupt
    through IOAPIC.  (KVM's PIT is deeply rotten and luckily not used much
    in modern systems.)

    Even though there is a chance of regressions, I think we can fix the
    LVT0 NMI bug without introducing a new tick policy.

    Cc: &lt;stable@vger.kernel.org&gt;
    Reported-by: Yuki Shibuya &lt;shibuya.yk@ncos.nec.co.jp&gt;
    Reviewed-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
    Signed-off-by: Radim KrÄmÃ¡Å &lt;rkrcmar@redhat.com&gt;
    Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit d4d37e92e07e914642935865c6316afc3fe15a14
Author: Behan Webster &lt;behanw@converseincode.com&gt;
Date:   Thu Feb 13 12:21:48 2014 -0800

    x86: LLVMLinux: Fix "incomplete type const struct x86cpu_device_id"

    commit c4586256f0c440bc2bdb29d2cbb915f0ca785d26 upstream.

    Similar to the fix in 40413dcb7b273bda681dca38e6ff0bbb3728ef11

    MODULE_DEVICE_TABLE(x86cpu, ...) expects the struct to be called struct
    x86cpu_device_id, and not struct x86_cpu_id which is what is used in the rest
    of the kernel code.  Although gcc seems to ignore this error, clang fails
    without this define to fix the name.

    Code from drivers/thermal/x86_pkg_temp_thermal.c
    static const struct x86_cpu_id __initconst pkg_temp_thermal_ids[] = { ... };
    MODULE_DEVICE_TABLE(x86cpu, pkg_temp_thermal_ids);

    Error from clang:
    drivers/thermal/x86_pkg_temp_thermal.c:577:1: error: variable has
          incomplete type 'const struct x86cpu_device_id'
    MODULE_DEVICE_TABLE(x86cpu, pkg_temp_thermal_ids);
    ^
    include/linux/module.h:145:3: note: expanded from macro
          'MODULE_DEVICE_TABLE'
      MODULE_GENERIC_TABLE(type##_device, name)
      ^
    include/linux/module.h:87:32: note: expanded from macro
          'MODULE_GENERIC_TABLE'
    extern const struct gtype##_id __mod_##gtype##_table            \
                                   ^
    &lt;scratch space&gt;:143:1: note: expanded from here
    __mod_x86cpu_device_table
    ^
    drivers/thermal/x86_pkg_temp_thermal.c:577:1: note: forward declaration of
          'struct x86cpu_device_id'
    include/linux/module.h:145:3: note: expanded from macro
          'MODULE_DEVICE_TABLE'
      MODULE_GENERIC_TABLE(type##_device, name)
      ^
    include/linux/module.h:87:21: note: expanded from macro
          'MODULE_GENERIC_TABLE'
    extern const struct gtype##_id __mod_##gtype##_table            \
                        ^
    &lt;scratch space&gt;:141:1: note: expanded from here
    x86cpu_device_id
    ^
    1 error generated.

    Signed-off-by: Behan Webster &lt;behanw@converseincode.com&gt;
    Signed-off-by: Jan-Simon Möller &lt;dl9pf@gmx.de&gt;
    Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: philm@manjaro.org
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit a4a4f1cd733fe5b345db4e8cc19bb8868d562a8a
Author: Joe Perches &lt;joe@perches.com&gt;
Date:   Thu Jun 25 15:01:02 2015 -0700

    compiler-gcc: integrate the various compiler-gcc[345].h files

    commit cb984d101b30eb7478d32df56a0023e4603cba7f upstream.

    As gcc major version numbers are going to advance rather rapidly in the
    future, there's no real value in separate files for each compiler
    version.

    Deduplicate some of the macros #defined in each file too.

    Neaten comments using normal kernel commenting style.

    Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
    Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
    Cc: Michal Marek &lt;mmarek@suse.cz&gt;
    Cc: Segher Boessenkool &lt;segher@kernel.crashing.org&gt;
    Cc: Sasha Levin &lt;levinsasha928@gmail.com&gt;
    Cc: Anton Blanchard &lt;anton@samba.org&gt;
    Cc: Alan Modra &lt;amodra@gmail.com&gt;
    Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
    Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
    [ philm: backport to 3.10-stable ]
    Signed-off-by: Philip Müller &lt;philm@manjaro.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit 308f438aa483b50a316122af37e215085f073b86
Author: Eryu Guan &lt;guaneryu@gmail.com&gt;
Date:   Sat Mar 12 21:40:32 2016 -0500

    ext4: fix NULL pointer dereference in ext4_mark_inode_dirty()

    commit 5e1021f2b6dff1a86a468a1424d59faae2bc63c1 upstream.

    ext4_reserve_inode_write() in ext4_mark_inode_dirty() could fail on
    error (e.g. EIO) and iloc.bh can be NULL in this case. But the error is
    ignored in the following "if" condition and ext4_expand_extra_isize()
    might be called with NULL iloc.bh set, which triggers NULL pointer
    dereference.

    This is uncovered by commit 8b4953e13f4c ("ext4: reserve code points for
    the project quota feature"), which enlarges the ext4_inode size, and
    run the following script on new kernel but with old mke2fs:

      #/bin/bash
      mnt=/mnt/ext4
      devname=ext4-error
      dev=/dev/mapper/$devname
      fsimg=/home/fs.img

      trap cleanup 0 1 2 3 9 15

      cleanup()
      {
              umount $mnt &gt;/dev/null 2&gt;&amp;1
              dmsetup remove $devname
              losetup -d $backend_dev
              rm -f $fsimg
              exit 0
      }

      rm -f $fsimg
      fallocate -l 1g $fsimg
      backend_dev=`losetup -f --show $fsimg`
      devsize=`blockdev --getsz $backend_dev`

      good_tab="0 $devsize linear $backend_dev 0"
      error_tab="0 $devsize error $backend_dev 0"

      dmsetup create $devname --table "$good_tab"

      mkfs -t ext4 $dev
      mount -t ext4 -o errors=continue,strictatime $dev $mnt

      dmsetup load $devname --table "$error_tab" &amp;&amp; dmsetup resume $devname
      echo 3 &gt; /proc/sys/vm/drop_caches
      ls -l $mnt
      exit 0

    [ Patch changed to simplify the function a tiny bit. -- Ted ]

    Signed-off-by: Eryu Guan &lt;guaneryu@gmail.com&gt;
    Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit c9950bcb9176a740bc82df4174022c974cb601db
Author: Kamal Mostafa &lt;kamal@canonical.com&gt;
Date:   Tue Apr 5 12:24:23 2016 -0700

    x86/iopl/64: Properly context-switch IOPL on Xen PV

    commit b7a584598aea7ca73140cb87b40319944dd3393f upstream.

    From: Andy Lutomirski &lt;luto@kernel.org&gt;

    On Xen PV, regs-&gt;flags doesn't reliably reflect IOPL and the
    exit-to-userspace code doesn't change IOPL.  We need to context
    switch it manually.

    I'm doing this without going through paravirt because this is
    specific to Xen PV.  After the dust settles, we can merge this with
    the 32-bit code, tidy up the iopl syscall implementation, and remove
    the set_iopl pvop entirely.

    Fixes XSA-171.

    Reviewewd-by: Jan Beulich &lt;JBeulich@suse.com&gt;
    Signed-off-by: Andy Lutomirski &lt;luto@kernel.org&gt;
    Cc: Andrew Cooper &lt;andrew.cooper3@citrix.com&gt;
    Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
    Cc: Boris Ostrovsky &lt;boris.ostrovsky@oracle.com&gt;
    Cc: Borislav Petkov &lt;bp@alien8.de&gt;
    Cc: Brian Gerst &lt;brgerst@gmail.com&gt;
    Cc: David Vrabel &lt;david.vrabel@citrix.com&gt;
    Cc: Denys Vlasenko &lt;dvlasenk@redhat.com&gt;
    Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
    Cc: Jan Beulich &lt;JBeulich@suse.com&gt;
    Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
    Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
    Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
    Link: http://lkml.kernel.org/r/693c3bd7aeb4d3c27c92c622b7d0f554a458173c.1458162709.git.luto@kernel.org
    Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
    [ kamal: backport to 3.19-stable: no X86_FEATURE_XENPV so just call
      xen_pv_domain() directly ]
    Acked-by: Andy Lutomirski &lt;luto@kernel.org&gt;
    Signed-off-by: Kamal Mostafa &lt;kamal@canonical.com&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

commit ce9588a047eae53baf1607a408a8d1d5363f5fde
Author: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Date:   Sat Feb 13 02:34:52 2016 +0000

    pipe: Fix buffer offset after partially failed read

    Quoting the RHEL advisory:

    &gt; It was found that the fix for CVE-2015-1805 incorrectly kept buffer
    &gt; offset and buffer length in sync on a failed atomic read, potentially
    &gt; resulting in a pipe buffer state corruption. A local, unprivileged user
    &gt; could use this flaw to crash the system or leak kernel memory to user
    &gt; space. (CVE-2016-0774, Moderate)

    The same flawed fix was applied to stable branches from 2.6.32.y to
    3.14.y inclusive, and I was able to reproduce the issue on 3.2.y.
    We need to give pipe_iov_copy_to_user() a separate offset variable
    and only update the buffer offset if it succeeds.

    References: https://rhn.redhat.com/errata/RHSA-2016-0103.html
    Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>Linux 3.10.96 (accumulative patch)</title>
<updated>2016-08-26T18:53:05+00:00</updated>
<author>
<name>Stefan Guendhoer</name>
<email>stefan@guendhoer.com</email>
</author>
<published>2016-01-29T19:12:57+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=2a9a70fe6a8b2aed9517ed50126f58dcdc38a8cd'/>
<id>urn:sha1:2a9a70fe6a8b2aed9517ed50126f58dcdc38a8cd</id>
<content type='text'>
commit e14ca734b547e3187713441909897aefdf4e4016
Author: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Date:   Thu Jan 28 21:49:55 2016 -0800

    Linux 3.10.96

commit 5d5ee1d4fd77eed290e73df99720ae9e6edb41fa
Author: Guenter Roeck &lt;linux@roeck-us.net&gt;
Date:   Sat Nov 28 08:52:04 2015 -0800

    mn10300: Select CONFIG_HAVE_UID16 to fix build failure

    commit c86576ea114a9a881cf7328dc7181052070ca311 upstream.

    mn10300 builds fail with

    fs/stat.c: In function 'cp_old_stat':
    fs/stat.c:163:2: error: 'old_uid_t' undeclared

    ipc/util.c: In function 'ipc64_perm_to_ipc_perm':
    ipc/util.c:540:2: error: 'old_uid_t' undeclared

    Select CONFIG_HAVE_UID16 and remove local definition of CONFIG_UID16
    to fix the problem.

    Fixes: fbc416ff8618 ("arm64: fix building without CONFIG_UID16")
    Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
    Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
    Acked-by: Acked-by: David Howells &lt;dhowells@redhat.com&gt;
    Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 156057c612507054494e88c04aba7cbd93c11f5c
Author: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Date:   Fri Jul 17 16:23:28 2015 -0700

    openrisc: fix CONFIG_UID16 setting

    commit 04ea1e91f85615318ea91ce8ab50cb6a01ee4005 upstream.

    openrisc-allnoconfig:

      kernel/uid16.c: In function 'SYSC_setgroups16':
      kernel/uid16.c:184:2: error: implicit declaration of function 'groups_alloc'
      kernel/uid16.c:184:13: warning: assignment makes pointer from integer without a cast

    openrisc shouldn't be setting CONFIG_UID16 when CONFIG_MULTIUSER=n.

    Fixes: 2813893f8b197a1 ("kernel: conditionally support non-root users, groups and capabilities")
    Reported-by: Fengguang Wu &lt;fengguang.wu@gmail.com&gt;
    Cc: Iulia Manda &lt;iulia.manda21@gmail.com&gt;
    Cc: Josh Triplett &lt;josh@joshtriplett.org&gt;
    Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
    Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 51bf4d0dab07e893ef515726c939d096c9c85409
Author: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
Date:   Fri Sep 18 16:31:33 2015 -0700

    HID: core: Avoid uninitialized buffer access

    commit 79b568b9d0c7c5d81932f4486d50b38efdd6da6d upstream.

    hid_connect adds various strings to the buffer but they're all
    conditional. You can find circumstances where nothing would be written
    to it but the kernel will still print the supposedly empty buffer with
    printk. This leads to corruption on the console/in the logs.

    Ensure buf is initialized to an empty string.

    Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
    [dvhart: Initialize string to "" rather than assign buf[0] = NULL;]
    Cc: Jiri Kosina &lt;jikos@kernel.org&gt;
    Cc: linux-input@vger.kernel.org
    Signed-off-by: Darren Hart &lt;dvhart@linux.intel.com&gt;
    Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 431124c1d5aac39ed75ceedc825cbc48b020ff87
Author: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Date:   Mon Nov 30 14:47:46 2015 -0500

    parisc iommu: fix panic due to trying to allocate too large region

    commit e46e31a3696ae2d66f32c207df3969613726e636 upstream.

    When using the Promise TX2+ SATA controller on PA-RISC, the system often
    crashes with kernel panic, for example just writing data with the dd
    utility will make it crash.

    Kernel panic - not syncing: drivers/parisc/sba_iommu.c: I/O MMU @ 000000000000a000 is out of mapping resources

    CPU: 0 PID: 18442 Comm: mkspadfs Not tainted 4.4.0-rc2 #2
    Backtrace:
     [&lt;000000004021497c&gt;] show_stack+0x14/0x20
     [&lt;0000000040410bf0&gt;] dump_stack+0x88/0x100
     [&lt;000000004023978c&gt;] panic+0x124/0x360
     [&lt;0000000040452c18&gt;] sba_alloc_range+0x698/0x6a0
     [&lt;0000000040453150&gt;] sba_map_sg+0x260/0x5b8
     [&lt;000000000c18dbb4&gt;] ata_qc_issue+0x264/0x4a8 [libata]
     [&lt;000000000c19535c&gt;] ata_scsi_translate+0xe4/0x220 [libata]
     [&lt;000000000c19a93c&gt;] ata_scsi_queuecmd+0xbc/0x320 [libata]
     [&lt;0000000040499bbc&gt;] scsi_dispatch_cmd+0xfc/0x130
     [&lt;000000004049da34&gt;] scsi_request_fn+0x6e4/0x970
     [&lt;00000000403e95a8&gt;] __blk_run_queue+0x40/0x60
     [&lt;00000000403e9d8c&gt;] blk_run_queue+0x3c/0x68
     [&lt;000000004049a534&gt;] scsi_run_queue+0x2a4/0x360
     [&lt;000000004049be68&gt;] scsi_end_request+0x1a8/0x238
     [&lt;000000004049de84&gt;] scsi_io_completion+0xfc/0x688
     [&lt;0000000040493c74&gt;] scsi_finish_command+0x17c/0x1d0

    The cause of the crash is not exhaustion of the IOMMU space, there is
    plenty of free pages. The function sba_alloc_range is called with size
    0x11000, thus the pages_needed variable is 0x11. The function
    sba_search_bitmap is called with bits_wanted 0x11 and boundary size is
    0x10 (because dma_get_seg_boundary(dev) returns 0xffff).

    The function sba_search_bitmap attempts to allocate 17 pages that must not
    cross 16-page boundary - it can't satisfy this requirement
    (iommu_is_span_boundary always returns true) and fails even if there are
    many free entries in the IOMMU space.

    How did it happen that we try to allocate 17 pages that don't cross
    16-page boundary? The cause is in the function iommu_coalesce_chunks. This
    function tries to coalesce adjacent entries in the scatterlist. The
    function does several checks if it may coalesce one entry with the next,
    one of those checks is this:

    	if (startsg-&gt;length + dma_len &gt; max_seg_size)
    		break;

    When it finishes coalescing adjacent entries, it allocates the mapping:

    sg_dma_len(contig_sg) = dma_len;
    dma_len = ALIGN(dma_len + dma_offset, IOVP_SIZE);
    sg_dma_address(contig_sg) =
    	PIDE_FLAG
    	| (iommu_alloc_range(ioc, dev, dma_len) &lt;&lt; IOVP_SHIFT)
    	| dma_offset;

    It is possible that (startsg-&gt;length + dma_len &gt; max_seg_size) is false
    (we are just near the 0x10000 max_seg_size boundary), so the funcion
    decides to coalesce this entry with the next entry. When the coalescing
    succeeds, the function performs
    	dma_len = ALIGN(dma_len + dma_offset, IOVP_SIZE);
    And now, because of non-zero dma_offset, dma_len is greater than 0x10000.
    iommu_alloc_range (a pointer to sba_alloc_range) is called and it attempts
    to allocate 17 pages for a device that must not cross 16-page boundary.

    To fix the bug, we must make sure that dma_len after addition of
    dma_offset and alignment doesn't cross the segment boundary. I.e. change
    	if (startsg-&gt;length + dma_len &gt; max_seg_size)
    		break;
    to
    	if (ALIGN(dma_len + dma_offset + startsg-&gt;length, IOVP_SIZE) &gt; max_seg_size)
    		break;

    This patch makes this change (it precalculates max_seg_boundary at the
    beginning of the function iommu_coalesce_chunks). I also added a check
    that the mapping length doesn't exceed dma_get_seg_boundary(dev) (it is
    not needed for Promise TX2+ SATA, but it may be needed for other devices
    that have dma_get_seg_boundary lower than dma_get_max_seg_size).

    Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
    Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit c8f487a49a527990b29795f22884c3af02b94d97
Author: Will Deacon &lt;will.deacon@arm.com&gt;
Date:   Thu Dec 10 16:05:36 2015 +0000

    arm64: mm: ensure that the zero page is visible to the page table walker

    commit 32d6397805d00573ce1fa55f408ce2bca15b0ad3 upstream.

    In paging_init, we allocate the zero page, memset it to zero and then
    point TTBR0 to it in order to avoid speculative fetches through the
    identity mapping.

    In order to guarantee that the freshly zeroed page is indeed visible to
    the page table walker, we need to execute a dsb instruction prior to
    writing the TTBR.

    Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit c2db3a421b92e6f616405b47cfc03ff249492a34
Author: John Blackwood &lt;john.blackwood@ccur.com&gt;
Date:   Mon Dec 7 11:50:34 2015 +0000

    arm64: Clear out any singlestep state on a ptrace detach operation

    commit 5db4fd8c52810bd9740c1240ebf89223b171aa70 upstream.

    Make sure to clear out any ptrace singlestep state when a ptrace(2)
    PTRACE_DETACH call is made on arm64 systems.

    Otherwise, the previously ptraced task will die off with a SIGTRAP
    signal if the debugger just previously singlestepped the ptraced task.

    Signed-off-by: John Blackwood &lt;john.blackwood@ccur.com&gt;
    [will: added comment to justify why this is in the arch code]
    Signed-off-by: Will Deacon &lt;will.deacon@arm.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 7c2543203b59387f079afc85a03a87b15d5838b7
Author: Arnd Bergmann &lt;arnd@arndb.de&gt;
Date:   Fri Nov 20 12:12:21 2015 +0100

    arm64: fix building without CONFIG_UID16

    commit fbc416ff86183e2203cdf975e2881d7c164b0271 upstream.

    As reported by Michal Simek, building an ARM64 kernel with CONFIG_UID16
    disabled currently fails because the system call table still needs to
    reference the individual function entry points that are provided by
    kernel/sys_ni.c in this case, and the declarations are hidden inside
    of #ifdef CONFIG_UID16:

    arch/arm64/include/asm/unistd32.h:57:8: error: 'sys_lchown16' undeclared here (not in a function)
     __SYSCALL(__NR_lchown, sys_lchown16)

    I believe this problem only exists on ARM64, because older architectures
    tend to not need declarations when their system call table is built
    in assembly code, while newer architectures tend to not need UID16
    support. ARM64 only uses these system calls for compatibility with
    32-bit ARM binaries.

    This changes the CONFIG_UID16 check into CONFIG_HAVE_UID16, which is
    set unconditionally on ARM64 with CONFIG_COMPAT, so we see the
    declarations whenever we need them, but otherwise the behavior is
    unchanged.

    Fixes: af1839eb4bd4 ("Kconfig: clean up the long arch list for the UID16 config option")
    Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
    Acked-by: Will Deacon &lt;will.deacon@arm.com&gt;
    Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 288ac5089706c898f6541da45d62fdccfa5a11a6
Author: Ulrich Weigand &lt;ulrich.weigand@de.ibm.com&gt;
Date:   Tue Jan 12 23:14:22 2016 +1100

    scripts/recordmcount.pl: support data in text section on powerpc

    commit 2e50c4bef77511b42cc226865d6bc568fa7f8769 upstream.

    If a text section starts out with a data blob before the first
    function start label, disassembly parsing doing in recordmcount.pl
    gets confused on powerpc, leading to creation of corrupted module
    objects.

    This was not a problem so far since the compiler would never create
    such text sections.  However, this has changed with a recent change
    in GCC 6 to support distances of &gt; 2GB between a function and its
    assoicated TOC in the ELFv2 ABI, exposing this problem.

    There is already code in recordmcount.pl to handle such data blobs
    on the sparc64 platform.  This patch uses the same method to handle
    those on powerpc as well.

    Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
    Signed-off-by: Ulrich Weigand &lt;ulrich.weigand@de.ibm.com&gt;
    Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 5bb9a369bd74bfc834934970f0422d0afb8768ea
Author: Boqun Feng &lt;boqun.feng@gmail.com&gt;
Date:   Mon Nov 2 09:30:32 2015 +0800

    powerpc: Make {cmp}xchg* and their atomic_ versions fully ordered

    commit 81d7a3294de7e9828310bbf986a67246b13fa01e upstream.

    According to memory-barriers.txt, xchg*, cmpxchg* and their atomic_
    versions all need to be fully ordered, however they are now just
    RELEASE+ACQUIRE, which are not fully ordered.

    So also replace PPC_RELEASE_BARRIER and PPC_ACQUIRE_BARRIER with
    PPC_ATOMIC_ENTRY_BARRIER and PPC_ATOMIC_EXIT_BARRIER in
    __{cmp,}xchg_{u32,u64} respectively to guarantee fully ordered semantics
    of atomic{,64}_{cmp,}xchg() and {cmp,}xchg(), as a complement of commit
    b97021f85517 ("powerpc: Fix atomic_xxx_return barrier semantics")

    This patch depends on patch "powerpc: Make value-returning atomics fully
    ordered" for PPC_ATOMIC_ENTRY_BARRIER definition.

    Signed-off-by: Boqun Feng &lt;boqun.feng@gmail.com&gt;
    Reviewed-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
    Acked-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
    Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 5ac5ac96bc3bfb5e89d174f7a43fe141a7a695b3
Author: Boqun Feng &lt;boqun.feng@gmail.com&gt;
Date:   Mon Nov 2 09:30:31 2015 +0800

    powerpc: Make value-returning atomics fully ordered

    commit 49e9cf3f0c04bf76ffa59242254110309554861d upstream.

    According to memory-barriers.txt:

    &gt; Any atomic operation that modifies some state in memory and returns
    &gt; information about the state (old or new) implies an SMP-conditional
    &gt; general memory barrier (smp_mb()) on each side of the actual
    &gt; operation ...

    Which mean these operations should be fully ordered. However on PPC,
    PPC_ATOMIC_ENTRY_BARRIER is the barrier before the actual operation,
    which is currently "lwsync" if SMP=y. The leading "lwsync" can not
    guarantee fully ordered atomics, according to Paul Mckenney:

    https://lkml.org/lkml/2015/10/14/970

    To fix this, we define PPC_ATOMIC_ENTRY_BARRIER as "sync" to guarantee
    the fully-ordered semantics.

    This also makes futex atomics fully ordered, which can avoid possible
    memory ordering problems if userspace code relies on futex system call
    for fully ordered semantics.

    Fixes: b97021f85517 ("powerpc: Fix atomic_xxx_return barrier semantics")
    Signed-off-by: Boqun Feng &lt;boqun.feng@gmail.com&gt;
    Reviewed-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
    Acked-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
    Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 5d64942934f0e0b813a0eb4a605551edb12cb416
Author: Michael Neuling &lt;mikey@neuling.org&gt;
Date:   Thu Nov 19 15:44:44 2015 +1100

    powerpc/tm: Block signal return setting invalid MSR state

    commit d2b9d2a5ad5ef04ff978c9923d19730cb05efd55 upstream.

    Currently we allow both the MSR T and S bits to be set by userspace on
    a signal return.  Unfortunately this is a reserved configuration and
    will cause a TM Bad Thing exception if attempted (via rfid).

    This patch checks for this case in both the 32 and 64 bit signals
    code.  If both T and S are set, we mark the context as invalid.

    Found using a syscall fuzzer.

    Fixes: 2b0a576d15e0 ("powerpc: Add new transactional memory state to the signal context")
    Signed-off-by: Michael Neuling &lt;mikey@neuling.org&gt;
    Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit c496409d87448b18df813332cf40bfecae4e4dc7
Author: Ido Schimmel &lt;idosch@mellanox.com&gt;
Date:   Mon Jan 18 17:30:22 2016 +0200

    team: Replace rcu_read_lock with a mutex in team_vlan_rx_kill_vid

    [ Upstream commit 60a6531bfe49555581ccd65f66a350cc5693fcde ]

    We can't be within an RCU read-side critical section when deleting
    VLANs, as underlying drivers might sleep during the hardware operation.
    Therefore, replace the RCU critical section with a mutex. This is
    consistent with team_vlan_rx_add_vid.

    Fixes: 3d249d4ca7d0 ("net: introduce ethernet teaming device")
    Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
    Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit f82699de104eaf8a7ffc2849a566a94818dd8a3c
Author: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Date:   Sun Nov 1 16:22:53 2015 +0000

    ppp, slip: Validate VJ compression slot parameters completely

    [ Upstream commit 4ab42d78e37a294ac7bc56901d563c642e03c4ae ]

    Currently slhc_init() treats out-of-range values of rslots and tslots
    as equivalent to 0, except that if tslots is too large it will
    dereference a null pointer (CVE-2015-7799).

    Add a range-check at the top of the function and make it return an
    ERR_PTR() on error instead of NULL.  Change the callers accordingly.

    Compile-tested only.

    Reported-by: 郭永刚 &lt;guoyonggang@360.cn&gt;
    References: http://article.gmane.org/gmane.comp.security.oss.general/17908
    Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 069872265c33b108afcc613b489cb3070437c249
Author: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Date:   Sun Nov 1 16:21:24 2015 +0000

    isdn_ppp: Add checks for allocation failure in isdn_ppp_open()

    [ Upstream commit 0baa57d8dc32db78369d8b5176ef56c5e2e18ab3 ]

    Compile-tested only.

    Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 4734f5361b3c91c7d4a606f06cc252d02ba95a03
Author: Eric Dumazet &lt;edumazet@google.com&gt;
Date:   Tue Jan 12 08:58:00 2016 -0800

    phonet: properly unshare skbs in phonet_rcv()

    [ Upstream commit 7aaed57c5c2890634cfadf725173c7c68ea4cb4f ]

    Ivaylo Dimitrov reported a regression caused by commit 7866a621043f
    ("dev: add per net_device packet type chains").

    skb-&gt;dev becomes NULL and we crash in __netif_receive_skb_core().

    Before above commit, different kind of bugs or corruptions could happen
    without major crash.

    But the root cause is that phonet_rcv() can queue skb without checking
    if skb is shared or not.

    Many thanks to Ivaylo Dimitrov for his help, diagnosis and tests.

    Reported-by: Ivaylo Dimitrov &lt;ivo.g.dimitrov.75@gmail.com&gt;
    Tested-by: Ivaylo Dimitrov &lt;ivo.g.dimitrov.75@gmail.com&gt;
    Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
    Cc: Remi Denis-Courmont &lt;courmisch@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;

commit 3ed860661b69ba964b705908370f61f3b59e7e44
Author: Neal Cardwell &lt;ncardwell@google.com&gt;
Date:   Mon Jan 11 13:42:43 2016 -0500

    tcp_yeah: don't set ssthresh below 2

    [ Upstream commit 83d15e70c4d8909d722c0d64747d8fb42e38a48f ]

    For tcp_yeah, use an ssthresh floor of 2, the same floor used by Reno
    and CUBIC, per RFC 5681 (equation 4).

    tcp_yeah_ssthresh() was sometimes returning a 0 or negative ssthresh
    value if the intended reduction is as big or bigger than the current
    cwnd. Congestion control modules should never return a zero or
    negative ssthresh. A zero ssthresh generally results in a zero cwnd,
    causing the connection to stall. A negative ssthresh value will be
    interpreted as a u32 and will set a target cwnd for PRR near 4
    billion.

    Oleksandr Natalenko reported that a system using tcp_yeah with ECN
    could see a warning about a prior_cwnd of 0 in
    tcp_cwnd_reduction(). Testing verified that this was due to
    tcp_yeah_ssthresh() misbehaving in this way.

    Reported-by: Oleksandr Natalenko &lt;oleksandr@natalenko.name&gt;
    Signed-off-by: Neal Cardwell &lt;ncardwell@google.com&gt;
    Signed-off-by: Yuchung Cheng &lt;ycheng@google.com&gt;
    Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 439af14e3bc177dedd4e5b96c8ca17de5480c6cf
Author: Francesco Ruggeri &lt;fruggeri@aristanetworks.com&gt;
Date:   Wed Jan 6 00:18:48 2016 -0800

    net: possible use after free in dst_release

    [ Upstream commit 07a5d38453599052aff0877b16bb9c1585f08609 ]

    dst_release should not access dst-&gt;flags after decrementing
    __refcnt to 0. The dst_entry may be in dst_busy_list and
    dst_gc_task may dst_destroy it before dst_release gets a chance
    to access dst-&gt;flags.

    Fixes: d69bbf88c8d0 ("net: fix a race in dst_release()")
    Fixes: 27b75c95f10d ("net: avoid RCU for NOCACHE dst")
    Signed-off-by: Francesco Ruggeri &lt;fruggeri@arista.com&gt;
    Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit a15061500d6a7290c03c8aae5863835865bf8312
Author: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Date:   Tue Jan 5 10:46:00 2016 +0100

    bridge: Only call /sbin/bridge-stp for the initial network namespace

    [ Upstream commit ff62198553e43cdffa9d539f6165d3e83f8a42bc ]

    [I stole this patch from Eric Biederman. He wrote:]

    &gt; There is no defined mechanism to pass network namespace information
    &gt; into /sbin/bridge-stp therefore don't even try to invoke it except
    &gt; for bridge devices in the initial network namespace.
    &gt;
    &gt; It is possible for unprivileged users to cause /sbin/bridge-stp to be
    &gt; invoked for any network device name which if /sbin/bridge-stp does not
    &gt; guard against unreasonable arguments or being invoked twice on the
    &gt; same network device could cause problems.

    [Hannes: changed patch using netns_eq]

    Cc: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
    Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
    Signed-off-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit df87da0783c4492b944badfea9d5c3c56b834697
Author: willy tarreau &lt;w@1wt.eu&gt;
Date:   Sun Jan 10 07:54:56 2016 +0100

    unix: properly account for FDs passed over unix sockets

    [ Upstream commit 712f4aad406bb1ed67f3f98d04c044191f0ff593 ]

    It is possible for a process to allocate and accumulate far more FDs than
    the process' limit by sending them over a unix socket then closing them
    to keep the process' fd count low.

    This change addresses this problem by keeping track of the number of FDs
    in flight per user and preventing non-privileged processes from having
    more FDs in flight than their configured FD limit.

    Reported-by: socketpair@gmail.com
    Reported-by: Tetsuo Handa &lt;penguin-kernel@I-love.SAKURA.ne.jp&gt;
    Mitigates: CVE-2013-4312 (Linux 2.0+)
    Suggested-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
    Acked-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 644acb9f488360cb40653f027dc5278021ed1383
Author: Florian Westphal &lt;fw@strlen.de&gt;
Date:   Thu Dec 31 14:26:33 2015 +0100

    connector: bump skb-&gt;users before callback invocation

    [ Upstream commit 55285bf09427c5abf43ee1d54e892f352092b1f1 ]

    Dmitry reports memleak with syskaller program.
    Problem is that connector bumps skb usecount but might not invoke callback.

    So move skb_get to where we invoke the callback.

    Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 4a3411cc43643e671f885fb505a48b43564bc6d5
Author: Xin Long &lt;lucien.xin@gmail.com&gt;
Date:   Tue Dec 29 17:49:25 2015 +0800

    sctp: sctp should release assoc when sctp_make_abort_user return NULL in sctp_close

    [ Upstream commit 068d8bd338e855286aea54e70d1c101569284b21 ]

    In sctp_close, sctp_make_abort_user may return NULL because of memory
    allocation failure. If this happens, it will bypass any state change
    and never free the assoc. The assoc has no chance to be freed and it
    will be kept in memory with the state it had even after the socket is
    closed by sctp_close().

    So if sctp_make_abort_user fails to allocate memory, we should abort
    the asoc via sctp_primitive_ABORT as well. Just like the annotation in
    sctp_sf_cookie_wait_prm_abort and sctp_sf_do_9_1_prm_abort said,
    "Even if we can't send the ABORT due to low memory delete the TCB.
    This is a departure from our typical NOMEM handling".

    But then the chunk is NULL (low memory) and the SCTP_CMD_REPLY cmd would
    dereference the chunk pointer, and system crash. So we should add
    SCTP_CMD_REPLY cmd only when the chunk is not NULL, just like other
    places where it adds SCTP_CMD_REPLY cmd.

    Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
    Acked-by: Marcelo Ricardo Leitner &lt;marcelo.leitner@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;

commit 071415573bb38f530a6112af38daaafbe5147d10
Author: Andrey Ryabinin &lt;aryabinin@virtuozzo.com&gt;
Date:   Mon Dec 21 12:54:45 2015 +0300

    ipv6/addrlabel: fix ip6addrlbl_get()

    [ Upstream commit e459dfeeb64008b2d23bdf600f03b3605dbb8152 ]

    ip6addrlbl_get() has never worked. If ip6addrlbl_hold() succeeded,
    ip6addrlbl_get() will exit with '-ESRCH'. If ip6addrlbl_hold() failed,
    ip6addrlbl_get() will use about to be free ip6addrlbl_entry pointer.

    Fix this by inverting ip6addrlbl_hold() check.

    Fixes: 2a8cc6c89039 ("[IPV6] ADDRCONF: Support RFC3484 configurable address selection policy table.")
    Signed-off-by: Andrey Ryabinin &lt;aryabinin@virtuozzo.com&gt;
    Reviewed-by: Cong Wang &lt;cwang@twopensource.com&gt;
    Acked-by: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.org&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 927905f5ac0d1213ceb79d3963b46b393adf87b0
Author: Vijay Pandurangan &lt;vijayp@vijayp.ca&gt;
Date:   Fri Dec 18 14:34:59 2015 -0500

    veth: don’t modify ip_summed; doing so treats packets with bad checksums as good.

    [ Upstream commit ce8c839b74e3017996fad4e1b7ba2e2625ede82f ]

    Packets that arrive from real hardware devices have ip_summed ==
    CHECKSUM_UNNECESSARY if the hardware verified the checksums, or
    CHECKSUM_NONE if the packet is bad or it was unable to verify it. The
    current version of veth will replace CHECKSUM_NONE with
    CHECKSUM_UNNECESSARY, which causes corrupt packets routed from hardware to
    a veth device to be delivered to the application. This caused applications
    at Twitter to receive corrupt data when network hardware was corrupting
    packets.

    We believe this was added as an optimization to skip computing and
    verifying checksums for communication between containers. However, locally
    generated packets have ip_summed == CHECKSUM_PARTIAL, so the code as
    written does nothing for them. As far as we can tell, after removing this
    code, these packets are transmitted from one stack to another unmodified
    (tcpdump shows invalid checksums on both sides, as expected), and they are
    delivered correctly to applications. We didn’t test every possible network
    configuration, but we tried a few common ones such as bridging containers,
    using NAT between the host and a container, and routing from hardware
    devices to containers. We have effectively deployed this in production at
    Twitter (by disabling RX checksum offloading on veth devices).

    This code dates back to the first version of the driver, commit
    &lt;e314dbdc1c0dc6a548ecf&gt; ("[NET]: Virtual ethernet device driver"), so I
    suspect this bug occurred mostly because the driver API has evolved
    significantly since then. Commit &lt;0b7967503dc97864f283a&gt; ("net/veth: Fix
    packet checksumming") (in December 2010) fixed this for packets that get
    created locally and sent to hardware devices, by not changing
    CHECKSUM_PARTIAL. However, the same issue still occurs for packets coming
    in from hardware devices.

    Co-authored-by: Evan Jones &lt;ej@evanjones.ca&gt;
    Signed-off-by: Evan Jones &lt;ej@evanjones.ca&gt;
    Cc: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
    Cc: Phil Sutter &lt;phil@nwl.cc&gt;
    Cc: Toshiaki Makita &lt;makita.toshiaki@lab.ntt.co.jp&gt;
    Cc: netdev@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Vijay Pandurangan &lt;vijayp@vijayp.ca&gt;
    Acked-by: Cong Wang &lt;cwang@twopensource.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit ad55109f9261ff8f317a7df54eb12f842df326f6
Author: Oliver Neukum &lt;oneukum@suse.com&gt;
Date:   Thu Dec 3 15:03:34 2015 +0100

    xhci: refuse loading if nousb is used

    commit 1eaf35e4dd592c59041bc1ed3248c46326da1f5f upstream.

    The module should fail to load.

    Signed-off-by: Oliver Neukum &lt;oneukum@suse.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit c4924b5c530a9fdd4df55868e0bbb593d91fe444
Author: Oliver Freyermuth &lt;o.freyermuth@googlemail.com&gt;
Date:   Mon Dec 28 18:37:38 2015 +0100

    USB: cp210x: add ID for ELV Marble Sound Board 1

    commit f7d7f59ab124748156ea551edf789994f05da342 upstream.

    Add the USB device ID for ELV Marble Sound Board 1.

    Signed-off-by: Oliver Freyermuth &lt;o.freyermuth@googlemail.com&gt;
    Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 5dbf71c9f68021abb944cca8184b9bb4267c7b9d
Author: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Date:   Wed Dec 16 14:06:37 2015 +0300

    USB: ipaq.c: fix a timeout loop

    commit abdc9a3b4bac97add99e1d77dc6d28623afe682b upstream.

    The code expects the loop to end with "retries" set to zero but, because
    it is a post-op, it will end set to -1.  I have fixed this by moving the
    decrement inside the loop.

    Fixes: 014aa2a3c32e ('USB: ipaq: minor ipaq_open() cleanup.')
    Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit e6a13dd47bb6be949f69630462227a37148bc5b2
Author: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Date:   Fri Dec 4 15:53:43 2015 +0200

    usb: xhci: fix config fail of FS hub behind a HS hub with MTT

    commit 096b110a3dd3c868e4610937c80d2e3f3357c1a9 upstream.

    if a full speed hub connects to a high speed hub which
    supports MTT, the MTT field of its slot context will be set
    to 1 when xHCI driver setups an xHCI virtual device in
    xhci_setup_addressable_virt_dev(); once usb core fetch its
    hub descriptor, and need to update the xHC's internal data
    structures for the device, the HUB field of its slot context
    will be set to 1 too, meanwhile MTT is also set before,
    this will cause configure endpoint command fail, so in the
    case, we should clear MTT to 0 for full speed hub according
    to section 6.2.2

    Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
    Signed-off-by: Mathias Nyman &lt;mathias.nyman@linux.intel.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 9a76e683b64361450f3e331dd6634f5aa39ea51b
Author: Vinod Koul &lt;vinod.koul@intel.com&gt;
Date:   Thu Jan 7 21:48:14 2016 +0530

    ASoC: compress: Fix compress device direction check

    commit a1068045883ed4a18363a4ebad0c3d55e473b716 upstream.

    The detection of direction for compress was only taking into account codec
    capabilities and not CPU ones. Fix this by checking the CPU side capabilities
    as well

    Tested-by: Ashish Panwar &lt;ashish.panwar@intel.com&gt;
    Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
    Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 1702ac2faee1e7c4c424ef32f66a56bc9a8af3b9
Author: Nikesh Oswal &lt;Nikesh.Oswal@cirrus.com&gt;
Date:   Wed Dec 23 14:18:05 2015 +0000

    ASoC: arizona: Fix bclk for sample rates that are multiple of 4kHz

    commit e73694d871867cae8471d2350ce89acb38bc2b63 upstream.

    For a sample rate of 12kHz the bclk was taken from the 44.1kHz table as
    we test for a multiple of 8kHz. This patch fixes this issue by testing
    for multiples of 4kHz instead.

    Signed-off-by: Nikesh Oswal &lt;Nikesh.Oswal@cirrus.com&gt;
    Signed-off-by: Charles Keepax &lt;ckeepax@opensource.wolfsonmicro.com&gt;
    Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 48436c8169b1eff8db6e2833057f630915e3058c
Author: Sachin Pandhare &lt;sachinpandhare@gmail.com&gt;
Date:   Tue Nov 10 23:38:02 2015 +0530

    ASoC: wm8962: correct addresses for HPF_C_0/1

    commit e9f96bc53c1b959859599cb30ce6fd4fbb4448c2 upstream.

    From datasheet:
    R17408 (4400h) HPF_C_1
    R17409 (4401h) HPF_C_0
    17048 -&gt; 17408 (0x4400)
    17049 -&gt; 17409 (0x4401)

    Signed-off-by: Sachin Pandhare &lt;sachinpandhare@gmail.com&gt;
    Acked-by: Charles Keepax &lt;ckeepax@opensource.wolfsonmicro.com&gt;
    Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 2f659690fcef3c160dcd2557e724dc68ede8d90b
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Mon Jan 18 14:12:40 2016 +0100

    ALSA: control: Avoid kernel warnings from tlv ioctl with numid 0

    commit c0bcdbdff3ff73a54161fca3cb8b6cdbd0bb8762 upstream.

    When a TLV ioctl with numid zero is handled, the driver may spew a
    kernel warning with a stack trace at each call.  The check was
    intended obviously only for a kernel driver, but not for a user
    interaction.  Let's fix it.

    This was spotted by syzkaller fuzzer.

    Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit d24455ed4c3e2220da50347700fa8aba6c3ed065
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Mon Jan 18 13:52:47 2016 +0100

    ALSA: hrtimer: Fix stall by hrtimer_cancel()

    commit 2ba1fe7a06d3624f9a7586d672b55f08f7c670f3 upstream.

    hrtimer_cancel() waits for the completion from the callback, thus it
    must not be called inside the callback itself.  This was already a
    problem in the past with ALSA hrtimer driver, and the early commit
    [fcfdebe70759: ALSA: hrtimer - Fix lock-up] tried to address it.

    However, the previous fix is still insufficient: it may still cause a
    lockup when the ALSA timer instance reprograms itself in its callback.
    Then it invokes the start function even in snd_timer_interrupt() that
    is called in hrtimer callback itself, results in a CPU stall.  This is
    no hypothetical problem but actually triggered by syzkaller fuzzer.

    This patch tries to fix the issue again.  Now we call
    hrtimer_try_to_cancel() at both start and stop functions so that it
    won't fall into a deadlock, yet giving some chance to cancel the queue
    if the functions have been called outside the callback.  The proper
    hrtimer_cancel() is called in anyway at closing, so this should be
    enough.

    Reported-and-tested-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 425b1bc0dddfaf466ff882f7f78dc5c78de9b97d
Author: Nicolas Boichat &lt;drinkcat@chromium.org&gt;
Date:   Mon Jan 18 21:35:00 2016 +0800

    ALSA: pcm: Fix snd_pcm_hw_params struct copy in compat mode

    commit 43c54b8c7cfe22f868a751ba8a59abf1724160b1 upstream.

    This reverts one hunk of
    commit ef44a1ec6eee ("ALSA: sound/core: use memdup_user()"), which
    replaced a number of kmalloc followed by memcpy with memdup calls.

    In this case, we are copying from a struct snd_pcm_hw_params32 to
    a struct snd_pcm_hw_params, but the latter is 4 bytes longer than
    the 32-bit version, so we need to separate kmalloc and copy calls.

    This actually leads to an out-of-bounds memory access later on
    in sound/soc/soc-pcm.c:soc_pcm_hw_params() (detected using KASan).

    Fixes: ef44a1ec6eee ('ALSA: sound/core: use memdup_user()')
    Signed-off-by: Nicolas Boichat &lt;drinkcat@chromium.org&gt;
    Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 870566bafcc9e806816048f9a1d952300e8dcba5
Author: Nicolas Boichat &lt;drinkcat@chromium.org&gt;
Date:   Mon Jan 18 21:35:01 2016 +0800

    ALSA: seq: Fix snd_seq_call_port_info_ioctl in compat mode

    commit 9586495dc3011a80602329094e746dbce16cb1f1 upstream.

    This reverts one hunk of
    commit ef44a1ec6eee ("ALSA: sound/core: use memdup_user()"), which
    replaced a number of kmalloc followed by memcpy with memdup calls.

    In this case, we are copying from a struct snd_seq_port_info32 to a
    struct snd_seq_port_info, but the latter is 4 bytes longer than the
    32-bit version, so we need to separate kmalloc and copy calls.

    Fixes: ef44a1ec6eee ('ALSA: sound/core: use memdup_user()')
    Signed-off-by: Nicolas Boichat &lt;drinkcat@chromium.org&gt;
    Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit fd6788c0ba7aaa46f47f90166759ae32c06c5abd
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Wed Jan 13 21:35:06 2016 +0100

    ALSA: timer: Fix double unlink of active_list

    commit ee8413b01045c74340aa13ad5bdf905de32be736 upstream.

    ALSA timer instance object has a couple of linked lists and they are
    unlinked unconditionally at snd_timer_stop().  Meanwhile
    snd_timer_interrupt() unlinks it, but it calls list_del() which leaves
    the element list itself unchanged.  This ends up with unlinking twice,
    and it was caught by syzkaller fuzzer.

    The fix is to use list_del_init() variant properly there, too.

    Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Tested-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit a49bdee155fde66928197108cece545d49edec17
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Wed Jan 13 17:48:01 2016 +0100

    ALSA: timer: Fix race among timer ioctls

    commit af368027a49a751d6ff4ee9e3f9961f35bb4fede upstream.

    ALSA timer ioctls have an open race and this may lead to a
    use-after-free of timer instance object.  A simplistic fix is to make
    each ioctl exclusive.  We have already tread_sem for controlling the
    tread, and extend this as a global mutex to be applied to each ioctl.

    The downside is, of course, the worse concurrency.  But these ioctls
    aren't to be parallel accessible, in anyway, so it should be fine to
    serialize there.

    Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Tested-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit ea83c96e843d4e48db874e58ec6a261d94ce7077
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Thu Jan 14 16:30:58 2016 +0100

    ALSA: timer: Harden slave timer list handling

    commit b5a663aa426f4884c71cd8580adae73f33570f0d upstream.

    A slave timer instance might be still accessible in a racy way while
    operating the master instance as it lacks of locking.  Since the
    master operation is mostly protected with timer-&gt;lock, we should cope
    with it while changing the slave instance, too.  Also, some linked
    lists (active_list and ack_list) of slave instances aren't unlinked
    immediately at stopping or closing, and this may lead to unexpected
    accesses.

    This patch tries to address these issues.  It adds spin lock of
    timer-&gt;lock (either from master or slave, which is equivalent) in a
    few places.  For avoiding a deadlock, we ensure that the global
    slave_active_lock is always locked at first before each timer lock.

    Also, ack and active_list of slave instances are properly unlinked at
    snd_timer_stop() and snd_timer_close().

    Last but not least, remove the superfluous call of _snd_timer_stop()
    at removing slave links.  This is a noop, and calling it may confuse
    readers wrt locking.  Further cleanup will follow in a later patch.

    Actually we've got reports of use-after-free by syzkaller fuzzer, and
    this hopefully fixes these issues.

    Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 6e29b1cc3071f1c41a943e8e873f34e454428bda
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Tue Jan 12 15:36:27 2016 +0100

    ALSA: seq: Fix race at timer setup and close

    commit 3567eb6af614dac436c4b16a8d426f9faed639b3 upstream.

    ALSA sequencer code has an open race between the timer setup ioctl and
    the close of the client.  This was triggered by syzkaller fuzzer, and
    a use-after-free was caught there as a result.

    This patch papers over it by adding a proper queue-&gt;timer_mutex lock
    around the timer-related calls in the relevant code path.

    Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Tested-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit b85a6198e28f573d6df99522782aa09948258d19
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Tue Jan 12 12:38:02 2016 +0100

    ALSA: seq: Fix missing NULL check at remove_events ioctl

    commit 030e2c78d3a91dd0d27fef37e91950dde333eba1 upstream.

    snd_seq_ioctl_remove_events() calls snd_seq_fifo_clear()
    unconditionally even if there is no FIFO assigned, and this leads to
    an Oops due to NULL dereference.  The fix is just to add a proper NULL
    check.

    Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Tested-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 9cb16b5349c47c2ce33d34d57da14a8f071175bf
Author: Mario Kleiner &lt;mario.kleiner.de@gmail.com&gt;
Date:   Tue Dec 22 00:45:43 2015 +0100

    ALSA: hda/realtek - Fix silent headphone output on MacPro 4,1 (v2)

    commit 9f660a1c43890c2cdd1f423fd73654e7ca08fe56 upstream.

    Without this patch, internal speaker and line-out work,
    but front headphone output jack stays silent on the
    Mac Pro 4,1.

    This code path also gets executed on the MacPro 5,1 due
    to identical codec SSID, but i don't know if it has any
    positive or adverse effects there or not.

    (v2) Implement feedback from Takashi Iwai: Reuse
         alc889_fixup_mbp_vref and just add a new nid
         0x19 for the MacPro 4,1.

    Signed-off-by: Mario Kleiner &lt;mario.kleiner.de@gmail.com&gt;
    Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 4b98be841c36660c6d624e1cb8d78b36c08123db
Author: Xiong Zhang &lt;xiong.y.zhang@intel.com&gt;
Date:   Fri Dec 18 13:29:18 2015 +0800

    ALSA: hda - Set SKL+ hda controller power at freeze() and thaw()

    commit 3e6db33aaf1d42a30339f831ec4850570d6cc7a3 upstream.

    It takes three minutes to enter into hibernation on some OEM SKL
    machines and we see many codec spurious response after thaw() opertion.
    This is because HDA is still in D0 state after freeze() call and
    pci_pm_freeze/pci_pm_freeze_noirq() don't set D3 hot in pci_bus driver.
    It seems bios still access HDA when system enter into freeze state,
    HDA will receive codec response interrupt immediately after thaw() call.
    Because of this unexpected interrupt, HDA enter into a abnormal
    state and slow down the system enter into hibernation.

    In this patch, we put HDA into D3 hot state in azx_freeze_noirq() and
    put HDA into D0 state in azx_thaw_noirq().

    V2: Only apply this fix to SKL+
        Fix compile error when CONFIG_PM_SLEEP isn't defined

    [Yet another fix for CONFIG_PM_SLEEP ifdef and the additional comment
     by tiwai]

    Signed-off-by: Xiong Zhang &lt;xiong.y.zhang@intel.com&gt;
    Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit ae8ca6a01960835451ee12002a30da4c23ec90ca
Author: David Henningsson &lt;david.henningsson@canonical.com&gt;
Date:   Mon Dec 7 11:29:31 2015 +0100

    ALSA: hda - Add inverted dmic for Packard Bell DOTS

    commit 02f6ff90400d055f08b0ba0b5f0707630b6faed7 upstream.

    On the internal mic of the Packard Bell DOTS, one channel
    has an inverted signal. Add a quirk to fix this up.

    BugLink: https://bugs.launchpad.net/bugs/1523232
    Signed-off-by: David Henningsson &lt;david.henningsson@canonical.com&gt;
    Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 43702b71b470a629db5729048ecb1b2bed64fd36
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Fri Dec 4 16:44:24 2015 +0100

    ALSA: rme96: Fix unexpected volume reset after rate changes

    commit a74a821624c0c75388a193337babd17a8c02c740 upstream.

    rme96 driver needs to reset DAC depending on the sample rate, and this
    results in resetting to the max volume suddenly.  It's because of the
    missing call of snd_rme96_apply_dac_volume().

    However, calling this function right after the DAC reset still may not
    work, and we need some delay before this call.  Since the DAC reset
    and the procedure after that are performed in the spinlock, we delay
    the DAC volume restore at the end after the spinlock.

    Reported-and-tested-by: Sylvain LABOISNE &lt;maeda1@free.fr&gt;
    Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit b768cd78b5cc44f8175aaf443b0c68c7957ff548
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Wed Nov 4 22:39:16 2015 +0100

    ALSA: hda - Apply pin fixup for HP ProBook 6550b

    commit c932b98c1e47312822d911c1bb76e81ef50e389c upstream.

    HP ProBook 6550b needs the same pin fixup applied to other HP B-series
    laptops with docks for making its headphone and dock headphone jacks
    working properly.  We just need to add the codec SSID to the list.

    Bugzilla: https://bugzilla.kernel.org/attachment.cgi?id=191971
    Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 6e14ea99a6635d13798755516ae6bd1061d177cb
Author: Alexandra Yates &lt;alexandra.yates@linux.intel.com&gt;
Date:   Wed Nov 4 15:56:09 2015 -0800

    ALSA: hda - Add Intel Lewisburg device IDs Audio

    commit 5cf92c8b3dc5da59e05dc81bdc069cedf6f38313 upstream.

    Adding Intel codename Lewisburg platform device IDs for audio.

    [rearranged the position by tiwai]

    Signed-off-by: Alexandra Yates &lt;alexandra.yates@linux.intel.com&gt;
    Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit dd66c0e1dfefeffcf7278d225aed0996745125e4
Author: Jan Stancek &lt;jstancek@redhat.com&gt;
Date:   Tue Dec 8 13:57:51 2015 -0500

    ipmi: move timer init to before irq is setup

    commit 27f972d3e00b50639deb4cc1392afaeb08d3cecc upstream.

    We encountered a panic on boot in ipmi_si on a dell per320 due to an
    uninitialized timer as follows.

    static int smi_start_processing(void       *send_info,
                                    ipmi_smi_t intf)
    {
            /* Try to claim any interrupts. */
            if (new_smi-&gt;irq_setup)
                    new_smi-&gt;irq_setup(new_smi);

     --&gt; IRQ arrives here and irq handler tries to modify uninitialized timer

        which triggers BUG_ON(!timer-&gt;function) in __mod_timer().

     Call Trace:
       &lt;IRQ&gt;
       [&lt;ffffffffa0532617&gt;] start_new_msg+0x47/0x80 [ipmi_si]
       [&lt;ffffffffa053269e&gt;] start_check_enables+0x4e/0x60 [ipmi_si]
       [&lt;ffffffffa0532bd8&gt;] smi_event_handler+0x1e8/0x640 [ipmi_si]
       [&lt;ffffffff810f5584&gt;] ? __rcu_process_callbacks+0x54/0x350
       [&lt;ffffffffa053327c&gt;] si_irq_handler+0x3c/0x60 [ipmi_si]
       [&lt;ffffffff810efaf0&gt;] handle_IRQ_event+0x60/0x170
       [&lt;ffffffff810f245e&gt;] handle_edge_irq+0xde/0x180
       [&lt;ffffffff8100fc59&gt;] handle_irq+0x49/0xa0
       [&lt;ffffffff8154643c&gt;] do_IRQ+0x6c/0xf0
       [&lt;ffffffff8100ba53&gt;] ret_from_intr+0x0/0x11

            /* Set up the timer that drives the interface. */
            setup_timer(&amp;new_smi-&gt;si_timer, smi_timeout, (long)new_smi);

    The following patch fixes the problem.

    To: Openipmi-developer@lists.sourceforge.net
    To: Corey Minyard &lt;minyard@acm.org&gt;
    CC: linux-kernel@vger.kernel.org

    Signed-off-by: Jan Stancek &lt;jstancek@redhat.com&gt;
    Signed-off-by: Tony Camuso &lt;tcamuso@redhat.com&gt;
    Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 6ec8f1c4d643ca779ef51cf4c74440b4b08658d2
Author: H.J. Lu &lt;hjl.tools@gmail.com&gt;
Date:   Mon Jan 4 10:17:09 2016 -0800

    x86/boot: Double BOOT_HEAP_SIZE to 64KB

    commit 8c31902cffc4d716450be549c66a67a8a3dd479c upstream.

    When decompressing kernel image during x86 bootup, malloc memory
    for ELF program headers may run out of heap space, which leads
    to system halt.  This patch doubles BOOT_HEAP_SIZE to 64KB.

    Tested with 32-bit kernel which failed to boot without this patch.

    Signed-off-by: H.J. Lu &lt;hjl.tools@gmail.com&gt;
    Acked-by: H. Peter Anvin &lt;hpa@zytor.com&gt;
    Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
    Cc: Borislav Petkov &lt;bp@alien8.de&gt;
    Cc: Brian Gerst &lt;brgerst@gmail.com&gt;
    Cc: Denys Vlasenko &lt;dvlasenk@redhat.com&gt;
    Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
    Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
    Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit a919f20b062eb4cfc65bb14b7cacf898747f803c
Author: Mario Kleiner &lt;mario.kleiner.de@gmail.com&gt;
Date:   Fri Dec 18 20:24:06 2015 +0100

    x86/reboot/quirks: Add iMac10,1 to pci_reboot_dmi_table[]

    commit 2f0c0b2d96b1205efb14347009748d786c2d9ba5 upstream.

    Without the reboot=pci method, the iMac 10,1 simply
    hangs after printing "Restarting system" at the point
    when it should reboot. This fixes it.

    Signed-off-by: Mario Kleiner &lt;mario.kleiner.de@gmail.com&gt;
    Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
    Cc: Borislav Petkov &lt;bp@alien8.de&gt;
    Cc: Brian Gerst &lt;brgerst@gmail.com&gt;
    Cc: Dave Jones &lt;davej@codemonkey.org.uk&gt;
    Cc: Denys Vlasenko &lt;dvlasenk@redhat.com&gt;
    Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
    Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
    Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
    Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
    Link: http://lkml.kernel.org/r/1450466646-26663-1-git-send-email-mario.kleiner.de@gmail.com
    Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit d59f772b7147650484bb8922c28ca0e4c9407a31
Author: Paul Mackerras &lt;paulus@ozlabs.org&gt;
Date:   Thu Nov 12 16:43:02 2015 +1100

    KVM: PPC: Book3S HV: Prohibit setting illegal transaction state in MSR

    commit c20875a3e638e4a03e099b343ec798edd1af5cc6 upstream.

    Currently it is possible for userspace (e.g. QEMU) to set a value
    for the MSR for a guest VCPU which has both of the TS bits set,
    which is an illegal combination.  The result of this is that when
    we execute a hrfid (hypervisor return from interrupt doubleword)
    instruction to enter the guest, the CPU will take a TM Bad Thing
    type of program interrupt (vector 0x700).

    Now, if PR KVM is configured in the kernel along with HV KVM, we
    actually handle this without crashing the host or giving hypervisor
    privilege to the guest; instead what happens is that we deliver a
    program interrupt to the guest, with SRR0 reflecting the address
    of the hrfid instruction and SRR1 containing the MSR value at that
    point.  If PR KVM is not configured in the kernel, then we try to
    run the host's program interrupt handler with the MMU set to the
    guest context, which almost certainly causes a host crash.

    This closes the hole by making kvmppc_set_msr_hv() check for the
    illegal combination and force the TS field to a safe value (00,
    meaning non-transactional).

    Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit c55958f9a88de41d7e145e146fea4d4fcf0a4be2
Author: Ouyang Zhaowei (Charles) &lt;ouyangzhaowei@huawei.com&gt;
Date:   Wed May 6 09:47:04 2015 +0800

    x86/xen: don't reset vcpu_info on a cancelled suspend

    commit 6a1f513776b78c994045287073e55bae44ed9f8c upstream.

    On a cancelled suspend the vcpu_info location does not change (it's
    still in the per-cpu area registered by xen_vcpu_setup()).  So do not
    call xen_hvm_init_shared_info() which would make the kernel think its
    back in the shared info.  With the wrong vcpu_info, events cannot be
    received and the domain will hang after a cancelled suspend.

    Signed-off-by: Charles Ouyang &lt;ouyangzhaowei@huawei.com&gt;
    Reviewed-by: Boris Ostrovsky &lt;boris.ostrovsky@oracle.com&gt;
    Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 723e01b02a017a2c2889202487a20c778f1f0bd6
Author: Boris Ostrovsky &lt;boris.ostrovsky@oracle.com&gt;
Date:   Tue Nov 10 15:10:33 2015 -0500

    xen/gntdev: Grant maps should not be subject to NUMA balancing

    commit 9c17d96500f78d7ecdb71ca6942830158bc75a2b upstream.

    Doing so will cause the grant to be unmapped and then, during
    fault handling, the fault to be mistakenly treated as NUMA hint
    fault.

    In addition, even if those maps could partcipate in NUMA
    balancing, it wouldn't provide any benefit since we are unable
    to determine physical page's node (even if/when VNUMA is
    implemented).

    Marking grant maps' VMAs as VM_IO will exclude them from being
    part of NUMA balancing.

    Signed-off-by: Boris Ostrovsky &lt;boris.ostrovsky@oracle.com&gt;
    Signed-off-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit c511958e1c0b0a802ba68a7bf689b33ee8877f6b
Author: Dmitry V. Levin &lt;ldv@altlinux.org&gt;
Date:   Tue Dec 1 00:54:36 2015 +0300

    x86/signal: Fix restart_syscall number for x32 tasks

    commit 22eab1108781eff09961ae7001704f7bd8fb1dce upstream.

    When restarting a syscall with regs-&gt;ax == -ERESTART_RESTARTBLOCK,
    regs-&gt;ax is assigned to a restart_syscall number.  For x32 tasks, this
    syscall number must have __X32_SYSCALL_BIT set, otherwise it will be
    an x86_64 syscall number instead of a valid x32 syscall number. This
    issue has been there since the introduction of x32.

    Reported-by: strace/tests/restart_syscall.test
    Reported-and-tested-by: Elvira Khabirova &lt;lineprinter0@gmail.com&gt;
    Signed-off-by: Dmitry V. Levin &lt;ldv@altlinux.org&gt;
    Cc: Elvira Khabirova &lt;lineprinter0@gmail.com&gt;
    Link: http://lkml.kernel.org/r/20151130215436.GA25996@altlinux.org
    Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 85ec9232455406f1453bff56d8ef83c2aa2281c3
Author: Willy Tarreau &lt;w@1wt.eu&gt;
Date:   Sun Jan 24 09:19:57 2016 +0100

    af_unix: fix incorrect revert of 'lock_interruptible' in stream receive code

    As reported by Sultan Qasim, commit 3822b5c ("af_unix: Revert
    'lock_interruptible' in stream receive code") was accidently applied
    at the wrong place in the backport that appeared in 3.10.95, it
    affected unix_dgram_recvmsg() instead of unix_stream_recvmsg() due
    to now similar code sections there. The dgram part needs to remain
    but the stream part needs to be removed.

    Reported-By: Sultan Qasim &lt;sultanqasim@gmail.com&gt;
    Fixes: 3a57e78 (3.10.95)
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>Linux 3.10.95 (accumulative patch)</title>
<updated>2016-08-26T18:47:31+00:00</updated>
<author>
<name>Stefan Guendhoer</name>
<email>stefan@guendhoer.com</email>
</author>
<published>2016-01-23T13:45:52+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=982ceba27dcd67080055fd9d1f21e7cc1ca852af'/>
<id>urn:sha1:982ceba27dcd67080055fd9d1f21e7cc1ca852af</id>
<content type='text'>
commit 14b58660bc26be42d272f7fb0d153ed8fc0a0c4e
Author: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Date:   Fri Jan 22 20:33:57 2016 -0800

    Linux 3.10.95

commit 84de97ff5075bb6b4c25e8cbbcd40e55da1c1d4c
Author: Yevgeny Pats &lt;yevgeny@perception-point.io&gt;
Date:   Tue Jan 19 22:09:04 2016 +0000

    KEYS: Fix keyring ref leak in join_session_keyring()

    commit 23567fd052a9abb6d67fe8e7a9ccdd9800a540f2 upstream.

    This fixes CVE-2016-0728.

    If a thread is asked to join as a session keyring the keyring that's already
    set as its session, we leak a keyring reference.

    This can be tested with the following program:

    	#include &lt;stddef.h&gt;
    	#include &lt;stdio.h&gt;
    	#include &lt;sys/types.h&gt;
    	#include &lt;keyutils.h&gt;

    	int main(int argc, const char *argv[])
    	{
    		int i = 0;
    		key_serial_t serial;

    		serial = keyctl(KEYCTL_JOIN_SESSION_KEYRING,
    				"leaked-keyring");
    		if (serial &lt; 0) {
    			perror("keyctl");
    			return -1;
    		}

    		if (keyctl(KEYCTL_SETPERM, serial,
    			   KEY_POS_ALL | KEY_USR_ALL) &lt; 0) {
    			perror("keyctl");
    			return -1;
    		}

    		for (i = 0; i &lt; 100; i++) {
    			serial = keyctl(KEYCTL_JOIN_SESSION_KEYRING,
    					"leaked-keyring");
    			if (serial &lt; 0) {
    				perror("keyctl");
    				return -1;
    			}
    		}

    		return 0;
    	}

    If, after the program has run, there something like the following line in
    /proc/keys:

    3f3d898f I--Q---   100 perm 3f3f0000     0     0 keyring   leaked-keyring: empty

    with a usage count of 100 * the number of times the program has been run,
    then the kernel is malfunctioning.  If leaked-keyring has zero usages or
    has been garbage collected, then the problem is fixed.

    Reported-by: Yevgeny Pats &lt;yevgeny@perception-point.io&gt;
    Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
    Acked-by: Don Zickus &lt;dzickus@redhat.com&gt;
    Acked-by: Prarit Bhargava &lt;prarit@redhat.com&gt;
    Acked-by: Jarod Wilson &lt;jarod@redhat.com&gt;
    Signed-off-by: James Morris &lt;james.l.morris@oracle.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit afd8f582ae388b0d1c7d0532dc31f4f85c1098dc
Author: David Howells &lt;dhowells@redhat.com&gt;
Date:   Fri Dec 18 01:34:26 2015 +0000

    KEYS: Fix race between read and revoke

    commit b4a1b4f5047e4f54e194681125c74c0aa64d637d upstream.

    This fixes CVE-2015-7550.

    There's a race between keyctl_read() and keyctl_revoke().  If the revoke
    happens between keyctl_read() checking the validity of a key and the key's
    semaphore being taken, then the key type read method will see a revoked key.

    This causes a problem for the user-defined key type because it assumes in
    its read method that there will always be a payload in a non-revoked key
    and doesn't check for a NULL pointer.

    Fix this by making keyctl_read() check the validity of a key after taking
    semaphore instead of before.

    I think the bug was introduced with the original keyrings code.

    This was discovered by a multithreaded test program generated by syzkaller
    (http://github.com/google/syzkaller).  Here's a cleaned up version:

    	#include &lt;sys/types.h&gt;
    	#include &lt;keyutils.h&gt;
    	#include &lt;pthread.h&gt;
    	void *thr0(void *arg)
    	{
    		key_serial_t key = (unsigned long)arg;
    		keyctl_revoke(key);
    		return 0;
    	}
    	void *thr1(void *arg)
    	{
    		key_serial_t key = (unsigned long)arg;
    		char buffer[16];
    		keyctl_read(key, buffer, 16);
    		return 0;
    	}
    	int main()
    	{
    		key_serial_t key = add_key("user", "%", "foo", 3, KEY_SPEC_USER_KEYRING);
    		pthread_t th[5];
    		pthread_create(&amp;th[0], 0, thr0, (void *)(unsigned long)key);
    		pthread_create(&amp;th[1], 0, thr1, (void *)(unsigned long)key);
    		pthread_create(&amp;th[2], 0, thr0, (void *)(unsigned long)key);
    		pthread_create(&amp;th[3], 0, thr1, (void *)(unsigned long)key);
    		pthread_join(th[0], 0);
    		pthread_join(th[1], 0);
    		pthread_join(th[2], 0);
    		pthread_join(th[3], 0);
    		return 0;
    	}

    Build as:

    	cc -o keyctl-race keyctl-race.c -lkeyutils -lpthread

    Run as:

    	while keyctl-race; do :; done

    as it may need several iterations to crash the kernel.  The crash can be
    summarised as:

    	BUG: unable to handle kernel NULL pointer dereference at 0000000000000010
    	IP: [&lt;ffffffff81279b08&gt;] user_read+0x56/0xa3
    	...
    	Call Trace:
    	 [&lt;ffffffff81276aa9&gt;] keyctl_read_key+0xb6/0xd7
    	 [&lt;ffffffff81277815&gt;] SyS_keyctl+0x83/0xe0
    	 [&lt;ffffffff815dbb97&gt;] entry_SYSCALL_64_fastpath+0x12/0x6f

    Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
    Tested-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Signed-off-by: James Morris &lt;james.l.morris@oracle.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 577ee88e9632fe613c28381dc1a1cc32198fc924
Author: David Howells &lt;dhowells@redhat.com&gt;
Date:   Thu Oct 15 17:21:37 2015 +0100

    KEYS: Fix crash when attempt to garbage collect an uninstantiated keyring

    commit f05819df10d7b09f6d1eb6f8534a8f68e5a4fe61 upstream.

    The following sequence of commands:

        i=`keyctl add user a a @s`
        keyctl request2 keyring foo bar @t
        keyctl unlink $i @s

    tries to invoke an upcall to instantiate a keyring if one doesn't already
    exist by that name within the user's keyring set.  However, if the upcall
    fails, the code sets keyring-&gt;type_data.reject_error to -ENOKEY or some
    other error code.  When the key is garbage collected, the key destroy
    function is called unconditionally and keyring_destroy() uses list_empty()
    on keyring-&gt;type_data.link - which is in a union with reject_error.
    Subsequently, the kernel tries to unlink the keyring from the keyring names
    list - which oopses like this:

    	BUG: unable to handle kernel paging request at 00000000ffffff8a
    	IP: [&lt;ffffffff8126e051&gt;] keyring_destroy+0x3d/0x88
    	...
    	Workqueue: events key_garbage_collector
    	...
    	RIP: 0010:[&lt;ffffffff8126e051&gt;] keyring_destroy+0x3d/0x88
    	RSP: 0018:ffff88003e2f3d30  EFLAGS: 00010203
    	RAX: 00000000ffffff82 RBX: ffff88003bf1a900 RCX: 0000000000000000
    	RDX: 0000000000000000 RSI: 000000003bfc6901 RDI: ffffffff81a73a40
    	RBP: ffff88003e2f3d38 R08: 0000000000000152 R09: 0000000000000000
    	R10: ffff88003e2f3c18 R11: 000000000000865b R12: ffff88003bf1a900
    	R13: 0000000000000000 R14: ffff88003bf1a908 R15: ffff88003e2f4000
    	...
    	CR2: 00000000ffffff8a CR3: 000000003e3ec000 CR4: 00000000000006f0
    	...
    	Call Trace:
    	 [&lt;ffffffff8126c756&gt;] key_gc_unused_keys.constprop.1+0x5d/0x10f
    	 [&lt;ffffffff8126ca71&gt;] key_garbage_collector+0x1fa/0x351
    	 [&lt;ffffffff8105ec9b&gt;] process_one_work+0x28e/0x547
    	 [&lt;ffffffff8105fd17&gt;] worker_thread+0x26e/0x361
    	 [&lt;ffffffff8105faa9&gt;] ? rescuer_thread+0x2a8/0x2a8
    	 [&lt;ffffffff810648ad&gt;] kthread+0xf3/0xfb
    	 [&lt;ffffffff810647ba&gt;] ? kthread_create_on_node+0x1c2/0x1c2
    	 [&lt;ffffffff815f2ccf&gt;] ret_from_fork+0x3f/0x70
    	 [&lt;ffffffff810647ba&gt;] ? kthread_create_on_node+0x1c2/0x1c2

    Note the value in RAX.  This is a 32-bit representation of -ENOKEY.

    The solution is to only call -&gt;destroy() if the key was successfully
    instantiated.

    Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
    Tested-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit ccc152bf4abb68e6d2c55091252f870bc4ee7a92
Author: David Howells &lt;dhowells@redhat.com&gt;
Date:   Fri Sep 25 16:30:08 2015 +0100

    KEYS: Fix race between key destruction and finding a keyring by name

    commit 94c4554ba07adbdde396748ee7ae01e86cf2d8d7 upstream.

    There appears to be a race between:

     (1) key_gc_unused_keys() which frees key-&gt;security and then calls
         keyring_destroy() to unlink the name from the name list

     (2) find_keyring_by_name() which calls key_permission(), thus accessing
         key-&gt;security, on a key before checking to see whether the key usage is 0
         (ie. the key is dead and might be cleaned up).

    Fix this by calling -&gt;destroy() before cleaning up the core key data -
    including key-&gt;security.

    Reported-by: Petr Matousek &lt;pmatouse@redhat.com&gt;
    Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 3a57e783016bf43ab9326172217f564941b85b17
Author: Rainer Weikusat &lt;rweikusat@mobileactivedefense.com&gt;
Date:   Wed Dec 16 20:09:25 2015 +0000

    af_unix: Revert 'lock_interruptible' in stream receive code

    [ Upstream commit 3822b5c2fc62e3de8a0f33806ff279fb7df92432 ]

    With b3ca9b02b00704053a38bfe4c31dbbb9c13595d0, the AF_UNIX SOCK_STREAM
    receive code was changed from using mutex_lock(&amp;u-&gt;readlock) to
    mutex_lock_interruptible(&amp;u-&gt;readlock) to prevent signals from being
    delayed for an indefinite time if a thread sleeping on the mutex
    happened to be selected for handling the signal. But this was never a
    problem with the stream receive code (as opposed to its datagram
    counterpart) as that never went to sleep waiting for new messages with the
    mutex held and thus, wouldn't cause secondary readers to block on the
    mutex waiting for the sleeping primary reader. As the interruptible
    locking makes the code more complicated in exchange for no benefit,
    change it back to using mutex_lock.

    Signed-off-by: Rainer Weikusat &lt;rweikusat@mobileactivedefense.com&gt;
    Acked-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit aea23834fd3daa60039be8773aa39fb039aac945
Author: David S. Miller &lt;davem@davemloft.net&gt;
Date:   Tue Dec 15 15:39:08 2015 -0500

    bluetooth: Validate socket address length in sco_sock_bind().

    [ Upstream commit 5233252fce714053f0151680933571a2da9cbfb4 ]

    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 83f2b0860770d05f14cb8ce29ffd18f2f5585a4e
Author: WANG Cong &lt;xiyou.wangcong@gmail.com&gt;
Date:   Mon Dec 14 13:48:36 2015 -0800

    pptp: verify sockaddr_len in pptp_bind() and pptp_connect()

    [ Upstream commit 09ccfd238e5a0e670d8178cf50180ea81ae09ae1 ]

    Reported-by: Dmitry Vyukov &lt;dvyukov@gmail.com&gt;
    Signed-off-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;

commit 457fca596cd37ea06006b290bdbc5c7c5d8a12e3
Author: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.com&gt;
Date:   Fri Dec 4 01:45:40 2015 +0300

    sh_eth: fix kernel oops in skb_put()

    [ Upstream commit 248be83dcb3feb3f6332eb3d010a016402138484 ]

    In a low memory situation the following kernel oops occurs:

    Unable to handle kernel NULL pointer dereference at virtual address 00000050
    pgd = 8490c000
    [00000050] *pgd=4651e831, *pte=00000000, *ppte=00000000
    Internal error: Oops: 17 [#1] PREEMPT ARM
    Modules linked in:
    CPU: 0    Not tainted  (3.4-at16 #9)
    PC is at skb_put+0x10/0x98
    LR is at sh_eth_poll+0x2c8/0xa10
    pc : [&lt;8035f780&gt;]    lr : [&lt;8028bf50&gt;]    psr: 60000113
    sp : 84eb1a90  ip : 84eb1ac8  fp : 84eb1ac4
    r10: 0000003f  r9 : 000005ea  r8 : 00000000
    r7 : 00000000  r6 : 940453b0  r5 : 00030000  r4 : 9381b180
    r3 : 00000000  r2 : 00000000  r1 : 000005ea  r0 : 00000000
    Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
    Control: 10c53c7d  Table: 4248c059  DAC: 00000015
    Process klogd (pid: 2046, stack limit = 0x84eb02e8)
    [...]

    This is  because netdev_alloc_skb() fails and 'mdp-&gt;rx_skbuff[entry]' is left
    NULL but sh_eth_rx() later  uses it without checking.  Add such check...

    Reported-by: Yasushi SHOJI &lt;yashi@atmark-techno.com&gt;
    Signed-off-by: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 0b15bc29250706ab64cbebb6a4739d3a76e23103
Author: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Date:   Mon Dec 14 22:03:39 2015 +0100

    net: add validation for the socket syscall protocol argument

    [ Upstream commit 79462ad02e861803b3840cc782248c7359451cd9 ]

    郭永刚 reported that one could simply crash the kernel as root by
    using a simple program:

    	int socket_fd;
    	struct sockaddr_in addr;
    	addr.sin_port = 0;
    	addr.sin_addr.s_addr = INADDR_ANY;
    	addr.sin_family = 10;

    	socket_fd = socket(10,3,0x40000000);
    	connect(socket_fd , &amp;addr,16);

    AF_INET, AF_INET6 sockets actually only support 8-bit protocol
    identifiers. inet_sock's skc_protocol field thus is sized accordingly,
    thus larger protocol identifiers simply cut off the higher bits and
    store a zero in the protocol fields.

    This could lead to e.g. NULL function pointer because as a result of
    the cut off inet_num is zero and we call down to inet_autobind, which
    is NULL for raw sockets.

    kernel: Call Trace:
    kernel:  [&lt;ffffffff816db90e&gt;] ? inet_autobind+0x2e/0x70
    kernel:  [&lt;ffffffff816db9a4&gt;] inet_dgram_connect+0x54/0x80
    kernel:  [&lt;ffffffff81645069&gt;] SYSC_connect+0xd9/0x110
    kernel:  [&lt;ffffffff810ac51b&gt;] ? ptrace_notify+0x5b/0x80
    kernel:  [&lt;ffffffff810236d8&gt;] ? syscall_trace_enter_phase2+0x108/0x200
    kernel:  [&lt;ffffffff81645e0e&gt;] SyS_connect+0xe/0x10
    kernel:  [&lt;ffffffff81779515&gt;] tracesys_phase2+0x84/0x89

    I found no particular commit which introduced this problem.

    CVE: CVE-2015-8543
    Cc: Cong Wang &lt;cwang@twopensource.com&gt;
    Reported-by: 郭永刚 &lt;guoyonggang@360.cn&gt;
    Signed-off-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 62c8fcbdf619bf5c1c7f666cefefb88401904203
Author: Eric Dumazet &lt;edumazet@google.com&gt;
Date:   Wed Dec 9 07:25:06 2015 -0800

    ipv6: sctp: clone options to avoid use after free

    [ Upstream commit 9470e24f35ab81574da54e69df90c1eb4a96b43f ]

    SCTP is lacking proper np-&gt;opt cloning at accept() time.

    TCP and DCCP use ipv6_dup_options() helper, do the same
    in SCTP.

    We might later factorize this code in a common helper to avoid
    future mistakes.

    Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
    Acked-by: Vlad Yasevich &lt;vyasevich@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;

commit 33fbe78ae82b7750da133439043847d0f79cb5ae
Author: Marcelo Ricardo Leitner &lt;marcelo.leitner@gmail.com&gt;
Date:   Fri Dec 4 15:14:04 2015 -0200

    sctp: update the netstamp_needed counter when copying sockets

    [ Upstream commit 01ce63c90170283a9855d1db4fe81934dddce648 ]

    Dmitry Vyukov reported that SCTP was triggering a WARN on socket destroy
    related to disabling sock timestamp.

    When SCTP accepts an association or peel one off, it copies sock flags
    but forgot to call net_enable_timestamp() if a packet timestamping flag
    was copied, leading to extra calls to net_disable_timestamp() whenever
    such clones were closed.

    The fix is to call net_enable_timestamp() whenever we copy a sock with
    that flag on, like tcp does.

    Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Signed-off-by: Marcelo Ricardo Leitner &lt;marcelo.leitner@gmail.com&gt;
    Acked-by: Vlad Yasevich &lt;vyasevich@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;

commit cbc3e98d4cba328bbb1aec5da784c5e84f601954
Author: Pavel Machek &lt;pavel@ucw.cz&gt;
Date:   Fri Dec 4 09:50:00 2015 +0100

    atl1c: Improve driver not to do order 4 GFP_ATOMIC allocation

    [ Upstream commit f2a3771ae8aca879c32336c76ad05a017629bae2 ]

    atl1c driver is doing order-4 allocation with GFP_ATOMIC
    priority. That often breaks  networking after resume. Switch to
    GFP_KERNEL. Still not ideal, but should be significantly better.

    atl1c_setup_ring_resources() is called from .open() function, and
    already uses GFP_KERNEL, so this change is safe.

    Signed-off-by: Pavel Machek &lt;pavel@ucw.cz&gt;
    Acked-by: Michal Hocko &lt;mhocko@suse.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 6089a80384074617cbe77ba8d315f24a7741a437
Author: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
Date:   Thu Dec 3 17:21:50 2015 +0100

    gre6: allow to update all parameters via rtnl

    [ Upstream commit 6a61d4dbf4f54b5683e0f1e58d873cecca7cb977 ]

    Parameters were updated only if the kernel was unable to find the tunnel
    with the new parameters, ie only if core pamareters were updated (keys,
    addr, link, type).
    Now it's possible to update ttl, hoplimit, flowinfo and flags.

    Fixes: c12b395a4664 ("gre: Support GRE over IPv6")
    Signed-off-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 7541d74e478278844cc643c9d7c4878dd51eae5e
Author: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Date:   Wed Nov 18 02:01:21 2015 +0000

    usb: Use the USB_SS_MULT() macro to decode burst multiplier for log message

    commit 5377adb092664d336ac212499961cac5e8728794 upstream.

    usb_parse_ss_endpoint_companion() now decodes the burst multiplier
    correctly in order to check that it's &lt;= 3, but still uses the wrong
    expression if warning that it's &gt; 3.

    Fixes: ff30cbc8da42 ("usb: Use the USB_SS_MULT() macro to get the ...")
    Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 42ef7474dcf3b8502dfa0dd9700caf1a6139d521
Author: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
Date:   Sat Nov 21 00:36:44 2015 +0300

    USB: whci-hcd: add check for dma mapping error

    commit f9fa1887dcf26bd346665a6ae3d3f53dec54cba1 upstream.

    qset_fill_page_list() do not check for dma mapping errors.

    Found by Linux Driver Verification project (linuxtesting.org).

    Signed-off-by: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 506d8269fb6184db68062df4d9fe787b95535ee4
Author: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Date:   Thu Dec 10 15:27:21 2015 -0500

    USB: add quirk for devices with broken LPM

    commit ad87e03213b552a5c33d5e1e7a19a73768397010 upstream.

    Some USB device / host controller combinations seem to have problems
    with Link Power Management.  For example, Steinar found that his xHCI
    controller wouldn't handle bandwidth calculations correctly for two
    video cards simultaneously when LPM was enabled, even though the bus
    had plenty of bandwidth available.

    This patch introduces a new quirk flag for devices that should remain
    disabled for LPM, and creates quirk entries for Steinar's devices.

    Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
    Reported-by: Steinar H. Gunderson &lt;sgunderson@bigfoot.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit e68f3e07d9f90b08083e903e24361241e0c9e0c7
Author: Konstantin Shkolnyy &lt;konstantin.shkolnyy@gmail.com&gt;
Date:   Tue Nov 10 16:40:13 2015 -0600

    USB: cp210x: Remove CP2110 ID from compatibility list

    commit 7c90e610b60cd1ed6abafd806acfaedccbbe52d1 upstream.

    CP2110 ID (0x10c4, 0xea80) doesn't belong here because it's a HID
    and completely different from CP210x devices.

    Signed-off-by: Konstantin Shkolnyy &lt;konstantin.shkolnyy@gmail.com&gt;
    Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 7f877278601066e09833e1c3b47c483065ddc8fd
Author: Jonas Jonsson &lt;jonas@ludd.ltu.se&gt;
Date:   Sun Nov 22 11:47:17 2015 +0100

    USB: cdc_acm: Ignore Infineon Flash Loader utility

    commit f33a7f72e5fc033daccbb8d4753d7c5c41a4d67b upstream.

    Some modems, such as the Telit UE910, are using an Infineon Flash Loader
    utility. It has two interfaces, 2/2/0 (Abstract Modem) and 10/0/0 (CDC
    Data). The latter can be used as a serial interface to upgrade the
    firmware of the modem. However, that isn't possible when the cdc-acm
    driver takes control of the device.

    The following is an explanation of the behaviour by Daniele Palmas during
    discussion on linux-usb.

    "This is what happens when the device is turned on (without modifying
    the drivers):

    [155492.352031] usb 1-3: new high-speed USB device number 27 using ehci-pci
    [155492.485429] usb 1-3: config 1 interface 0 altsetting 0 endpoint 0x81 has an invalid bInterval 255, changing to 11
    [155492.485436] usb 1-3: New USB device found, idVendor=058b, idProduct=0041
    [155492.485439] usb 1-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    [155492.485952] cdc_acm 1-3:1.0: ttyACM0: USB ACM device

    This is the flashing device that is caught by the cdc-acm driver. Once
    the ttyACM appears, the application starts sending a magic string
    (simple write on the file descriptor) to keep the device in flashing
    mode. If this magic string is not properly received in a certain time
    interval, the modem goes on in normal operative mode:

    [155493.748094] usb 1-3: USB disconnect, device number 27
    [155494.916025] usb 1-3: new high-speed USB device number 28 using ehci-pci
    [155495.059978] usb 1-3: New USB device found, idVendor=1bc7, idProduct=0021
    [155495.059983] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [155495.059986] usb 1-3: Product: 6 CDC-ACM + 1 CDC-ECM
    [155495.059989] usb 1-3: Manufacturer: Telit
    [155495.059992] usb 1-3: SerialNumber: 359658044004697
    [155495.138958] cdc_acm 1-3:1.0: ttyACM0: USB ACM device
    [155495.140832] cdc_acm 1-3:1.2: ttyACM1: USB ACM device
    [155495.142827] cdc_acm 1-3:1.4: ttyACM2: USB ACM device
    [155495.144462] cdc_acm 1-3:1.6: ttyACM3: USB ACM device
    [155495.145967] cdc_acm 1-3:1.8: ttyACM4: USB ACM device
    [155495.147588] cdc_acm 1-3:1.10: ttyACM5: USB ACM device
    [155495.154322] cdc_ether 1-3:1.12 wwan0: register 'cdc_ether' at usb-0000:00:1a.7-3, Mobile Broadband Network Device, 00:00:11:12:13:14

    Using the cdc-acm driver, the string, though being sent in the same way
    than using the usb-serial-simple driver (I can confirm that the data is
    passing properly since I used an hw usb sniffer), does not make the
    device to stay in flashing mode."

    Signed-off-by: Jonas Jonsson &lt;jonas@ludd.ltu.se&gt;
    Tested-by: Daniele Palmas &lt;dnlplm@gmail.com&gt;
    Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 7fdb403bf19da6702f3a37be080f1ccdb8572d08
Author: Jeff Layton &lt;jlayton@poochiereds.net&gt;
Date:   Wed Nov 25 13:50:11 2015 -0500

    nfs: if we have no valid attrs, then don't declare the attribute cache valid

    commit c812012f9ca7cf89c9e1a1cd512e6c3b5be04b85 upstream.

    If we pass in an empty nfs_fattr struct to nfs_update_inode, it will
    (correctly) not update any of the attributes, but it then clears the
    NFS_INO_INVALID_ATTR flag, which indicates that the attributes are
    up to date. Don't clear the flag if the fattr struct has no valid
    attrs to apply.

    Reviewed-by: Steve French &lt;steve.french@primarydata.com&gt;
    Signed-off-by: Jeff Layton &lt;jeff.layton@primarydata.com&gt;
    Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 308b77ea2d4add613708e2c82bc9f4d987095e12
Author: Benjamin Coddington &lt;bcodding@redhat.com&gt;
Date:   Fri Nov 20 09:56:20 2015 -0500

    nfs4: start callback_ident at idr 1

    commit c68a027c05709330fe5b2f50c50d5fa02124b5d8 upstream.

    If clp-&gt;cl_cb_ident is zero, then nfs_cb_idr_remove_locked() skips removing
    it when the nfs_client is freed.  A decoding or server bug can then find
    and try to put that first nfs_client which would lead to a crash.

    Signed-off-by: Benjamin Coddington &lt;bcodding@redhat.com&gt;
    Fixes: d6870312659d ("nfs4client: convert to idr_alloc()")
    Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit ef29913621a4fcfcf85d46935ddd4fb510f559bf
Author: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
Date:   Tue Nov 3 01:46:21 2015 +0100

    firewire: ohci: fix JMicron JMB38x IT context discovery

    commit 100ceb66d5c40cc0c7018e06a9474302470be73c upstream.

    Reported by Clifford and Craig for JMicron OHCI-1394 + SDHCI combo
    controllers:  Often or even most of the time, the controller is
    initialized with the message "added OHCI v1.10 device as card 0, 4 IR +
    0 IT contexts, quirks 0x10".  With 0 isochronous transmit DMA contexts
    (IT contexts), applications like audio output are impossible.

    However, OHCI-1394 demands that at least 4 IT contexts are implemented
    by the link layer controller, and indeed JMicron JMB38x do implement
    four of them.  Only their IsoXmitIntMask register is unreliable at early
    access.

    With my own JMB381 single function controller I found:
      - I can reproduce the problem with a lower probability than Craig's.
      - If I put a loop around the section which clears and reads
        IsoXmitIntMask, then either the first or the second attempt will
        return the correct initial mask of 0x0000000f.  I never encountered
        a case of needing more than a second attempt.
      - Consequently, if I put a dummy reg_read(...IsoXmitIntMaskSet)
        before the first write, the subsequent read will return the correct
        result.
      - If I merely ignore a wrong read result and force the known real
        result, later isochronous transmit DMA usage works just fine.

    So let's just fix this chip bug up by the latter method.  Tested with
    JMB381 on kernel 3.13 and 4.3.

    Since OHCI-1394 generally requires 4 IT contexts at a minium, this
    workaround is simply applied whenever the initial read of IsoXmitIntMask
    returns 0, regardless whether it's a JMicron chip or not.  I never heard
    of this issue together with any other chip though.

    I am not 100% sure that this fix works on the OHCI-1394 part of JMB380
    and JMB388 combo controllers exactly the same as on the JMB381 single-
    function controller, but so far I haven't had a chance to let an owner
    of a combo chip run a patched kernel.

    Strangely enough, IsoRecvIntMask is always reported correctly, even
    though it is probed right before IsoXmitIntMask.

    Reported-by: Clifford Dunn
    Reported-by: Craig Moore &lt;craig.moore@qenos.com&gt;
    Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit fe4b6c2682109967c21ff28a47adfb5cb7d361aa
Author: Daeho Jeong &lt;daeho.jeong@samsung.com&gt;
Date:   Sun Oct 18 17:02:56 2015 -0400

    ext4, jbd2: ensure entering into panic after recording an error in superblock

    commit 4327ba52afd03fc4b5afa0ee1d774c9c5b0e85c5 upstream.

    If a EXT4 filesystem utilizes JBD2 journaling and an error occurs, the
    journaling will be aborted first and the error number will be recorded
    into JBD2 superblock and, finally, the system will enter into the
    panic state in "errors=panic" option.  But, in the rare case, this
    sequence is little twisted like the below figure and it will happen
    that the system enters into panic state, which means the system reset
    in mobile environment, before completion of recording an error in the
    journal superblock. In this case, e2fsck cannot recognize that the
    filesystem failure occurred in the previous run and the corruption
    wouldn't be fixed.

    Task A                        Task B
    ext4_handle_error()
    -&gt; jbd2_journal_abort()
      -&gt; __journal_abort_soft()
        -&gt; __jbd2_journal_abort_hard()
        | -&gt; journal-&gt;j_flags |= JBD2_ABORT;
        |
        |                         __ext4_abort()
        |                         -&gt; jbd2_journal_abort()
        |                         | -&gt; __journal_abort_soft()
        |                         |   -&gt; if (journal-&gt;j_flags &amp; JBD2_ABORT)
        |                         |           return;
        |                         -&gt; panic()
        |
        -&gt; jbd2_journal_update_sb_errno()

    Tested-by: Hobin Woo &lt;hobin.woo@samsung.com&gt;
    Signed-off-by: Daeho Jeong &lt;daeho.jeong@samsung.com&gt;
    Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit af8e014acf6baf20e4c1be0b0c472c9a9e1d3543
Author: Filipe Manana &lt;fdmanana@suse.com&gt;
Date:   Mon Nov 9 00:33:58 2015 +0000

    Btrfs: fix race leading to BUG_ON when running delalloc for nodatacow

    commit 1d512cb77bdbda80f0dd0620a3b260d697fd581d upstream.

    If we are using the NO_HOLES feature, we have a tiny time window when
    running delalloc for a nodatacow inode where we can race with a concurrent
    link or xattr add operation leading to a BUG_ON.

    This happens because at run_delalloc_nocow() we end up casting a leaf item
    of type BTRFS_INODE_[REF|EXTREF]_KEY or of type BTRFS_XATTR_ITEM_KEY to a
    file extent item (struct btrfs_file_extent_item) and then analyse its
    extent type field, which won't match any of the expected extent types
    (values BTRFS_FILE_EXTENT_[REG|PREALLOC|INLINE]) and therefore trigger an
    explicit BUG_ON(1).

    The following sequence diagram shows how the race happens when running a
    no-cow dellaloc range [4K, 8K[ for inode 257 and we have the following
    neighbour leafs:

                 Leaf X (has N items)                    Leaf Y

     [ ... (257 INODE_ITEM 0) (257 INODE_REF 256) ]  [ (257 EXTENT_DATA 8192), ... ]
                  slot N - 2         slot N - 1              slot 0

     (Note the implicit hole for inode 257 regarding the [0, 8K[ range)

           CPU 1                                         CPU 2

     run_dealloc_nocow()
       btrfs_lookup_file_extent()
         --&gt; searches for a key with value
             (257 EXTENT_DATA 4096) in the
             fs/subvol tree
         --&gt; returns us a path with
             path-&gt;nodes[0] == leaf X and
             path-&gt;slots[0] == N

       because path-&gt;slots[0] is &gt;=
       btrfs_header_nritems(leaf X), it
       calls btrfs_next_leaf()

       btrfs_next_leaf()
         --&gt; releases the path

                                                  hard link added to our inode,
                                                  with key (257 INODE_REF 500)
                                                  added to the end of leaf X,
                                                  so leaf X now has N + 1 keys

         --&gt; searches for the key
             (257 INODE_REF 256), because
             it was the last key in leaf X
             before it released the path,
             with path-&gt;keep_locks set to 1

         --&gt; ends up at leaf X again and
             it verifies that the key
             (257 INODE_REF 256) is no longer
             the last key in the leaf, so it
             returns with path-&gt;nodes[0] ==
             leaf X and path-&gt;slots[0] == N,
             pointing to the new item with
             key (257 INODE_REF 500)

       the loop iteration of run_dealloc_nocow()
       does not break out the loop and continues
       because the key referenced in the path
       at path-&gt;nodes[0] and path-&gt;slots[0] is
       for inode 257, its type is &lt; BTRFS_EXTENT_DATA_KEY
       and its offset (500) is less then our delalloc
       range's end (8192)

       the item pointed by the path, an inode reference item,
       is (incorrectly) interpreted as a file extent item and
       we get an invalid extent type, leading to the BUG_ON(1):

       if (extent_type == BTRFS_FILE_EXTENT_REG ||
          extent_type == BTRFS_FILE_EXTENT_PREALLOC) {
           (...)
       } else if (extent_type == BTRFS_FILE_EXTENT_INLINE) {
           (...)
       } else {
           BUG_ON(1)
       }

    The same can happen if a xattr is added concurrently and ends up having
    a key with an offset smaller then the delalloc's range end.

    So fix this by skipping keys with a type smaller than
    BTRFS_EXTENT_DATA_KEY.

    Signed-off-by: Filipe Manana &lt;fdmanana@suse.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 622af8c8e93802e9ae2cdde93563c69a68feeccb
Author: Eric Dumazet &lt;edumazet@google.com&gt;
Date:   Tue Dec 1 07:20:07 2015 -0800

    ipv6: sctp: implement sctp_v6_destroy_sock()

    [ Upstream commit 602dd62dfbda3e63a2d6a3cbde953ebe82bf5087 ]

    Dmitry Vyukov reported a memory leak using IPV6 SCTP sockets.

    We need to call inet6_destroy_sock() to properly release
    inet6 specific fields.

    Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
    Acked-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 7cd9f6022097acdeb1f14bc9a5d44c40629d11a9
Author: Michal Kubeček &lt;mkubecek@suse.cz&gt;
Date:   Tue Nov 24 15:07:11 2015 +0100

    ipv6: distinguish frag queues by device for multicast and link-local packets

    [ Upstream commit 264640fc2c5f4f913db5c73fa3eb1ead2c45e9d7 ]

    If a fragmented multicast packet is received on an ethernet device which
    has an active macvlan on top of it, each fragment is duplicated and
    received both on the underlying device and the macvlan. If some
    fragments for macvlan are processed before the whole packet for the
    underlying device is reassembled, the "overlapping fragments" test in
    ip6_frag_queue() discards the whole fragment queue.

    To resolve this, add device ifindex to the search key and require it to
    match reassembling multicast packets and packets to link-local
    addresses.

    Note: similar patch has been already submitted by Yoshifuji Hideaki in

      http://patchwork.ozlabs.org/patch/220979/

    but got lost and forgotten for some reason.

    Signed-off-by: Michal Kubecek &lt;mkubecek@suse.cz&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit c5d998a60ac73841a42c0351e248a65747480b64
Author: Aaro Koskinen &lt;aaro.koskinen@iki.fi&gt;
Date:   Sun Nov 22 01:08:54 2015 +0200

    broadcom: fix PHY_ID_BCM5481 entry in the id table

    [ Upstream commit 3c25a860d17b7378822f35d8c9141db9507e3beb ]

    Commit fcb26ec5b18d ("broadcom: move all PHY_ID's to header")
    updated broadcom_tbl to use PHY_IDs, but incorrectly replaced 0x0143bca0
    with PHY_ID_BCM5482 (making a duplicate entry, and completely omitting
    the original). Fix that.

    Fixes: fcb26ec5b18d ("broadcom: move all PHY_ID's to header")
    Signed-off-by: Aaro Koskinen &lt;aaro.koskinen@iki.fi&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 07ea536a4530c41ff2d5266359b45eed2500e04f
Author: Nikolay Aleksandrov &lt;nikolay@cumulusnetworks.com&gt;
Date:   Fri Nov 20 13:54:20 2015 +0100

    net: ip6mr: fix static mfc/dev leaks on table destruction

    [ Upstream commit 4c6980462f32b4f282c5d8e5f7ea8070e2937725 ]

    Similar to ipv4, when destroying an mrt table the static mfc entries and
    the static devices are kept, which leads to devices that can never be
    destroyed (because of refcnt taken) and leaked memory. Make sure that
    everything is cleaned up on netns destruction.

    Fixes: 8229efdaef1e ("netns: ip6mr: enable namespace support in ipv6 multicast forwarding code")
    CC: Benjamin Thery &lt;benjamin.thery@bull.net&gt;
    Signed-off-by: Nikolay Aleksandrov &lt;nikolay@cumulusnetworks.com&gt;
    Reviewed-by: Cong Wang &lt;cwang@twopensource.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 5a88886f6bed598298f98b2657cd9df1a2104063
Author: Nikolay Aleksandrov &lt;nikolay@cumulusnetworks.com&gt;
Date:   Fri Nov 20 13:54:19 2015 +0100

    net: ipmr: fix static mfc/dev leaks on table destruction

    [ Upstream commit 0e615e9601a15efeeb8942cf7cd4dadba0c8c5a7 ]

    When destroying an mrt table the static mfc entries and the static
    devices are kept, which leads to devices that can never be destroyed
    (because of refcnt taken) and leaked memory, for example:
    unreferenced object 0xffff880034c144c0 (size 192):
      comm "mfc-broken", pid 4777, jiffies 4320349055 (age 46001.964s)
      hex dump (first 32 bytes):
        98 53 f0 34 00 88 ff ff 98 53 f0 34 00 88 ff ff  .S.4.....S.4....
        ef 0a 0a 14 01 02 03 04 00 00 00 00 01 00 00 00  ................
      backtrace:
        [&lt;ffffffff815c1b9e&gt;] kmemleak_alloc+0x4e/0xb0
        [&lt;ffffffff811ea6e0&gt;] kmem_cache_alloc+0x190/0x300
        [&lt;ffffffff815931cb&gt;] ip_mroute_setsockopt+0x5cb/0x910
        [&lt;ffffffff8153d575&gt;] do_ip_setsockopt.isra.11+0x105/0xff0
        [&lt;ffffffff8153e490&gt;] ip_setsockopt+0x30/0xa0
        [&lt;ffffffff81564e13&gt;] raw_setsockopt+0x33/0x90
        [&lt;ffffffff814d1e14&gt;] sock_common_setsockopt+0x14/0x20
        [&lt;ffffffff814d0b51&gt;] SyS_setsockopt+0x71/0xc0
        [&lt;ffffffff815cdbf6&gt;] entry_SYSCALL_64_fastpath+0x16/0x7a
        [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

    Make sure that everything is cleaned on netns destruction.

    Signed-off-by: Nikolay Aleksandrov &lt;nikolay@cumulusnetworks.com&gt;
    Reviewed-by: Cong Wang &lt;cwang@twopensource.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 40e1d40862d8fbe5198179804ccc5df9fa4d47b7
Author: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Date:   Fri Nov 20 00:11:56 2015 +0100

    net, scm: fix PaX detected msg_controllen overflow in scm_detach_fds

    [ Upstream commit 6900317f5eff0a7070c5936e5383f589e0de7a09 ]

    David and HacKurx reported a following/similar size overflow triggered
    in a grsecurity kernel, thanks to PaX's gcc size overflow plugin:

    (Already fixed in later grsecurity versions by Brad and PaX Team.)

    [ 1002.296137] PAX: size overflow detected in function scm_detach_fds net/core/scm.c:314
                   cicus.202_127 min, count: 4, decl: msg_controllen; num: 0; context: msghdr;
    [ 1002.296145] CPU: 0 PID: 3685 Comm: scm_rights_recv Not tainted 4.2.3-grsec+ #7
    [ 1002.296149] Hardware name: Apple Inc. MacBookAir5,1/Mac-66F35F19FE2A0D05, [...]
    [ 1002.296153]  ffffffff81c27366 0000000000000000 ffffffff81c27375 ffffc90007843aa8
    [ 1002.296162]  ffffffff818129ba 0000000000000000 ffffffff81c27366 ffffc90007843ad8
    [ 1002.296169]  ffffffff8121f838 fffffffffffffffc fffffffffffffffc ffffc90007843e60
    [ 1002.296176] Call Trace:
    [ 1002.296190]  [&lt;ffffffff818129ba&gt;] dump_stack+0x45/0x57
    [ 1002.296200]  [&lt;ffffffff8121f838&gt;] report_size_overflow+0x38/0x60
    [ 1002.296209]  [&lt;ffffffff816a979e&gt;] scm_detach_fds+0x2ce/0x300
    [ 1002.296220]  [&lt;ffffffff81791899&gt;] unix_stream_read_generic+0x609/0x930
    [ 1002.296228]  [&lt;ffffffff81791c9f&gt;] unix_stream_recvmsg+0x4f/0x60
    [ 1002.296236]  [&lt;ffffffff8178dc00&gt;] ? unix_set_peek_off+0x50/0x50
    [ 1002.296243]  [&lt;ffffffff8168fac7&gt;] sock_recvmsg+0x47/0x60
    [ 1002.296248]  [&lt;ffffffff81691522&gt;] ___sys_recvmsg+0xe2/0x1e0
    [ 1002.296257]  [&lt;ffffffff81693496&gt;] __sys_recvmsg+0x46/0x80
    [ 1002.296263]  [&lt;ffffffff816934fc&gt;] SyS_recvmsg+0x2c/0x40
    [ 1002.296271]  [&lt;ffffffff8181a3ab&gt;] entry_SYSCALL_64_fastpath+0x12/0x85

    Further investigation showed that this can happen when an *odd* number of
    fds are being passed over AF_UNIX sockets.

    In these cases CMSG_LEN(i * sizeof(int)) and CMSG_SPACE(i * sizeof(int)),
    where i is the number of successfully passed fds, differ by 4 bytes due
    to the extra CMSG_ALIGN() padding in CMSG_SPACE() to an 8 byte boundary
    on 64 bit. The padding is used to align subsequent cmsg headers in the
    control buffer.

    When the control buffer passed in from the receiver side *lacks* these 4
    bytes (e.g. due to buggy/wrong API usage), then msg-&gt;msg_controllen will
    overflow in scm_detach_fds():

      int cmlen = CMSG_LEN(i * sizeof(int));  &lt;--- cmlen w/o tail-padding
      err = put_user(SOL_SOCKET, &amp;cm-&gt;cmsg_level);
      if (!err)
        err = put_user(SCM_RIGHTS, &amp;cm-&gt;cmsg_type);
      if (!err)
        err = put_user(cmlen, &amp;cm-&gt;cmsg_len);
      if (!err) {
        cmlen = CMSG_SPACE(i * sizeof(int));  &lt;--- cmlen w/ 4 byte extra tail-padding
        msg-&gt;msg_control += cmlen;
        msg-&gt;msg_controllen -= cmlen;         &lt;--- iff no tail-padding space here ...
      }                                            ... wrap-around

    F.e. it will wrap to a length of 18446744073709551612 bytes in case the
    receiver passed in msg-&gt;msg_controllen of 20 bytes, and the sender
    properly transferred 1 fd to the receiver, so that its CMSG_LEN results
    in 20 bytes and CMSG_SPACE in 24 bytes.

    In case of MSG_CMSG_COMPAT (scm_detach_fds_compat()), I haven't seen an
    issue in my tests as alignment seems always on 4 byte boundary. Same
    should be in case of native 32 bit, where we end up with 4 byte boundaries
    as well.

    In practice, passing msg-&gt;msg_controllen of 20 to recvmsg() while receiving
    a single fd would mean that on successful return, msg-&gt;msg_controllen is
    being set by the kernel to 24 bytes instead, thus more than the input
    buffer advertised. It could f.e. become an issue if such application later
    on zeroes or copies the control buffer based on the returned msg-&gt;msg_controllen
    elsewhere.

    Maximum number of fds we can send is a hard upper limit SCM_MAX_FD (253).

    Going over the code, it seems like msg-&gt;msg_controllen is not being read
    after scm_detach_fds() in scm_recv() anymore by the kernel, good!

    Relevant recvmsg() handler are unix_dgram_recvmsg() (unix_seqpacket_recvmsg())
    and unix_stream_recvmsg(). Both return back to their recvmsg() caller,
    and ___sys_recvmsg() places the updated length, that is, new msg_control -
    old msg_control pointer into msg-&gt;msg_controllen (hence the 24 bytes seen
    in the example).

    Long time ago, Wei Yongjun fixed something related in commit 1ac70e7ad24a
    ("[NET]: Fix function put_cmsg() which may cause usr application memory
    overflow").

    RFC3542, section 20.2. says:

      The fields shown as "XX" are possible padding, between the cmsghdr
      structure and the data, and between the data and the next cmsghdr
      structure, if required by the implementation. While sending an
      application may or may not include padding at the end of last
      ancillary data in msg_controllen and implementations must accept both
      as valid. On receiving a portable application must provide space for
      padding at the end of the last ancillary data as implementations may
      copy out the padding at the end of the control message buffer and
      include it in the received msg_controllen. When recvmsg() is called
      if msg_controllen is too small for all the ancillary data items
      including any trailing padding after the last item an implementation
      may set MSG_CTRUNC.

    Since we didn't place MSG_CTRUNC for already quite a long time, just do
    the same as in 1ac70e7ad24a to avoid an overflow.

    Btw, even man-page author got this wrong :/ See db939c9b26e9 ("cmsg.3: Fix
    error in SCM_RIGHTS code sample"). Some people must have copied this (?),
    thus it got triggered in the wild (reported several times during boot by
    David and HacKurx).

    No Fixes tag this time as pre 2002 (that is, pre history tree).

    Reported-by: David Sterba &lt;dave@jikos.cz&gt;
    Reported-by: HacKurx &lt;hackurx@gmail.com&gt;
    Cc: PaX Team &lt;pageexec@freemail.hu&gt;
    Cc: Emese Revfy &lt;re.emese@gmail.com&gt;
    Cc: Brad Spengler &lt;spender@grsecurity.net&gt;
    Cc: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
    Cc: Eric Dumazet &lt;edumazet@google.com&gt;
    Reviewed-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
    Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 3547cdcbe5212a5725441493c6fcf5f60ac4159f
Author: Eric Dumazet &lt;edumazet@google.com&gt;
Date:   Thu Nov 26 08:18:14 2015 -0800

    tcp: initialize tp-&gt;copied_seq in case of cross SYN connection

    [ Upstream commit 142a2e7ece8d8ac0e818eb2c91f99ca894730e2a ]

    Dmitry provided a syzkaller (http://github.com/google/syzkaller)
    generated program that triggers the WARNING at
    net/ipv4/tcp.c:1729 in tcp_recvmsg() :

    WARN_ON(tp-&gt;copied_seq != tp-&gt;rcv_nxt &amp;&amp;
            !(flags &amp; (MSG_PEEK | MSG_TRUNC)));

    His program is specifically attempting a Cross SYN TCP exchange,
    that we support (for the pleasure of hackers ?), but it looks we
    lack proper tcp-&gt;copied_seq initialization.

    Thanks again Dmitry for your report and testings.

    Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
    Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Tested-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 98d2ffdc2c14d782d1b2982a5c05fb1f2f9eabe5
Author: Eric Dumazet &lt;edumazet@google.com&gt;
Date:   Wed Nov 18 12:40:13 2015 -0800

    tcp: md5: fix lockdep annotation

    [ Upstream commit 1b8e6a01e19f001e9f93b39c32387961c91ed3cc ]

    When a passive TCP is created, we eventually call tcp_md5_do_add()
    with sk pointing to the child. It is not owner by the user yet (we
    will add this socket into listener accept queue a bit later anyway)

    But we do own the spinlock, so amend the lockdep annotation to avoid
    following splat :

    [ 8451.090932] net/ipv4/tcp_ipv4.c:923 suspicious rcu_dereference_protected() usage!
    [ 8451.090932]
    [ 8451.090932] other info that might help us debug this:
    [ 8451.090932]
    [ 8451.090934]
    [ 8451.090934] rcu_scheduler_active = 1, debug_locks = 1
    [ 8451.090936] 3 locks held by socket_sockopt_/214795:
    [ 8451.090936]  #0:  (rcu_read_lock){.+.+..}, at: [&lt;ffffffff855c6ac1&gt;] __netif_receive_skb_core+0x151/0xe90
    [ 8451.090947]  #1:  (rcu_read_lock){.+.+..}, at: [&lt;ffffffff85618143&gt;] ip_local_deliver_finish+0x43/0x2b0
    [ 8451.090952]  #2:  (slock-AF_INET){+.-...}, at: [&lt;ffffffff855acda5&gt;] sk_clone_lock+0x1c5/0x500
    [ 8451.090958]
    [ 8451.090958] stack backtrace:
    [ 8451.090960] CPU: 7 PID: 214795 Comm: socket_sockopt_

    [ 8451.091215] Call Trace:
    [ 8451.091216]  &lt;IRQ&gt;  [&lt;ffffffff856fb29c&gt;] dump_stack+0x55/0x76
    [ 8451.091229]  [&lt;ffffffff85123b5b&gt;] lockdep_rcu_suspicious+0xeb/0x110
    [ 8451.091235]  [&lt;ffffffff8564544f&gt;] tcp_md5_do_add+0x1bf/0x1e0
    [ 8451.091239]  [&lt;ffffffff85645751&gt;] tcp_v4_syn_recv_sock+0x1f1/0x4c0
    [ 8451.091242]  [&lt;ffffffff85642b27&gt;] ? tcp_v4_md5_hash_skb+0x167/0x190
    [ 8451.091246]  [&lt;ffffffff85647c78&gt;] tcp_check_req+0x3c8/0x500
    [ 8451.091249]  [&lt;ffffffff856451ae&gt;] ? tcp_v4_inbound_md5_hash+0x11e/0x190
    [ 8451.091253]  [&lt;ffffffff85647170&gt;] tcp_v4_rcv+0x3c0/0x9f0
    [ 8451.091256]  [&lt;ffffffff85618143&gt;] ? ip_local_deliver_finish+0x43/0x2b0
    [ 8451.091260]  [&lt;ffffffff856181b6&gt;] ip_local_deliver_finish+0xb6/0x2b0
    [ 8451.091263]  [&lt;ffffffff85618143&gt;] ? ip_local_deliver_finish+0x43/0x2b0
    [ 8451.091267]  [&lt;ffffffff85618d38&gt;] ip_local_deliver+0x48/0x80
    [ 8451.091270]  [&lt;ffffffff85618510&gt;] ip_rcv_finish+0x160/0x700
    [ 8451.091273]  [&lt;ffffffff8561900e&gt;] ip_rcv+0x29e/0x3d0
    [ 8451.091277]  [&lt;ffffffff855c74b7&gt;] __netif_receive_skb_core+0xb47/0xe90

    Fixes: a8afca0329988 ("tcp: md5: protects md5sig_info with RCU")
    Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
    Reported-by: Willem de Bruijn &lt;willemb@google.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit c5806c7c2c703a2f3a879c2e3399529333a2b349
Author: Bjørn Mork &lt;bjorn@mork.no&gt;
Date:   Wed Nov 18 21:13:07 2015 +0100

    net: qmi_wwan: add XS Stick W100-2 from 4G Systems

    [ Upstream commit 68242a5a1e2edce39b069385cbafb82304eac0f1 ]

    Thomas reports
    "
    4gsystems sells two total different LTE-surfsticks under the same name.
    ..
    The newer version of XS Stick W100 is from "omega"
    ..
    Under windows the driver switches to the same ID, and uses MI03\6 for
    network and MI01\6 for modem.
    ..
    echo "1c9e 9b01" &gt; /sys/bus/usb/drivers/qmi_wwan/new_id
    echo "1c9e 9b01" &gt; /sys/bus/usb-serial/drivers/option1/new_id

    T:  Bus=01 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#=  4 Spd=480 MxCh= 0
    D:  Ver= 2.00 Cls=00(&gt;ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=1c9e ProdID=9b01 Rev=02.32
    S:  Manufacturer=USB Modem
    S:  Product=USB Modem
    S:  SerialNumber=
    C:  #Ifs= 5 Cfg#= 1 Atr=80 MxPwr=500mA
    I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
    I:  If#= 4 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

    Now all important things are there:

    wwp0s29f7u2i3 (net), ttyUSB2 (at), cdc-wdm0 (qmi), ttyUSB1 (at)

    There is also ttyUSB0, but it is not usable, at least not for at.

    The device works well with qmi and ModemManager-NetworkManager.
    "

    Reported-by: Thomas Schäfer &lt;tschaefer@t-online.de&gt;
    Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 08f97ac765394b2370c311be1930553cd27d9245
Author: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Date:   Mon Nov 16 13:09:10 2015 -0500

    snmp: Remove duplicate OUTMCAST stat increment

    [ Upstream commit 41033f029e393a64e81966cbe34d66c6cf8a2e7e ]

    the OUTMCAST stat is double incremented, getting bumped once in the mcast code
    itself, and again in the common ip output path.  Remove the mcast bump, as its
    not needed

    Validated by the reporter, with good results

    Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
    Reported-by: Claus Jensen &lt;claus.jensen@microsemi.com&gt;
    CC: Claus Jensen &lt;claus.jensen@microsemi.com&gt;
    CC: David Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 3fb28c97238bc1ddd66229bb6d2bc07b2452c6ab
Author: lucien &lt;lucien.xin@gmail.com&gt;
Date:   Thu Nov 12 13:07:07 2015 +0800

    sctp: translate host order to network order when setting a hmacid

    [ Upstream commit ed5a377d87dc4c87fb3e1f7f698cba38cd893103 ]

    now sctp auth cannot work well when setting a hmacid manually, which
    is caused by that we didn't use the network order for hmacid, so fix
    it by adding the transformation in sctp_auth_ep_set_hmacs.

    even we set hmacid with the network order in userspace, it still
    can't work, because of this condition in sctp_auth_ep_set_hmacs():

    		if (id &gt; SCTP_AUTH_HMAC_ID_MAX)
    			return -EOPNOTSUPP;

    so this wasn't working before and thus it won't break compatibility.

    Fixes: 65b07e5d0d09 ("[SCTP]: API updates to suport SCTP-AUTH extensions.")
    Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
    Signed-off-by: Marcelo Ricardo Leitner &lt;marcelo.leitner@gmail.com&gt;
    Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
    Acked-by: Vlad Yasevich &lt;vyasevich@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;

commit da8db0830a2ce63f628150307a01a315f5081202
Author: Rainer Weikusat &lt;rweikusat@mobileactivedefense.com&gt;
Date:   Fri Nov 20 22:07:23 2015 +0000

    unix: avoid use-after-free in ep_remove_wait_queue

    [ Upstream commit 7d267278a9ece963d77eefec61630223fce08c6c ]

    Rainer Weikusat &lt;rweikusat@mobileactivedefense.com&gt; writes:
    An AF_UNIX datagram socket being the client in an n:1 association with
    some server socket is only allowed to send messages to the server if the
    receive queue of this socket contains at most sk_max_ack_backlog
    datagrams. This implies that prospective writers might be forced to go
    to sleep despite none of the message presently enqueued on the server
    receive queue were sent by them. In order to ensure that these will be
    woken up once space becomes again available, the present unix_dgram_poll
    routine does a second sock_poll_wait call with the peer_wait wait queue
    of the server socket as queue argument (unix_dgram_recvmsg does a wake
    up on this queue after a datagram was received). This is inherently
    problematic because the server socket is only guaranteed to remain alive
    for as long as the client still holds a reference to it. In case the
    connection is dissolved via connect or by the dead peer detection logic
    in unix_dgram_sendmsg, the server socket may be freed despite "the
    polling mechanism" (in particular, epoll) still has a pointer to the
    corresponding peer_wait queue. There's no way to forcibly deregister a
    wait queue with epoll.

    Based on an idea by Jason Baron, the patch below changes the code such
    that a wait_queue_t belonging to the client socket is enqueued on the
    peer_wait queue of the server whenever the peer receive queue full
    condition is detected by either a sendmsg or a poll. A wake up on the
    peer queue is then relayed to the ordinary wait queue of the client
    socket via wake function. The connection to the peer wait queue is again
    dissolved if either a wake up is about to be relayed or the client
    socket reconnects or a dead peer is detected or the client socket is
    itself closed. This enables removing the second sock_poll_wait from
    unix_dgram_poll, thus avoiding the use-after-free, while still ensuring
    that no blocked writer sleeps forever.

    Signed-off-by: Rainer Weikusat &lt;rweikusat@mobileactivedefense.com&gt;
    Fixes: ec0d215f9420 ("af_unix: fix 'poll for write'/connected DGRAM sockets")
    Reviewed-by: Jason Baron &lt;jbaron@akamai.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>Linux 3.10.94</title>
<updated>2016-08-26T18:47:10+00:00</updated>
<author>
<name>Stefan Guendhoer</name>
<email>stefan@guendhoer.com</email>
</author>
<published>2016-01-13T04:17:44+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=c159c85a46937d2c2650e4376849f1670c6c2da6'/>
<id>urn:sha1:c159c85a46937d2c2650e4376849f1670c6c2da6</id>
<content type='text'>
commit 03ed106ff4c200d01f3c72f71fa9c5b18da07d9b
Author: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Date:   Wed Dec 9 13:43:21 2015 -0500

    Linux 3.10.94

commit 82dbfa50b0ee671e40779541a6ceef0850d19c84
Author: Clemens Ladisch &lt;clemens@ladisch.de&gt;
Date:   Sun Nov 15 22:39:08 2015 +0100

    ALSA: usb-audio: work around CH345 input SysEx corruption

    commit a91e627e3f0ed820b11d86cdc04df38f65f33a70 upstream.

    One of the many faults of the QinHeng CH345 USB MIDI interface chip is
    that it does not handle received SysEx messages correctly -- every second
    event packet has a wrong code index number, which is the one from the last
    seen message, instead of 4.  For example, the two messages "FE F0 01 02 03
    04 05 06 07 08 09 0A 0B 0C 0D 0E F7" result in the following event
    packets:

    correct:       CH345:
    0F FE 00 00    0F FE 00 00
    04 F0 01 02    04 F0 01 02
    04 03 04 05    0F 03 04 05
    04 06 07 08    04 06 07 08
    04 09 0A 0B    0F 09 0A 0B
    04 0C 0D 0E    04 0C 0D 0E
    05 F7 00 00    05 F7 00 00

    A class-compliant driver must interpret an event packet with CIN 15 as
    having a single data byte, so the other two bytes would be ignored.  The
    message received by the host would then be missing two bytes out of six;
    in this example, "F0 01 02 03 06 07 08 09 0C 0D 0E F7".

    These corrupted SysEx event packages contain only data bytes, while the
    CH345 uses event packets with a correct CIN value only for messages with
    a status byte, so it is possible to distinguish between these two cases by
    checking for the presence of this status byte.

    (Other bugs in the CH345's input handling, such as the corruption resulting
    from running status, cannot be worked around.)

    Signed-off-by: Clemens Ladisch &lt;clemens@ladisch.de&gt;
    Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 88ab73208769677b3935d747a43aab1213d15d39
Author: Clemens Ladisch &lt;clemens@ladisch.de&gt;
Date:   Sun Nov 15 22:38:29 2015 +0100

    ALSA: usb-audio: prevent CH345 multiport output SysEx corruption

    commit 1ca8b201309d842642f221db7f02f71c0af5be2d upstream.

    The CH345 USB MIDI chip has two output ports.  However, they are
    multiplexed through one pin, and the number of ports cannot be reduced
    even for hardware that implements only one connector, so for those
    devices, data sent to either port ends up on the same hardware output.
    This becomes a problem when both ports are used at the same time, as
    longer MIDI commands (such as SysEx messages) are likely to be
    interrupted by messages from the other port, and thus to get lost.

    It would not be possible for the driver to detect how many ports the
    device actually has, except that in practice, _all_ devices built with
    the CH345 have only one port.  So we can just ignore the device's
    descriptors, and hardcode one output port.

    Signed-off-by: Clemens Ladisch &lt;clemens@ladisch.de&gt;
    Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 5d39c9b60cfd2381737cdeb5a74bd79d4b27e84c
Author: Clemens Ladisch &lt;clemens@ladisch.de&gt;
Date:   Sun Nov 15 22:37:44 2015 +0100

    ALSA: usb-audio: add packet size quirk for the Medeli DD305

    commit 98d362becb6621bebdda7ed0eac7ad7ec6c37898 upstream.

    Signed-off-by: Clemens Ladisch &lt;clemens@ladisch.de&gt;
    Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 53009ce204642c3191d6f4d773d28c80f0c27971
Author: Bjørn Mork &lt;bjorn@mork.no&gt;
Date:   Wed Nov 18 21:12:33 2015 +0100

    USB: option: add XS Stick W100-2 from 4G Systems

    commit 638148e20c7f8f6e95017fdc13bce8549a6925e0 upstream.

    Thomas reports
    "
    4gsystems sells two total different LTE-surfsticks under the same name.
    ..
    The newer version of XS Stick W100 is from "omega"
    ..
    Under windows the driver switches to the same ID, and uses MI03\6 for
    network and MI01\6 for modem.
    ..
    echo "1c9e 9b01" &gt; /sys/bus/usb/drivers/qmi_wwan/new_id
    echo "1c9e 9b01" &gt; /sys/bus/usb-serial/drivers/option1/new_id

    T:  Bus=01 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#=  4 Spd=480 MxCh= 0
    D:  Ver= 2.00 Cls=00(&gt;ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=1c9e ProdID=9b01 Rev=02.32
    S:  Manufacturer=USB Modem
    S:  Product=USB Modem
    S:  SerialNumber=
    C:  #Ifs= 5 Cfg#= 1 Atr=80 MxPwr=500mA
    I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
    I:  If#= 4 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

    Now all important things are there:

    wwp0s29f7u2i3 (net), ttyUSB2 (at), cdc-wdm0 (qmi), ttyUSB1 (at)

    There is also ttyUSB0, but it is not usable, at least not for at.

    The device works well with qmi and ModemManager-NetworkManager.
    "

    Reported-by: Thomas Schäfer &lt;tschaefer@t-online.de&gt;
    Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit b2dbbdda6605358caeed741f51101395991dda5f
Author: Aleksander Morgado &lt;aleksander@aleksander.es&gt;
Date:   Wed Nov 11 19:51:40 2015 +0100

    USB: serial: option: add support for Novatel MiFi USB620L

    commit e07af133c3e2716db25e3e1e1d9f10c2088e9c1a upstream.

    Also known as Verizon U620L.

    The device is modeswitched from 1410:9020 to 1410:9022 by selecting the
    4th USB configuration:

     $ sudo usb_modeswitch –v 0x1410 –p 0x9020 –u 4

    This configuration provides a ECM interface as well as TTYs ('Enterprise
    Mode' according to the U620 Linux integration guide).

    Signed-off-by: Aleksander Morgado &lt;aleksander@aleksander.es&gt;
    Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 9a960144742c6b57a17e8fd0df982b9ea28ae3c9
Author: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Date:   Fri Oct 23 09:53:50 2015 +0200

    usb: musb: core: fix order of arguments to ulpi write callback

    commit 705e63d2b29c8bbf091119084544d353bda70393 upstream.

    There is a bit of a mess in the order of arguments to the ulpi write
    callback. There is

    	int ulpi_write(struct ulpi *ulpi, u8 addr, u8 val)

    in drivers/usb/common/ulpi.c;

    	struct usb_phy_io_ops {
    		...
    		int (*write)(struct usb_phy *x, u32 val, u32 reg);
    	}

    in include/linux/usb/phy.h.

    The callback registered by the musb driver has to comply to the latter,
    but up to now had "offset" first which effectively made the function
    broken for correct users. So flip the order and while at it also
    switch to the parameter names of struct usb_phy_io_ops's write.

    Fixes: ffb865b1e460 ("usb: musb: add ulpi access operations")
    Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
    Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 2391fbf63585c3befa63a4780f470cf59539a6f7
Author: Jiri Slaby &lt;jslaby@suse.cz&gt;
Date:   Mon Nov 2 10:27:00 2015 +0100

    usblp: do not set TASK_INTERRUPTIBLE before lock

    commit 19cd80a214821f4b558560ebd76bfb2c38b4f3d8 upstream.

    It is not permitted to set task state before lock. usblp_wwait sets
    the state to TASK_INTERRUPTIBLE and calls mutex_lock_interruptible.
    Upon return from that function, the state will be TASK_RUNNING again.

    This is clearly a bug and a warning is generated with LOCKDEP too:
    WARNING: CPU: 1 PID: 5109 at kernel/sched/core.c:7404 __might_sleep+0x7d/0x90()
    do not call blocking ops when !TASK_RUNNING; state=1 set at [&lt;ffffffffa0c588d0&gt;] usblp_wwait+0xa0/0x310 [usblp]
    Modules linked in: ...
    CPU: 1 PID: 5109 Comm: captmon Tainted: G        W       4.2.5-0.gef2823b-default #1
    Hardware name: LENOVO 23252SG/23252SG, BIOS G2ET33WW (1.13 ) 07/24/2012
     ffffffff81a4edce ffff880236ec7ba8 ffffffff81716651 0000000000000000
     ffff880236ec7bf8 ffff880236ec7be8 ffffffff8106e146 0000000000000282
     ffffffff81a50119 000000000000028b 0000000000000000 ffff8802dab7c508
    Call Trace:
    ...
     [&lt;ffffffff8106e1c6&gt;] warn_slowpath_fmt+0x46/0x50
     [&lt;ffffffff8109a8bd&gt;] __might_sleep+0x7d/0x90
     [&lt;ffffffff8171b20f&gt;] mutex_lock_interruptible_nested+0x2f/0x4b0
     [&lt;ffffffffa0c588fc&gt;] usblp_wwait+0xcc/0x310 [usblp]
     [&lt;ffffffffa0c58bb2&gt;] usblp_write+0x72/0x350 [usblp]
     [&lt;ffffffff8121ed98&gt;] __vfs_write+0x28/0xf0
    ...

    Commit 7f477358e2384c54b190cc3b6ce28277050a041b (usblp: Implement the
    ENOSPC convention) moved the set prior locking. So move it back after
    the lock.

    Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
    Fixes: 7f477358e2 ("usblp: Implement the ENOSPC convention")
    Acked-By: Pete Zaitcev &lt;zaitcev@yahoo.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit b2a5b5964748a5a25a28652f4ea4223a534a4c86
Author: Robin Murphy &lt;robin.murphy@arm.com&gt;
Date:   Thu Oct 22 15:41:52 2015 +0100

    arm64: Fix compat register mappings

    commit 5accd17d0eb523350c9ef754d655e379c9bb93b3 upstream.

    For reasons not entirely apparent, but now enshrined in history, the
    architectural mapping of AArch32 banked registers to AArch64 registers
    actually orders SP_&lt;mode&gt; and LR_&lt;mode&gt; backwards compared to the
    intuitive r13/r14 order, for all modes except FIQ.

    Fix the compat_&lt;reg&gt;_&lt;mode&gt; macros accordingly, in the hope of avoiding
    subtle bugs with KVM and AArch32 guests.

    Signed-off-by: Robin Murphy &lt;robin.murphy@arm.com&gt;
    Acked-by: Will Deacon &lt;will.deacon@arm.com&gt;
    Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 3b792c868153a9911e46ec3069b7b94e7cc5c6c6
Author: Mirza Krak &lt;mirza.krak@hostmobility.com&gt;
Date:   Tue Nov 10 14:59:34 2015 +0100

    can: sja1000: clear interrupts on start

    commit 7cecd9ab80f43972c056dc068338f7bcc407b71c upstream.

    According to SJA1000 data sheet error-warning (EI) interrupt is not
    cleared by setting the controller in to reset-mode.

    Then if we have the following case:
    - system is suspended (echo mem &gt; /sys/power/state) and SJA1000 is left
      in operating state
    - A bus error condition occurs which activates EI interrupt, system is
      still suspended which means EI interrupt will be not be handled nor
      cleared.

    If the above two events occur, on resume there is no way to return the
    SJA1000 to operating state, except to cycle power to it.

    By simply reading the IR register on start we will clear any previous
    conditions that could be present.

    Signed-off-by: Mirza Krak &lt;mirza.krak@hostmobility.com&gt;
    Reported-by: Christian Magnusson &lt;Christian.Magnusson@semcon.com&gt;
    Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit c45820774f2d7f3196c7ad371b026c2b6e93c9a7
Author: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Date:   Mon Sep 7 12:05:41 2015 +0200

    Bluetooth: hidp: fix device disconnect on idle timeout

    commit 660f0fc07d21114549c1862e67e78b1cf0c90c29 upstream.

    The HIDP specs define an idle-timeout which automatically disconnects a
    device. This has always been implemented in the HIDP layer and forced a
    synchronous shutdown of the hidp-scheduler. This works just fine, but
    lacks a forced disconnect on the underlying l2cap channels. This has been
    broken since:

        commit 5205185d461d5902325e457ca80bd421127b7308
        Author: David Herrmann &lt;dh.herrmann@gmail.com&gt;
        Date:   Sat Apr 6 20:28:47 2013 +0200

            Bluetooth: hidp: remove old session-management

    The old session-management always forced an l2cap error on the ctrl/intr
    channels when shutting down. The new session-management skips this, as we
    don't want to enforce channel policy on the caller. In other words, if
    user-space removes an HIDP device, the underlying channels (which are
    *owned* and *referenced* by user-space) are still left active. User-space
    needs to call shutdown(2) or close(2) to release them.

    Unfortunately, this does not work with idle-timeouts. There is no way to
    signal user-space that the HIDP layer has been stopped. The API simply
    does not support any event-passing except for poll(2). Hence, we restore
    old behavior and force EUNATCH on the sockets if the HIDP layer is
    disconnected due to idle-timeouts (behavior of explicit disconnects
    remains unmodified). User-space can still call

        getsockopt(..., SO_ERROR, ...)

    ..to retrieve the EUNATCH error and clear sk_err. Hence, the channels can
    still be re-used (which nobody does so far, though). Therefore, the API
    still supports the new behavior, but with this patch it's also compatible
    to the old implicit channel shutdown.

    Reported-by: Mark Haun &lt;haunma@keteu.org&gt;
    Reported-by: Luiz Augusto von Dentz &lt;luiz.dentz@gmail.com&gt;
    Signed-off-by: David Herrmann &lt;dh.herrmann@gmail.com&gt;
    Signed-off-by: Marcel Holtmann &lt;marcel@holtmann.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 9babe681a7554368197bc33b33eaea6ec3112f51
Author: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
Date:   Sun Oct 18 22:14:48 2015 -0500

    staging: rtl8712: Add device ID for Sitecom WLA2100

    commit 1e6e63283691a2a9048a35d9c6c59cf0abd342e4 upstream.

    This adds the USB ID for the Sitecom WLA2100. The Windows 10 inf file
    was checked to verify that the addition is correct.

    Reported-by: Frans van de Wiel &lt;fvdw@fvdw.eu&gt;
    Signed-off-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
    Cc: Frans van de Wiel &lt;fvdw@fvdw.eu&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 95563ce161961fbdf5df6d2b2df0d8ee5cf660c9
Author: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Date:   Mon Sep 21 19:19:53 2015 +0300

    mwifiex: fix mwifiex_rdeeprom_read()

    commit 1f9c6e1bc1ba5f8a10fcd6e99d170954d7c6d382 upstream.

    There were several bugs here.

    1)  The done label was in the wrong place so we didn't copy any
        information out when there was no command given.

    2)  We were using PAGE_SIZE as the size of the buffer instead of
        "PAGE_SIZE - pos".

    3)  snprintf() returns the number of characters that would have been
        printed if there were enough space.  If there was not enough space
        (and we had fixed the memory corruption bug #2) then it would result
        in an information leak when we do simple_read_from_buffer().  I've
        changed it to use scnprintf() instead.

    I also removed the initialization at the start of the function, because
    I thought it made the code a little more clear.

    Fixes: 5e6e3a92b9a4 ('wireless: mwifiex: initial commit for Marvell mwifiex driver')
    Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
    Acked-by: Amitkumar Karwar &lt;akarwar@marvell.com&gt;
    Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit dde9eef8c909fac6f2bac664598a1b8553bbb003
Author: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Date:   Fri Sep 25 18:09:35 2015 +0200

    net: mvneta: Fix CPU_MAP registers initialisation

    commit 2502d0ef272da7058ef303b849a2c8dc324c2e2e upstream.

    The CPU_MAP register is duplicated for each CPUs at different addresses,
    each instance being at a different address.

    However, the code so far was using CONFIG_NR_CPUS to initialise the CPU_MAP
    registers for each registers, while the SoCs embed at most 4 CPUs.

    This is especially an issue with multi_v7_defconfig, where CONFIG_NR_CPUS
    is currently set to 16, resulting in writes to registers that are not
    CPU_MAP.

    Fixes: c5aff18204da ("net: mvneta: driver for Marvell Armada 370/XP network unit")
    Signed-off-by: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
    Signed-off-by: Gregory CLEMENT &lt;gregory.clement@free-electrons.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit ad9550e54d1bb06eb91100e0b8129b77015943b7
Author: Johannes Berg &lt;johannes.berg@intel.com&gt;
Date:   Fri Aug 28 10:52:53 2015 +0200

    mac80211: fix driver RSSI event calculations

    commit 8ec6d97871f37e4743678ea4a455bd59580aa0f4 upstream.

    The ifmgd-&gt;ave_beacon_signal value cannot be taken as is for
    comparisons, it must be divided by since it's represented
    like that for better accuracy of the EWMA calculations. This
    would lead to invalid driver RSSI events. Fix the used value.

    Fixes: 615f7b9bb1f8 ("mac80211: add driver RSSI threshold events")
    Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 8fa88fa8503eba326e6ddf47e3ec1f71d6997dc0
Author: Andrew Cooper &lt;andrew.cooper3@citrix.com&gt;
Date:   Wed Jun 3 10:31:14 2015 +0100

    x86/cpu: Fix SMAP check in PVOPS environments

    commit 581b7f158fe0383b492acd1ce3fb4e99d4e57808 upstream.

    There appears to be no formal statement of what pv_irq_ops.save_fl() is
    supposed to return precisely.  Native returns the full flags, while lguest and
    Xen only return the Interrupt Flag, and both have comments by the
    implementations stating that only the Interrupt Flag is looked at.  This may
    have been true when initially implemented, but no longer is.

    To make matters worse, the Xen PVOP leaves the upper bits undefined, making
    the BUG_ON() undefined behaviour.  Experimentally, this now trips for 32bit PV
    guests on Broadwell hardware.  The BUG_ON() is consistent for an individual
    build, but not consistent for all builds.  It has also been a sitting timebomb
    since SMAP support was introduced.

    Use native_save_fl() instead, which will obtain an accurate view of the AC
    flag.

    Signed-off-by: Andrew Cooper &lt;andrew.cooper3@citrix.com&gt;
    Reviewed-by: David Vrabel &lt;david.vrabel@citrix.com&gt;
    Tested-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
    Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
    Cc: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
    Cc: Boris Ostrovsky &lt;boris.ostrovsky@oracle.com&gt;
    Cc: &lt;lguest@lists.ozlabs.org&gt;
    Cc: Xen-devel &lt;xen-devel@lists.xen.org&gt;
    Link: http://lkml.kernel.org/r/1433323874-6927-1-git-send-email-andrew.cooper3@citrix.com
    Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 8f14777b580d064a80f0adac4c2596d24a196205
Author: Borislav Petkov &lt;bp@suse.de&gt;
Date:   Thu Nov 5 16:57:56 2015 +0100

    x86/cpu: Call verify_cpu() after having entered long mode too

    commit 04633df0c43d710e5f696b06539c100898678235 upstream.

    When we get loaded by a 64-bit bootloader, kernel entry point is
    startup_64 in head_64.S. We don't trust any and all bootloaders because
    some will fiddle with CPU configuration so we go ahead and massage each
    CPU into sanity again.

    For example, some dell BIOSes have this XD disable feature which set
    IA32_MISC_ENABLE[34] and disable NX. This might be some dumb workaround
    for other OSes but Linux sure doesn't need it.

    A similar thing is present in the Surface 3 firmware - see
    https://bugzilla.kernel.org/show_bug.cgi?id=106051 - which sets this bit
    only on the BSP:

      # rdmsr -a 0x1a0
      400850089
      850089
      850089
      850089

    I know, right?!

    There's not even an off switch in there.

    So fix all those cases by sanitizing the 64-bit entry point too. For
    that, make verify_cpu() callable in 64-bit mode also.

    Requested-and-debugged-by: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
    Reported-and-tested-by: Bastien Nocera &lt;bugzilla@hadess.net&gt;
    Signed-off-by: Borislav Petkov &lt;bp@suse.de&gt;
    Cc: Matt Fleming &lt;matt@codeblueprint.co.uk&gt;
    Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
    Link: http://lkml.kernel.org/r/1446739076-21303-1-git-send-email-bp@alien8.de
    Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 308b1b04336a71008b9b9d143506625d4c653751
Author: Krzysztof Mazur &lt;krzysiek@podlesie.net&gt;
Date:   Fri Nov 6 14:18:36 2015 +0100

    x86/setup: Fix low identity map for &gt;= 2GB kernel range

    commit 68accac392d859d24adcf1be3a90e41f978bd54c upstream.

    The commit f5f3497cad8c extended the low identity mapping. However, if
    the kernel uses more than 2 GB (VMSPLIT_2G_OPT or VMSPLIT_1G memory
    split), the normal memory mapping is overwritten by the low identity
    mapping causing a crash. To avoid overwritting, limit the low identity
    map to cover only memory before kernel range (PAGE_OFFSET).

    Fixes: f5f3497cad8c "x86/setup: Extend low identity map to cover whole kernel range
    Signed-off-by: Krzysztof Mazur &lt;krzysiek@podlesie.net&gt;
    Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
    Cc: Borislav Petkov &lt;bp@alien8.de&gt;
    Cc: Laszlo Ersek &lt;lersek@redhat.com&gt;
    Cc: Matt Fleming &lt;matt.fleming@intel.com&gt;
    Cc: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
    Link: http://lkml.kernel.org/r/1446815916-22105-1-git-send-email-krzysiek@podlesie.net
    Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit fa4fbf71380d21a54e25b66e77b9700184c0ef91
Author: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Date:   Wed Oct 14 13:30:45 2015 +0200

    x86/setup: Extend low identity map to cover whole kernel range

    commit f5f3497cad8c8416a74b9aaceb127908755d020a upstream.

    On 32-bit systems, the initial_page_table is reused by
    efi_call_phys_prolog as an identity map to call
    SetVirtualAddressMap.  efi_call_phys_prolog takes care of
    converting the current CPU's GDT to a physical address too.

    For PAE kernels the identity mapping is achieved by aliasing the
    first PDPE for the kernel memory mapping into the first PDPE
    of initial_page_table.  This makes the EFI stub's trick "just work".

    However, for non-PAE kernels there is no guarantee that the identity
    mapping in the initial_page_table extends as far as the GDT; in this
    case, accesses to the GDT will cause a page fault (which quickly becomes
    a triple fault).  Fix this by copying the kernel mappings from
    swapper_pg_dir to initial_page_table twice, both at PAGE_OFFSET and at
    identity mapping.

    For some reason, this is only reproducible with QEMU's dynamic translation
    mode, and not for example with KVM.  However, even under KVM one can clearly
    see that the page table is bogus:

        $ qemu-system-i386 -pflash OVMF.fd -M q35 vmlinuz0 -s -S -daemonize
        $ gdb
        (gdb) target remote localhost:1234
        (gdb) hb *0x02858f6f
        Hardware assisted breakpoint 1 at 0x2858f6f
        (gdb) c
        Continuing.

        Breakpoint 1, 0x02858f6f in ?? ()
        (gdb) monitor info registers
        ...
        GDT=     0724e000 000000ff
        IDT=     fffbb000 000007ff
        CR0=0005003b CR2=ff896000 CR3=032b7000 CR4=00000690
        ...

    The page directory is sane:

        (gdb) x/4wx 0x32b7000
        0x32b7000:	0x03398063	0x03399063	0x0339a063	0x0339b063
        (gdb) x/4wx 0x3398000
        0x3398000:	0x00000163	0x00001163	0x00002163	0x00003163
        (gdb) x/4wx 0x3399000
        0x3399000:	0x00400003	0x00401003	0x00402003	0x00403003

    but our particular page directory entry is empty:

        (gdb) x/1wx 0x32b7000 + (0x724e000 &gt;&gt; 22) * 4
        0x32b7070:	0x00000000

    [ It appears that you can skate past this issue if you don't receive
      any interrupts while the bogus GDT pointer is loaded, or if you avoid
      reloading the segment registers in general.

      Andy Lutomirski provides some additional insight:

       "AFAICT it's entirely permissible for the GDTR and/or LDT
        descriptor to point to unmapped memory.  Any attempt to use them
        (segment loads, interrupts, IRET, etc) will try to access that memory
        as if the access came from CPL 0 and, if the access fails, will
        generate a valid page fault with CR2 pointing into the GDT or
        LDT."

      Up until commit 23a0d4e8fa6d ("efi: Disable interrupts around EFI
      calls, not in the epilog/prolog calls") interrupts were disabled
      around the prolog and epilog calls, and the functional GDT was
      re-installed before interrupts were re-enabled.

      Which explains why no one has hit this issue until now. ]

    Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
    Reported-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
    Cc: &lt;stable@vger.kernel.org&gt;
    Cc: Borislav Petkov &lt;bp@alien8.de&gt;
    Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
    Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
    Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
    Cc: Andy Lutomirski &lt;luto@amacapital.net&gt;
    Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
    [ Updated changelog. ]
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 8d4b96524384f8962c64c2ae061326682916dc48
Author: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Date:   Sat Oct 3 13:03:47 2015 -0700

    ARM: orion: Fix DSA platform device after mvmdio conversion

    commit d836ace65ee98d7079bc3c5afdbcc0e27dca20a3 upstream.

    DSA expects the host_dev pointer to be the device structure associated
    with the MDIO bus controller driver. First commit breaking that was
    c3a07134e6aa ("mv643xx_eth: convert to use the Marvell Orion MDIO
    driver"), and then, it got completely under the radar for a while.

    Reported-by: Frans van de Wiel &lt;fvdw@fvdw.eu&gt;
    Fixes: c3a07134e6aa ("mv643xx_eth: convert to use the Marvell Orion MDIO driver")
    Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
    Signed-off-by: Gregory CLEMENT &lt;gregory.clement@free-electrons.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 1aac1dc9886764cfa1226273e4d4709284872442
Author: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Date:   Fri Aug 28 09:42:09 2015 +0100

    ARM: 8427/1: dma-mapping: add support for offset parameter in dma_mmap()

    commit 7e31210349e9e03a9a4dff31ab5f2bc83e8e84f5 upstream.

    IOMMU-based dma_mmap() implementation lacked proper support for offset
    parameter used in mmap call (it always assumed that mapping starts from
    offset zero). This patch adds support for offset parameter to IOMMU-based
    implementation.

    Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
    Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 98cc6d31fa7dde7beb1bccc51ad5c858d9ae5b04
Author: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Date:   Fri Aug 28 09:41:39 2015 +0100

    ARM: 8426/1: dma-mapping: add missing range check in dma_mmap()

    commit 371f0f085f629fc0f66695f572373ca4445a67ad upstream.

    dma_mmap() function in IOMMU-based dma-mapping implementation lacked
    a check for valid range of mmap parameters (offset and buffer size), what
    might have caused access beyond the allocated buffer. This patch fixes
    this issue.

    Signed-off-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
    Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit c79f626810b7d20aca9cd935d8cfc3272ba7a054
Author: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Date:   Tue Sep 8 10:53:40 2015 -0400

    RDS: verify the underlying transport exists before creating a connection

    [ Upstream commit 74e98eb085889b0d2d4908f59f6e00026063014f ]

    There was no verification that an underlying transport exists when creating
    a connection, this would cause dereferencing a NULL ptr.

    It might happen on sockets that weren't properly bound before attempting to
    send a message, which will cause a NULL ptr deref:

    [135546.047719] kasan: GPF could be caused by NULL-ptr deref or user memory accessgeneral protection fault: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC KASAN
    [135546.051270] Modules linked in:
    [135546.051781] CPU: 4 PID: 15650 Comm: trinity-c4 Not tainted 4.2.0-next-20150902-sasha-00041-gbaa1222-dirty #2527
    [135546.053217] task: ffff8800835bc000 ti: ffff8800bc708000 task.ti: ffff8800bc708000
    [135546.054291] RIP: __rds_conn_create (net/rds/connection.c:194)
    [135546.055666] RSP: 0018:ffff8800bc70fab0  EFLAGS: 00010202
    [135546.056457] RAX: dffffc0000000000 RBX: 0000000000000f2c RCX: ffff8800835bc000
    [135546.057494] RDX: 0000000000000007 RSI: ffff8800835bccd8 RDI: 0000000000000038
    [135546.058530] RBP: ffff8800bc70fb18 R08: 0000000000000001 R09: 0000000000000000
    [135546.059556] R10: ffffed014d7a3a23 R11: ffffed014d7a3a21 R12: 0000000000000000
    [135546.060614] R13: 0000000000000001 R14: ffff8801ec3d0000 R15: 0000000000000000
    [135546.061668] FS:  00007faad4ffb700(0000) GS:ffff880252000000(0000) knlGS:0000000000000000
    [135546.062836] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    [135546.063682] CR2: 000000000000846a CR3: 000000009d137000 CR4: 00000000000006a0
    [135546.064723] Stack:
    [135546.065048]  ffffffffafe2055c ffffffffafe23fc1 ffffed00493097bf ffff8801ec3d0008
    [135546.066247]  0000000000000000 00000000000000d0 0000000000000000 ac194a24c0586342
    [135546.067438]  1ffff100178e1f78 ffff880320581b00 ffff8800bc70fdd0 ffff880320581b00
    [135546.068629] Call Trace:
    [135546.069028] ? __rds_conn_create (include/linux/rcupdate.h:856 net/rds/connection.c:134)
    [135546.069989] ? rds_message_copy_from_user (net/rds/message.c:298)
    [135546.071021] rds_conn_create_outgoing (net/rds/connection.c:278)
    [135546.071981] rds_sendmsg (net/rds/send.c:1058)
    [135546.072858] ? perf_trace_lock (include/trace/events/lock.h:38)
    [135546.073744] ? lockdep_init (kernel/locking/lockdep.c:3298)
    [135546.074577] ? rds_send_drop_to (net/rds/send.c:976)
    [135546.075508] ? __might_fault (./arch/x86/include/asm/current.h:14 mm/memory.c:3795)
    [135546.076349] ? __might_fault (mm/memory.c:3795)
    [135546.077179] ? rds_send_drop_to (net/rds/send.c:976)
    [135546.078114] sock_sendmsg (net/socket.c:611 net/socket.c:620)
    [135546.078856] SYSC_sendto (net/socket.c:1657)
    [135546.079596] ? SYSC_connect (net/socket.c:1628)
    [135546.080510] ? trace_dump_stack (kernel/trace/trace.c:1926)
    [135546.081397] ? ring_buffer_unlock_commit (kernel/trace/ring_buffer.c:2479 kernel/trace/ring_buffer.c:2558 kernel/trace/ring_buffer.c:2674)
    [135546.082390] ? trace_buffer_unlock_commit (kernel/trace/trace.c:1749)
    [135546.083410] ? trace_event_raw_event_sys_enter (include/trace/events/syscalls.h:16)
    [135546.084481] ? do_audit_syscall_entry (include/trace/events/syscalls.h:16)
    [135546.085438] ? trace_buffer_unlock_commit (kernel/trace/trace.c:1749)
    [135546.085515] rds_ib_laddr_check(): addr 36.74.25.172 ret -99 node type -1

    Acked-by: Santosh Shilimkar &lt;santosh.shilimkar@oracle.com&gt;
    Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit bd81712486bd1af8086984b5191d055908d867ec
Author: Jason Wang &lt;jasowang@redhat.com&gt;
Date:   Wed Aug 5 10:34:04 2015 +0800

    virtio-net: drop NETIF_F_FRAGLIST

    [ Upstream commit 48900cb6af4282fa0fb6ff4d72a81aa3dadb5c39 ]

    virtio declares support for NETIF_F_FRAGLIST, but assumes
    that there are at most MAX_SKB_FRAGS + 2 fragments which isn't
    always true with a fraglist.

    A longer fraglist in the skb will make the call to skb_to_sgvec overflow
    the sg array, leading to memory corruption.

    Drop NETIF_F_FRAGLIST so we only get what we can handle.

    Cc: Michael S. Tsirkin &lt;mst@redhat.com&gt;
    Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
    Acked-by: Michael S. Tsirkin &lt;mst@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;

commit 0be0e5758dbdf3f61378b5d17d00363f92e93bae
Author: Eric Dumazet &lt;edumazet@google.com&gt;
Date:   Mon Nov 9 17:51:23 2015 -0800

    net: fix a race in dst_release()

    [ Upstream commit d69bbf88c8d0b367cf3e3a052f6daadf630ee566 ]

    Only cpu seeing dst refcount going to 0 can safely
    dereference dst-&gt;flags.

    Otherwise an other cpu might already have freed the dst.

    Fixes: 27b75c95f10d ("net: avoid RCU for NOCACHE dst")
    Reported-by: Greg Thelen &lt;gthelen@google.com&gt;
    Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 0861d012ecff07b74a8c6ecfda04bb1737831e09
Author: Eric Dumazet &lt;edumazet@google.com&gt;
Date:   Mon Nov 2 07:50:07 2015 -0800

    net: avoid NULL deref in inet_ctl_sock_destroy()

    [ Upstream commit 8fa677d2706d325d71dab91bf6e6512c05214e37 ]

    Under low memory conditions, tcp_sk_init() and icmp_sk_init()
    can both iterate on all possible cpus and call inet_ctl_sock_destroy(),
    with eventual NULL pointer.

    Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
    Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 25e462d9e34f8bb0cdaab78093c61373048d13a3
Author: Ani Sinha &lt;ani@arista.com&gt;
Date:   Fri Oct 30 16:54:31 2015 -0700

    ipmr: fix possible race resulting from improper usage of IP_INC_STATS_BH() in preemptible context.

    [ Upstream commit 44f49dd8b5a606870a1f21101522a0f9c4414784 ]

    Fixes the following kernel BUG :

    BUG: using __this_cpu_add() in preemptible [00000000] code: bash/2758
    caller is __this_cpu_preempt_check+0x13/0x15
    CPU: 0 PID: 2758 Comm: bash Tainted: P           O   3.18.19 #2
     ffffffff8170eaca ffff880110d1b788 ffffffff81482b2a 0000000000000000
     0000000000000000 ffff880110d1b7b8 ffffffff812010ae ffff880007cab800
     ffff88001a060800 ffff88013a899108 ffff880108b84240 ffff880110d1b7c8
    Call Trace:
    [&lt;ffffffff81482b2a&gt;] dump_stack+0x52/0x80
    [&lt;ffffffff812010ae&gt;] check_preemption_disabled+0xce/0xe1
    [&lt;ffffffff812010d4&gt;] __this_cpu_preempt_check+0x13/0x15
    [&lt;ffffffff81419d60&gt;] ipmr_queue_xmit+0x647/0x70c
    [&lt;ffffffff8141a154&gt;] ip_mr_forward+0x32f/0x34e
    [&lt;ffffffff8141af76&gt;] ip_mroute_setsockopt+0xe03/0x108c
    [&lt;ffffffff810553fc&gt;] ? get_parent_ip+0x11/0x42
    [&lt;ffffffff810e6974&gt;] ? pollwake+0x4d/0x51
    [&lt;ffffffff81058ac0&gt;] ? default_wake_function+0x0/0xf
    [&lt;ffffffff810553fc&gt;] ? get_parent_ip+0x11/0x42
    [&lt;ffffffff810613d9&gt;] ? __wake_up_common+0x45/0x77
    [&lt;ffffffff81486ea9&gt;] ? _raw_spin_unlock_irqrestore+0x1d/0x32
    [&lt;ffffffff810618bc&gt;] ? __wake_up_sync_key+0x4a/0x53
    [&lt;ffffffff8139a519&gt;] ? sock_def_readable+0x71/0x75
    [&lt;ffffffff813dd226&gt;] do_ip_setsockopt+0x9d/0xb55
    [&lt;ffffffff81429818&gt;] ? unix_seqpacket_sendmsg+0x3f/0x41
    [&lt;ffffffff813963fe&gt;] ? sock_sendmsg+0x6d/0x86
    [&lt;ffffffff813959d4&gt;] ? sockfd_lookup_light+0x12/0x5d
    [&lt;ffffffff8139650a&gt;] ? SyS_sendto+0xf3/0x11b
    [&lt;ffffffff810d5738&gt;] ? new_sync_read+0x82/0xaa
    [&lt;ffffffff813ddd19&gt;] compat_ip_setsockopt+0x3b/0x99
    [&lt;ffffffff813fb24a&gt;] compat_raw_setsockopt+0x11/0x32
    [&lt;ffffffff81399052&gt;] compat_sock_common_setsockopt+0x18/0x1f
    [&lt;ffffffff813c4d05&gt;] compat_SyS_setsockopt+0x1a9/0x1cf
    [&lt;ffffffff813c4149&gt;] compat_SyS_socketcall+0x180/0x1e3
    [&lt;ffffffff81488ea1&gt;] cstar_dispatch+0x7/0x1e

    Signed-off-by: Ani Sinha &lt;ani@arista.com&gt;
    Acked-by: Eric Dumazet &lt;edumazet@google.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 34805d167c315860130d55448e9a45b51cc18fb2
Author: Phil Reid &lt;preid@electromag.com.au&gt;
Date:   Fri Oct 30 16:43:55 2015 +0800

    stmmac: Correctly report PTP capabilities.

    [ Upstream commit e6dbe1eb2db0d7a14991c06278dd3030c45fb825 ]

    priv-&gt;hwts_*_en indicate if timestamping is enabled/disabled at run
    time. But  priv-&gt;dma_cap.time_stamp  and priv-&gt;dma_cap.atime_stamp
    indicates HW is support for PTPv1/PTPv2.

    Signed-off-by: Phil Reid &lt;preid@electromag.com.au&gt;
    Acked-by: Richard Cochran &lt;richardcochran@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;

commit 669cd5ea954101b516a1632995e8e12f2898da17
Author: Carol L Soto &lt;clsoto@linux.vnet.ibm.com&gt;
Date:   Tue Oct 27 17:36:20 2015 +0200

    net/mlx4: Copy/set only sizeof struct mlx4_eqe bytes

    [ Upstream commit c02b05011fadf8e409e41910217ca689f2fc9d91 ]

    When doing memcpy/memset of EQEs, we should use sizeof struct
    mlx4_eqe as the base size and not caps.eqe_size which could be bigger.

    If caps.eqe_size is bigger than the struct mlx4_eqe then we corrupt
    data in the master context.

    When using a 64 byte stride, the memcpy copied over 63 bytes to the
    slave_eq structure.  This resulted in copying over the entire eqe of
    interest, including its ownership bit -- and also 31 bytes of garbage
    into the next WQE in the slave EQ -- which did NOT include the ownership
    bit (and therefore had no impact).

    However, once the stride is increased to 128, we are overwriting the
    ownership bits of *three* eqes in the slave_eq struct.  This results
    in an incorrect ownership bit for those eqes, which causes the eq to
    seem to be full. The issue therefore surfaced only once 128-byte EQEs
    started being used in SRIOV and (overarchitectures that have 128/256
    byte cache-lines such as PPC) - e.g after commit 77507aa249ae
    "net/mlx4_core: Enable CQE/EQE stride support".

    Fixes: 08ff32352d6f ('mlx4: 64-byte CQE/EQE support')
    Signed-off-by: Carol L Soto &lt;clsoto@linux.vnet.ibm.com&gt;
    Signed-off-by: Jack Morgenstein &lt;jackm@dev.mellanox.co.il&gt;
    Signed-off-by: Or Gerlitz &lt;ogerlitz@mellanox.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 074043fdd071a4d5c4cd25fa7aaaff5c6eedd1dd
Author: Sowmini Varadhan &lt;sowmini.varadhan@oracle.com&gt;
Date:   Mon Oct 26 12:46:37 2015 -0400

    RDS-TCP: Recover correctly from pskb_pull()/pksb_trim() failure in rds_tcp_data_recv

    [ Upstream commit 8ce675ff39b9958d1c10f86cf58e357efaafc856 ]

    Either of pskb_pull() or pskb_trim() may fail under low memory conditions.
    If rds_tcp_data_recv() ignores such failures, the application will
    receive corrupted data because the skb has not been correctly
    carved to the RDS datagram size.

    Avoid this by handling pskb_pull/pskb_trim failure in the same
    manner as the skb_clone failure: bail out of rds_tcp_data_recv(), and
    retry via the deferred call to rds_send_worker() that gets set up on
    ENOMEM from rds_tcp_read_sock()

    Signed-off-by: Sowmini Varadhan &lt;sowmini.varadhan@oracle.com&gt;
    Acked-by: Santosh Shilimkar &lt;santosh.shilimkar@oracle.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit e42f6b5c7bcf22062a389d40cbf2a723aab4d2df
Author: Guillaume Nault &lt;g.nault@alphalink.fr&gt;
Date:   Thu Oct 22 16:57:10 2015 +0200

    ppp: fix pppoe_dev deletion condition in pppoe_release()

    [ Upstream commit 1acea4f6ce1b1c0941438aca75dd2e5c6b09db60 ]

    We can't rely on PPPOX_ZOMBIE to decide whether to clear po-&gt;pppoe_dev.
    PPPOX_ZOMBIE can be set by pppoe_disc_rcv() even when po-&gt;pppoe_dev is
    NULL. So we have no guarantee that (sk-&gt;sk_state &amp; PPPOX_ZOMBIE) implies
    (po-&gt;pppoe_dev != NULL).
    Since we're releasing a PPPoE socket, we want to release the pppoe_dev
    if it exists and reset sk_state to PPPOX_DEAD, no matter the previous
    value of sk_state. So we can just check for po-&gt;pppoe_dev and avoid any
    assumption on sk-&gt;sk_state.

    Fixes: 2b018d57ff18 ("pppoe: drop PPPOX_ZOMBIEs in pppoe_release")
    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;

commit edbdd72399cf707f3086a8c3df35e435381fd227
Author: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Date:   Mon Oct 19 13:16:49 2015 +0300

    irda: precedence bug in irlmp_seq_hb_idx()

    [ Upstream commit 50010c20597d14667eff0fdb628309986f195230 ]

    This is decrementing the pointer, instead of the value stored in the
    pointer.  KASan detects it as an out of bounds reference.

    Reported-by: "Berry Cheng 程君(成淼)" &lt;chengmiao.cj@alibaba-inc.com&gt;
    Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.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>ppp: don't override sk-&gt;sk_state in pppoe_flush_dev()</title>
<updated>2016-08-26T18:45:12+00:00</updated>
<author>
<name>Guillaume Nault</name>
<email>g.nault@alphalink.fr</email>
</author>
<published>2015-09-30T09:45:33+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=03aabd791f12ca06882875b257087d3dd12d8e98'/>
<id>urn:sha1:03aabd791f12ca06882875b257087d3dd12d8e98</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;
Signed-off-by: Stefan Guendhoer &lt;stefan@guendhoer.com&gt;
</content>
</entry>
<entry>
<title>3.10.69 -&gt; 3.10.70</title>
<updated>2016-08-26T13:59:30+00:00</updated>
<author>
<name>Jan Engelmohr</name>
<email>jan.engelmohr@mailbox.tu-dresden.de</email>
</author>
<published>2016-07-26T16:07:05+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=a2904e3eed56216fe65091d9b3638ae1f90e43fa'/>
<id>urn:sha1:a2904e3eed56216fe65091d9b3638ae1f90e43fa</id>
<content type='text'>
</content>
</entry>
</feed>
