<feed xmlns='http://www.w3.org/2005/Atom'>
<title>xavi/android_kernel_m2note/drivers/usb/host, branch lp-5.1</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://gitea.privatedns.org/xavi/android_kernel_m2note/atom?h=lp-5.1</id>
<link rel='self' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/atom?h=lp-5.1'/>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/'/>
<updated>2016-08-26T19:06:18+00:00</updated>
<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.98 (accumulative patch)</title>
<updated>2016-08-26T18:54:24+00:00</updated>
<author>
<name>Stefan Guendhoer</name>
<email>stefan@guendhoer.com</email>
</author>
<published>2016-03-05T13:48:28+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=dc5cd1f644c11c39dbbc54c0e30d00fe0bfd0fc0'/>
<id>urn:sha1:dc5cd1f644c11c39dbbc54c0e30d00fe0bfd0fc0</id>
<content type='text'>
commit 90915bdf5d75f981251d78f45dce37d39e679ac1
Author: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Date:   Thu Feb 25 11:58:19 2016 -0800

    Linux 3.10.98

commit dd6f1f0d444d8c9fe4307c1527987e474819d5d7
Author: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Date:   Wed Feb 3 16:55:26 2016 +1030

    module: wrapper for symbol name.

    commit 2e7bac536106236104e9e339531ff0fcdb7b8147 upstream.

    This trivial wrapper adds clarity and makes the following patch
    smaller.

    Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 40ea6e6f67636529f3ed27d4e2f7589f3ae869c7
Author: WANG Cong &lt;xiyou.wangcong@gmail.com&gt;
Date:   Tue Mar 31 11:01:47 2015 -0700

    ip6mr: call del_timer_sync() in ip6mr_free_table()

    commit 7ba0c47c34a1ea5bc7a24ca67309996cce0569b5 upstream.

    We need to wait for the flying timers, since we
    are going to free the mrtable right after it.

    Cc: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
    Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit a895706740ceaac0c7f99ddc48e05c40cb21c361
Author: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Date:   Sat Dec 19 20:07:38 2015 +0000

    futex: Drop refcount if requeue_pi() acquired the rtmutex

    commit fb75a4282d0d9a3c7c44d940582c2d226cf3acfb upstream.

    If the proxy lock in the requeue loop acquires the rtmutex for a
    waiter then it acquired also refcount on the pi_state related to the
    futex, but the waiter side does not drop the reference count.

    Add the missing free_pi_state() call.

    Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
    Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
    Cc: Darren Hart &lt;darren@dvhart.com&gt;
    Cc: Davidlohr Bueso &lt;dave@stgolabs.net&gt;
    Cc: Bhuvanesh_Surachari@mentor.com
    Cc: Andy Lowe &lt;Andy_Lowe@mentor.com&gt;
    Link: http://lkml.kernel.org/r/20151219200607.178132067@linutronix.de
    Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 4800af91229e06e9d8517a6961f5b5d304b7e9bf
Author: Andy Lutomirski &lt;luto@kernel.org&gt;
Date:   Fri May 22 16:15:47 2015 -0700

    x86/asm/irq: Stop relying on magic JMP behavior for early_idt_handlers

    commit 425be5679fd292a3c36cb1fe423086708a99f11a upstream.

    The early_idt_handlers asm code generates an array of entry
    points spaced nine bytes apart.  It's not really clear from that
    code or from the places that reference it what's going on, and
    the code only works in the first place because GAS never
    generates two-byte JMP instructions when jumping to global
    labels.

    Clean up the code to generate the correct array stride (member size)
    explicitly. This should be considerably more robust against
    screw-ups, as GAS will warn if a .fill directive has a negative
    count.  Using '. =' to advance would have been even more robust
    (it would generate an actual error if it tried to move
    backwards), but it would pad with nulls, confusing anyone who
    tries to disassemble the code.  The new scheme should be much
    clearer to future readers.

    While we're at it, improve the comments and rename the array and
    common code.

    Binutils may start relaxing jumps to non-weak labels.  If so,
    this change will fix our build, and we may need to backport this
    change.

    Before, on x86_64:

      0000000000000000 &lt;early_idt_handlers&gt;:
         0:   6a 00                   pushq  $0x0
         2:   6a 00                   pushq  $0x0
         4:   e9 00 00 00 00          jmpq   9 &lt;early_idt_handlers+0x9&gt;
                              5: R_X86_64_PC32        early_idt_handler-0x4
      ...
        48:   66 90                   xchg   %ax,%ax
        4a:   6a 08                   pushq  $0x8
        4c:   e9 00 00 00 00          jmpq   51 &lt;early_idt_handlers+0x51&gt;
                              4d: R_X86_64_PC32       early_idt_handler-0x4
      ...
       117:   6a 00                   pushq  $0x0
       119:   6a 1f                   pushq  $0x1f
       11b:   e9 00 00 00 00          jmpq   120 &lt;early_idt_handler&gt;
                              11c: R_X86_64_PC32      early_idt_handler-0x4

    After:

      0000000000000000 &lt;early_idt_handler_array&gt;:
         0:   6a 00                   pushq  $0x0
         2:   6a 00                   pushq  $0x0
         4:   e9 14 01 00 00          jmpq   11d &lt;early_idt_handler_common&gt;
      ...
        48:   6a 08                   pushq  $0x8
        4a:   e9 d1 00 00 00          jmpq   120 &lt;early_idt_handler_common&gt;
        4f:   cc                      int3
        50:   cc                      int3
      ...
       117:   6a 00                   pushq  $0x0
       119:   6a 1f                   pushq  $0x1f
       11b:   eb 03                   jmp    120 &lt;early_idt_handler_common&gt;
       11d:   cc                      int3
       11e:   cc                      int3
       11f:   cc                      int3

    Signed-off-by: Andy Lutomirski &lt;luto@kernel.org&gt;
    Acked-by: H. Peter Anvin &lt;hpa@linux.intel.com&gt;
    Cc: Binutils &lt;binutils@sourceware.org&gt;
    Cc: Borislav Petkov &lt;bp@alien8.de&gt;
    Cc: H.J. Lu &lt;hjl.tools@gmail.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/ac027962af343b0c599cbfcf50b945ad2ef3d7a8.1432336324.git.luto@kernel.org
    Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
    Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 08fc7d3fdfef75fdf2d44f848cef1f3e1babb8bf
Author: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Date:   Tue Jan 26 12:24:25 2016 +0300

    intel_scu_ipcutil: underflow in scu_reg_access()

    commit b1d353ad3d5835b16724653b33c05124e1b5acf1 upstream.

    "count" is controlled by the user and it can be negative.  Let's prevent
    that by making it unsigned.  You have to have CAP_SYS_RAWIO to call this
    function so the bug is not as serious as it could be.

    Fixes: 5369c02d951a ('intel_scu_ipc: Utility driver for intel scu ipc')
    Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
    Signed-off-by: Darren Hart &lt;dvhart@linux.intel.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit c750edf63ce45ff34155723b73828527c1d96353
Author: Konstantin Khlebnikov &lt;koct9i@gmail.com&gt;
Date:   Fri Feb 5 15:37:01 2016 -0800

    radix-tree: fix oops after radix_tree_iter_retry

    commit 732042821cfa106b3c20b9780e4c60fee9d68900 upstream.

    Helper radix_tree_iter_retry() resets next_index to the current index.
    In following radix_tree_next_slot current chunk size becomes zero.  This
    isn't checked and it tries to dereference null pointer in slot.

    Tagged iterator is fine because retry happens only at slot 0 where tag
    bitmask in iter-&gt;tags is filled with single bit.

    Fixes: 46437f9a554f ("radix-tree: fix race in gang lookup")
    Signed-off-by: Konstantin Khlebnikov &lt;koct9i@gmail.com&gt;
    Cc: Matthew Wilcox &lt;willy@linux.intel.com&gt;
    Cc: Hugh Dickins &lt;hughd@google.com&gt;
    Cc: Ohad Ben-Cohen &lt;ohad@wizery.com&gt;
    Cc: Jeremiah Mahler &lt;jmmahler@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;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit a202017766a111064dc0a99ee38d85886816b27a
Author: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Date:   Tue Feb 2 16:57:52 2016 -0800

    radix-tree: fix race in gang lookup

    commit 46437f9a554fbe3e110580ca08ab703b59f2f95a upstream.

    If the indirect_ptr bit is set on a slot, that indicates we need to redo
    the lookup.  Introduce a new function radix_tree_iter_retry() which
    forces the loop to retry the lookup by setting 'slot' to NULL and
    turning the iterator back to point at the problematic entry.

    This is a pretty rare problem to hit at the moment; the lookup has to
    race with a grow of the radix tree from a height of 0.  The consequences
    of hitting this race are that gang lookup could return a pointer to a
    radix_tree_node instead of a pointer to whatever the user had inserted
    in the tree.

    Fixes: cebbd29e1c2f ("radix-tree: rewrite gang lookup using iterator")
    Signed-off-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
    Cc: Hugh Dickins &lt;hughd@google.com&gt;
    Cc: Ohad Ben-Cohen &lt;ohad@wizery.com&gt;
    Cc: Konstantin Khlebnikov &lt;khlebnikov@openvz.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 a28c4bb3990dd3f65279ec02c6fa1762044325da
Author: Martijn Coenen &lt;maco@google.com&gt;
Date:   Fri Jan 15 16:57:49 2016 -0800

    memcg: only free spare array when readers are done

    commit 6611d8d76132f86faa501de9451a89bf23fb2371 upstream.

    A spare array holding mem cgroup threshold events is kept around to make
    sure we can always safely deregister an event and have an array to store
    the new set of events in.

    In the scenario where we're going from 1 to 0 registered events, the
    pointer to the primary array containing 1 event is copied to the spare
    slot, and then the spare slot is freed because no events are left.
    However, it is freed before calling synchronize_rcu(), which means
    readers may still be accessing threshold-&gt;primary after it is freed.

    Fixed by only freeing after synchronize_rcu().

    Signed-off-by: Martijn Coenen &lt;maco@google.com&gt;
    Cc: Johannes Weiner &lt;hannes@cmpxchg.org&gt;
    Acked-by: Michal Hocko &lt;mhocko@suse.com&gt;
    Cc: Vladimir Davydov &lt;vdavydov@virtuozzo.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;

commit d5b8e6bb2595ed5ae550e44939016fb9d022fabf
Author: Sergey Senozhatsky &lt;sergey.senozhatsky.work@gmail.com&gt;
Date:   Thu Jan 14 15:16:53 2016 -0800

    scripts/bloat-o-meter: fix python3 syntax error

    commit 72214a24a7677d4c7501eecc9517ed681b5f2db2 upstream.

    In Python3+ print is a function so the old syntax is not correct
    anymore:

      $ ./scripts/bloat-o-meter vmlinux.o vmlinux.o.old
        File "./scripts/bloat-o-meter", line 61
          print "add/remove: %s/%s grow/shrink: %s/%s up/down: %s/%s (%s)" % \
                                                                         ^
      SyntaxError: invalid syntax

    Fix by calling print as a function.

    Tested on python 2.7.11, 3.5.1

    Signed-off-by: Sergey Senozhatsky &lt;sergey.senozhatsky@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;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 2942425f64895dead4dfe46462e00c9871c2bc12
Author: Laura Abbott &lt;labbott@fedoraproject.org&gt;
Date:   Thu Jan 14 15:16:50 2016 -0800

    dma-debug: switch check from _text to _stext

    commit ea535e418c01837d07b6c94e817540f50bfdadb0 upstream.

    In include/asm-generic/sections.h:

      /*
       * Usage guidelines:
       * _text, _data: architecture specific, don't use them in
       * arch-independent code
       * [_stext, _etext]: contains .text.* sections, may also contain
       * .rodata.*
       *                   and/or .init.* sections

    _text is not guaranteed across architectures.  Architectures such as ARM
    may reuse parts which are not actually text and erroneously trigger a bug.
    Switch to using _stext which is guaranteed to contain text sections.

    Came out of https://lkml.kernel.org/g/&lt;567B1176.4000106@redhat.com&gt;

    Signed-off-by: Laura Abbott &lt;labbott@fedoraproject.org&gt;
    Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
    Cc: Russell King &lt;linux@arm.linux.org.uk&gt;
    Cc: Arnd Bergmann &lt;arnd@arndb.de&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 ac6cef6cfa6230d989e24325ea04280a5b1fc5e7
Author: Sudip Mukherjee &lt;sudipm.mukherjee@gmail.com&gt;
Date:   Thu Jan 14 15:16:47 2016 -0800

    m32r: fix m32104ut_defconfig build fail

    commit 601f1db653217f205ffa5fb33514b4e1711e56d1 upstream.

    The build of m32104ut_defconfig for m32r arch was failing for long long
    time with the error:

      ERROR: "memory_start" [fs/udf/udf.ko] undefined!
      ERROR: "memory_end" [fs/udf/udf.ko] undefined!
      ERROR: "memory_end" [drivers/scsi/sg.ko] undefined!
      ERROR: "memory_start" [drivers/scsi/sg.ko] undefined!
      ERROR: "memory_end" [drivers/i2c/i2c-dev.ko] undefined!
      ERROR: "memory_start" [drivers/i2c/i2c-dev.ko] undefined!

    As done in other architectures export the symbols to fix the error.

    Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
    Signed-off-by: Sudip Mukherjee &lt;sudip@vectorindia.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 e399e769b8f894dac701dc257be093221330cbd2
Author: Mathias Nyman &lt;mathias.nyman@linux.intel.com&gt;
Date:   Tue Jan 26 17:50:12 2016 +0200

    xhci: Fix list corruption in urb dequeue at host removal

    commit 5c82171167adb8e4ac77b91a42cd49fb211a81a0 upstream.

    xhci driver frees data for all devices, both usb2 and and usb3 the
    first time usb_remove_hcd() is called, including td_list and and xhci_ring
    structures.

    When usb_remove_hcd() is called a second time for the second xhci bus it
    will try to dequeue all pending urbs, and touches td_list which is already
    freed for that endpoint.

    Reported-by: Joe Lawrence &lt;joe.lawrence@stratus.com&gt;
    Tested-by: Joe Lawrence &lt;joe.lawrence@stratus.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 f8f1013f5c6180cf6f812e6d3f823680a6a77cc7
Author: Andrew Banman &lt;abanman@sgi.com&gt;
Date:   Tue Dec 29 14:54:25 2015 -0800

    mm/memory_hotplug.c: check for missing sections in test_pages_in_a_zone()

    commit 5f0f2887f4de9508dcf438deab28f1de8070c271 upstream.

    test_pages_in_a_zone() does not account for the possibility of missing
    sections in the given pfn range.  pfn_valid_within always returns 1 when
    CONFIG_HOLES_IN_ZONE is not set, allowing invalid pfns from missing
    sections to pass the test, leading to a kernel oops.

    Wrap an additional pfn loop with PAGES_PER_SECTION granularity to check
    for missing sections before proceeding into the zone-check code.

    This also prevents a crash from offlining memory devices with missing
    sections.  Despite this, it may be a good idea to keep the related patch
    '[PATCH 3/3] drivers: memory: prohibit offlining of memory blocks with
    missing sections' because missing sections in a memory block may lead to
    other problems not covered by the scope of this fix.

    Signed-off-by: Andrew Banman &lt;abanman@sgi.com&gt;
    Acked-by: Alex Thorlton &lt;athorlton@sgi.com&gt;
    Cc: Russ Anderson &lt;rja@sgi.com&gt;
    Cc: Alex Thorlton &lt;athorlton@sgi.com&gt;
    Cc: Yinghai Lu &lt;yinghai@kernel.org&gt;
    Cc: Greg KH &lt;greg@kroah.com&gt;
    Cc: Seth Jennings &lt;sjennings@variantweb.net&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 1631f17998c51d57182370b84f582729b94bfdf6
Author: CQ Tang &lt;cq.tang@intel.com&gt;
Date:   Wed Jan 13 21:15:03 2016 +0000

    iommu/vt-d: Fix 64-bit accesses to 32-bit DMAR_GSTS_REG

    commit fda3bec12d0979aae3f02ee645913d66fbc8a26e upstream.

    This is a 32-bit register. Apparently harmless on real hardware, but
    causing justified warnings in simulation.

    Signed-off-by: CQ Tang &lt;cq.tang@intel.com&gt;
    Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit af5d9b4be5c19097a8e3bbb28eb15fb1b4e1b188
Author: Aurélien Francillon &lt;aurelien@francillon.net&gt;
Date:   Sat Jan 2 20:39:54 2016 -0800

    Input: i8042 - add Fujitsu Lifebook U745 to the nomux list

    commit dd0d0d4de582a6a61c032332c91f4f4cb2bab569 upstream.

    Without i8042.nomux=1 the Elantech touch pad is not working at all on
    a Fujitsu Lifebook U745. This patch does not seem necessary for all
    U745 (maybe because of different BIOS versions?). However, it was
    verified that the patch does not break those (see opensuse bug 883192:
    https://bugzilla.opensuse.org/show_bug.cgi?id=883192).

    Signed-off-by: Aurélien Francillon &lt;aurelien@francillon.net&gt;
    Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 209bde19c95ace3386a66e521dc518e7fd9b26c9
Author: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Date:   Mon Jan 11 17:35:38 2016 -0800

    Input: elantech - mark protocols v2 and v3 as semi-mt

    commit 6544a1df11c48c8413071aac3316792e4678fbfb upstream.

    When using a protocol v2 or v3 hardware, elantech uses the function
    elantech_report_semi_mt_data() to report data. This devices are rather
    creepy because if num_finger is 3, (x2,y2) is (0,0). Yes, only one valid
    touch is reported.

    Anyway, userspace (libinput) is now confused by these (0,0) touches,
    and detect them as palm, and rejects them.

    Commit 3c0213d17a09 ("Input: elantech - fix semi-mt protocol for v3 HW")
    was sufficient enough for xf86-input-synaptics and libinput before it has
    palm rejection. Now we need to actually tell libinput that this device is
    a semi-mt one and it should not rely on the actual values of the 2 touches.

    Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
    Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 220e1e03fbf0f1e21860ebae237ec39a40732777
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Fri Nov 6 11:26:01 2015 -0800

    Input: elantech - add Fujitsu Lifebook U745 to force crc_enabled

    commit 60603950f836ef4e88daddf61a273b91e671db2d upstream.

    Another Lifebook machine that needs the same quirk as other similar
    models to make the driver working.

    Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=883192
    Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
    Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 523ea6a0029ea766f139d58182e459b64b378f4f
Author: Naoya Horiguchi &lt;n-horiguchi@ah.jp.nec.com&gt;
Date:   Fri Jan 15 16:54:03 2016 -0800

    mm: soft-offline: check return value in second __get_any_page() call

    commit d96b339f453997f2f08c52da3f41423be48c978f upstream.

    I saw the following BUG_ON triggered in a testcase where a process calls
    madvise(MADV_SOFT_OFFLINE) on thps, along with a background process that
    calls migratepages command repeatedly (doing ping-pong among different
    NUMA nodes) for the first process:

       Soft offlining page 0x60000 at 0x700000600000
       __get_any_page: 0x60000 free buddy page
       page:ffffea0001800000 count:0 mapcount:-127 mapping:          (null) index:0x1
       flags: 0x1fffc0000000000()
       page dumped because: VM_BUG_ON_PAGE(atomic_read(&amp;page-&gt;_count) == 0)
       ------------[ cut here ]------------
       kernel BUG at /src/linux-dev/include/linux/mm.h:342!
       invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC
       Modules linked in: cfg80211 rfkill crc32c_intel serio_raw virtio_balloon i2c_piix4 virtio_blk virtio_net ata_generic pata_acpi
       CPU: 3 PID: 3035 Comm: test_alloc_gene Tainted: G           O    4.4.0-rc8-v4.4-rc8-160107-1501-00000-rc8+ #74
       Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
       task: ffff88007c63d5c0 ti: ffff88007c210000 task.ti: ffff88007c210000
       RIP: 0010:[&lt;ffffffff8118998c&gt;]  [&lt;ffffffff8118998c&gt;] put_page+0x5c/0x60
       RSP: 0018:ffff88007c213e00  EFLAGS: 00010246
       Call Trace:
         put_hwpoison_page+0x4e/0x80
         soft_offline_page+0x501/0x520
         SyS_madvise+0x6bc/0x6f0
         entry_SYSCALL_64_fastpath+0x12/0x6a
       Code: 8b fc ff ff 5b 5d c3 48 89 df e8 b0 fa ff ff 48 89 df 31 f6 e8 c6 7d ff ff 5b 5d c3 48 c7 c6 08 54 a2 81 48 89 df e8 a4 c5 01 00 &lt;0f&gt; 0b 66 90 66 66 66 66 90 55 48 89 e5 41 55 41 54 53 48 8b 47
       RIP  [&lt;ffffffff8118998c&gt;] put_page+0x5c/0x60
        RSP &lt;ffff88007c213e00&gt;

    The root cause resides in get_any_page() which retries to get a refcount
    of the page to be soft-offlined.  This function calls
    put_hwpoison_page(), expecting that the target page is putback to LRU
    list.  But it can be also freed to buddy.  So the second check need to
    care about such case.

    Fixes: af8fae7c0886 ("mm/memory-failure.c: clean up soft_offline_page()")
    Signed-off-by: Naoya Horiguchi &lt;n-horiguchi@ah.jp.nec.com&gt;
    Cc: Sasha Levin &lt;sasha.levin@oracle.com&gt;
    Cc: Aneesh Kumar K.V &lt;aneesh.kumar@linux.vnet.ibm.com&gt;
    Cc: Vlastimil Babka &lt;vbabka@suse.cz&gt;
    Cc: Jerome Marchand &lt;jmarchan@redhat.com&gt;
    Cc: Andrea Arcangeli &lt;aarcange@redhat.com&gt;
    Cc: Hugh Dickins &lt;hughd@google.com&gt;
    Cc: Dave Hansen &lt;dave.hansen@intel.com&gt;
    Cc: Mel Gorman &lt;mgorman@suse.de&gt;
    Cc: Rik van Riel &lt;riel@redhat.com&gt;
    Cc: Steve Capper &lt;steve.capper@linaro.org&gt;
    Cc: Johannes Weiner &lt;hannes@cmpxchg.org&gt;
    Cc: Michal Hocko &lt;mhocko@suse.cz&gt;
    Cc: Christoph Lameter &lt;cl@linux.com&gt;
    Cc: David Rientjes &lt;rientjes@google.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;

commit 020ef19153db7b81f94935ec03adecb4a8ab8964
Author: Roman Gushchin &lt;klamm@yandex-team.ru&gt;
Date:   Mon Oct 12 16:33:44 2015 +0300

    fuse: break infinite loop in fuse_fill_write_pages()

    commit 3ca8138f014a913f98e6ef40e939868e1e9ea876 upstream.

    I got a report about unkillable task eating CPU. Further
    investigation shows, that the problem is in the fuse_fill_write_pages()
    function. If iov's first segment has zero length, we get an infinite
    loop, because we never reach iov_iter_advance() call.

    Fix this by calling iov_iter_advance() before repeating an attempt to
    copy data from userspace.

    A similar problem is described in 124d3b7041f ("fix writev regression:
    pan hanging unkillable and un-straceable"). If zero-length segmend
    is followed by segment with invalid address,
    iov_iter_fault_in_readable() checks only first segment (zero-length),
    iov_iter_copy_from_user_atomic() skips it, fails at second and
    returns zero -&gt; goto again without skipping zero-length segment.

    Patch calls iov_iter_advance() before goto again: we'll skip zero-length
    segment at second iteraction and iov_iter_fault_in_readable() will detect
    invalid address.

    Special thanks to Konstantin Khlebnikov, who helped a lot with the commit
    description.

    Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
    Cc: Maxim Patlasov &lt;mpatlasov@parallels.com&gt;
    Cc: Konstantin Khlebnikov &lt;khlebnikov@yandex-team.ru&gt;
    Signed-off-by: Roman Gushchin &lt;klamm@yandex-team.ru&gt;
    Signed-off-by: Miklos Szeredi &lt;miklos@szeredi.hu&gt;
    Fixes: ea9b9907b82a ("fuse: implement perform_write")
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit fa4aa48526e852a550613acffc81cacc5233848e
Author: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Date:   Mon Feb 8 09:14:37 2016 +0100

    ARM: 8517/1: ICST: avoid arithmetic overflow in icst_hz()

    commit 5070fb14a0154f075c8b418e5bc58a620ae85a45 upstream.

    When trying to set the ICST 307 clock to 25174000 Hz I ran into
    this arithmetic error: the icst_hz_to_vco() correctly figure out
    DIVIDE=2, RDW=100 and VDW=99 yielding a frequency of
    25174000 Hz out of the VCO. (I replicated the icst_hz() function
    in a spreadsheet to verify this.)

    However, when I called icst_hz() on these VCO settings it would
    instead return 4122709 Hz. This causes an error in the common
    clock driver for ICST as the common clock framework will call
    .round_rate() on the clock which will utilize icst_hz_to_vco()
    followed by icst_hz() suggesting the erroneous frequency, and
    then the clock gets set to this.

    The error did not manifest in the old clock framework since
    this high frequency was only used by the CLCD, which calls
    clk_set_rate() without first calling clk_round_rate() and since
    the old clock framework would not call clk_round_rate() before
    setting the frequency, the correct values propagated into
    the VCO.

    After some experimenting I figured out that it was due to a simple
    arithmetic overflow: the divisor for 24Mhz reference frequency
    as reference becomes 24000000*2*(99+8)=0x132212400 and the "1"
    in bit 32 overflows and is lost.

    But introducing an explicit 64-by-32 bit do_div() and casting
    the divisor into (u64) we get the right frequency back, and the
    right frequency gets set.

    Tested on the ARM Versatile.

    Cc: linux-clk@vger.kernel.org
    Cc: Pawel Moll &lt;pawel.moll@arm.com&gt;
    Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&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 57cd1f0a2031e82ac1cc13e56f12b7d979ee5403
Author: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Date:   Wed Feb 10 09:25:17 2016 +0100

    ARM: 8519/1: ICST: try other dividends than 1

    commit e972c37459c813190461dabfeaac228e00aae259 upstream.

    Since the dawn of time the ICST code has only supported divide
    by one or hang in an eternal loop. Luckily we were always dividing
    by one because the reference frequency for the systems using
    the ICSTs is 24MHz and the [min,max] values for the PLL input
    if [10,320] MHz for ICST307 and [6,200] for ICST525, so the loop
    will always terminate immediately without assigning any divisor
    for the reference frequency.

    But for the code to make sense, let's insert the missing i++

    Reported-by: David Binderman &lt;dcb314@hotmail.com&gt;
    Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&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 e2889463b33d8b7f4bfe4d7d824dd3d621f2e3ef
Author: Andrew Gabbasov &lt;andrew_gabbasov@mentor.com&gt;
Date:   Thu Dec 24 10:25:33 2015 -0600

    udf: Check output buffer length when converting name to CS0

    commit bb00c898ad1ce40c4bb422a8207ae562e9aea7ae upstream.

    If a name contains at least some characters with Unicode values
    exceeding single byte, the CS0 output should have 2 bytes per character.
    And if other input characters have single byte Unicode values, then
    the single input byte is converted to 2 output bytes, and the length
    of output becomes larger than the length of input. And if the input
    name is long enough, the output length may exceed the allocated buffer
    length.

    All this means that conversion from UTF8 or NLS to CS0 requires
    checking of output length in order to stop when it exceeds the given
    output buffer size.

    [JK: Make code return -ENAMETOOLONG instead of silently truncating the
    name]

    Signed-off-by: Andrew Gabbasov &lt;andrew_gabbasov@mentor.com&gt;
    Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit f548c900b08de916732524992aaccb83cfe65312
Author: Andrew Gabbasov &lt;andrew_gabbasov@mentor.com&gt;
Date:   Thu Dec 24 10:25:32 2015 -0600

    udf: Prevent buffer overrun with multi-byte characters

    commit ad402b265ecf6fa22d04043b41444cdfcdf4f52d upstream.

    udf_CS0toUTF8 function stops the conversion when the output buffer
    length reaches UDF_NAME_LEN-2, which is correct maximum name length,
    but, when checking, it leaves the space for a single byte only,
    while multi-bytes output characters can take more space, causing
    buffer overflow.

    Similar error exists in udf_CS0toNLS function, that restricts
    the output length to UDF_NAME_LEN, while actual maximum allowed
    length is UDF_NAME_LEN-2.

    In these cases the output can override not only the current buffer
    length field, causing corruption of the name buffer itself, but also
    following allocation structures, causing kernel crash.

    Adjust the output length checks in both functions to prevent buffer
    overruns in case of multi-bytes UTF8 or NLS characters.

    Signed-off-by: Andrew Gabbasov &lt;andrew_gabbasov@mentor.com&gt;
    Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 6b3a508f58f55ce1271c422d71e07f94f6ce7de5
Author: Vegard Nossum &lt;vegard.nossum@oracle.com&gt;
Date:   Fri Dec 11 15:54:16 2015 +0100

    udf: limit the maximum number of indirect extents in a row

    commit b0918d9f476a8434b055e362b83fa4fd1d462c3f upstream.

    udf_next_aext() just follows extent pointers while extents are marked as
    indirect. This can loop forever for corrupted filesystem. Limit number
    the of indirect extents we are willing to follow in a row.

    [JK: Updated changelog, limit, style]

    Signed-off-by: Vegard Nossum &lt;vegard.nossum@oracle.com&gt;
    Cc: Jan Kara &lt;jack@suse.com&gt;
    Cc: Quentin Casasnovas &lt;quentin.casasnovas@oracle.com&gt;
    Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
    Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 45a74b1ce8a11efc82d49100648f7c5dc753cbb8
Author: Andrew Elble &lt;aweits@rit.edu&gt;
Date:   Wed Dec 2 09:20:57 2015 -0500

    nfs: Fix race in __update_open_stateid()

    commit 361cad3c89070aeb37560860ea8bfc092d545adc upstream.

    We've seen this in a packet capture - I've intermixed what I
    think was going on. The fix here is to grab the so_lock sooner.

    1964379 -&gt; #1 open (for write) reply seqid=1
    1964393 -&gt; #2 open (for read) reply seqid=2

      __nfs4_close(), state-&gt;n_wronly--
      nfs4_state_set_mode_locked(), changes state-&gt;state = [R]
      state-&gt;flags is [RW]
      state-&gt;state is [R], state-&gt;n_wronly == 0, state-&gt;n_rdonly == 1

    1964398 -&gt; #3 open (for write) call -&gt; because close is already running
    1964399 -&gt; downgrade (to read) call seqid=2 (close of #1)
    1964402 -&gt; #3 open (for write) reply seqid=3

     __update_open_stateid()
       nfs_set_open_stateid_locked(), changes state-&gt;flags
       state-&gt;flags is [RW]
       state-&gt;state is [R], state-&gt;n_wronly == 0, state-&gt;n_rdonly == 1
       new sequence number is exposed now via nfs4_stateid_copy()

       next step would be update_open_stateflags(), pending so_lock

    1964403 -&gt; downgrade reply seqid=2, fails with OLD_STATEID (close of #1)

       nfs4_close_prepare() gets so_lock and recalcs flags -&gt; send close

    1964405 -&gt; downgrade (to read) call seqid=3 (close of #1 retry)

       __update_open_stateid() gets so_lock
     * update_open_stateflags() updates state-&gt;n_wronly.
       nfs4_state_set_mode_locked() updates state-&gt;state

       state-&gt;flags is [RW]
       state-&gt;state is [RW], state-&gt;n_wronly == 1, state-&gt;n_rdonly == 1

     * should have suppressed the preceding nfs4_close_prepare() from
       sending open_downgrade

    1964406 -&gt; write call
    1964408 -&gt; downgrade (to read) reply seqid=4 (close of #1 retry)

       nfs_clear_open_stateid_locked()
       state-&gt;flags is [R]
       state-&gt;state is [RW], state-&gt;n_wronly == 1, state-&gt;n_rdonly == 1

    1964409 -&gt; write reply (fails, openmode)

    Signed-off-by: Andrew Elble &lt;aweits@rit.edu&gt;
    Signed-off-by: Trond Myklebust &lt;trond.myklebust@primarydata.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 65b1cbfcc31b63903265bdb6851bfb32ed71c8db
Author: Anton Protopopov &lt;a.s.protopopov@gmail.com&gt;
Date:   Wed Feb 10 12:50:21 2016 -0500

    cifs: fix erroneous return value

    commit 4b550af519854421dfec9f7732cdddeb057134b2 upstream.

    The setup_ntlmv2_rsp() function may return positive value ENOMEM instead
    of -ENOMEM in case of kmalloc failure.

    Signed-off-by: Anton Protopopov &lt;a.s.protopopov@gmail.com&gt;
    Signed-off-by: Steve French &lt;smfrench@gmail.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 2388eb1b0645f815b193165b17c0ab0f161ec17e
Author: Yong Li &lt;sdliyong@gmail.com&gt;
Date:   Wed Jan 6 09:09:43 2016 +0800

    iio: dac: mcp4725: set iio name property in sysfs

    commit 97a249e98a72d6b79fb7350a8dd56b147e9d5bdb upstream.

    Without this change, the name entity for mcp4725 is missing in
    /sys/bus/iio/devices/iio\:device*/name

    With this change, name is reported correctly

    Signed-off-by: Yong Li &lt;sdliyong@gmail.com&gt;
    Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 9d080ce6c4f118fa425f072e28c0b75ee715a69c
Author: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Date:   Fri Nov 27 14:55:56 2015 +0100

    iio: adis_buffer: Fix out-of-bounds memory access

    commit d590faf9e8f8509a0a0aa79c38e87fcc6b913248 upstream.

    The SPI tx and rx buffers are both supposed to be scan_bytes amount of
    bytes large and a common allocation is used to allocate both buffers. This
    puts the beginning of the tx buffer scan_bytes bytes after the rx buffer.
    The initialization of the tx buffer pointer is done adding scan_bytes to
    the beginning of the rx buffer, but since the rx buffer is of type __be16
    this will actually add two times as much and the tx buffer ends up pointing
    after the allocated buffer.

    Fix this by using scan_count, which is scan_bytes / 2, instead of
    scan_bytes when initializing the tx buffer pointer.

    Fixes: aacff892cbd5 ("staging:iio:adis: Preallocate transfer message")
    Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
    Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 3effd3faeaa18907ba672f4545d0ba4602a2eb8b
Author: Michael Hennerich &lt;michael.hennerich@analog.com&gt;
Date:   Tue Oct 13 18:15:37 2015 +0200

    iio:ad5064: Make sure ad5064_i2c_write() returns 0 on success

    commit 03fe472ef33b7f31fbd11d300dbb3fdab9c00fd4 upstream.

    i2c_master_send() returns the number of bytes transferred on success while
    the ad5064 driver expects that the write() callback returns 0 on success.
    Fix that by translating any non negative return value of i2c_master_send()
    to 0.

    Fixes: commit 6a17a0768f77 ("iio:dac:ad5064: Add support for the ad5629r and ad5669r")
    Signed-off-by: Michael Hennerich &lt;michael.hennerich@analog.com&gt;
    Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
    Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit aac11e32617a7de35937748d1f33aae33be0dff0
Author: Vladimir Zapolskiy &lt;vz@mleia.com&gt;
Date:   Sat Oct 17 21:44:38 2015 +0300

    iio: lpc32xx_adc: fix warnings caused by enabling unprepared clock

    commit 01bb70ae0b98d266fa3e860482c7ce22fa482a6e upstream.

    If common clock framework is configured, the driver generates a warning,
    which is fixed by this change:

        root@devkit3250:~# cat /sys/bus/iio/devices/iio\:device0/in_voltage0_raw
        ------------[ cut here ]------------
        WARNING: CPU: 0 PID: 724 at drivers/clk/clk.c:727 clk_core_enable+0x2c/0xa4()
        Modules linked in: sc16is7xx snd_soc_uda1380
        CPU: 0 PID: 724 Comm: cat Not tainted 4.3.0-rc2+ #198
        Hardware name: LPC32XX SoC (Flattened Device Tree)
        Backtrace:
        [&lt;&gt;] (dump_backtrace) from [&lt;&gt;] (show_stack+0x18/0x1c)
        [&lt;&gt;] (show_stack) from [&lt;&gt;] (dump_stack+0x20/0x28)
        [&lt;&gt;] (dump_stack) from [&lt;&gt;] (warn_slowpath_common+0x90/0xb8)
        [&lt;&gt;] (warn_slowpath_common) from [&lt;&gt;] (warn_slowpath_null+0x24/0x2c)
        [&lt;&gt;] (warn_slowpath_null) from [&lt;&gt;] (clk_core_enable+0x2c/0xa4)
        [&lt;&gt;] (clk_core_enable) from [&lt;&gt;] (clk_enable+0x24/0x38)
        [&lt;&gt;] (clk_enable) from [&lt;&gt;] (lpc32xx_read_raw+0x38/0x80)
        [&lt;&gt;] (lpc32xx_read_raw) from [&lt;&gt;] (iio_read_channel_info+0x70/0x94)
        [&lt;&gt;] (iio_read_channel_info) from [&lt;&gt;] (dev_attr_show+0x28/0x4c)
        [&lt;&gt;] (dev_attr_show) from [&lt;&gt;] (sysfs_kf_seq_show+0x8c/0xf0)
        [&lt;&gt;] (sysfs_kf_seq_show) from [&lt;&gt;] (kernfs_seq_show+0x2c/0x30)
        [&lt;&gt;] (kernfs_seq_show) from [&lt;&gt;] (seq_read+0x1c8/0x440)
        [&lt;&gt;] (seq_read) from [&lt;&gt;] (kernfs_fop_read+0x38/0x170)
        [&lt;&gt;] (kernfs_fop_read) from [&lt;&gt;] (do_readv_writev+0x16c/0x238)
        [&lt;&gt;] (do_readv_writev) from [&lt;&gt;] (vfs_readv+0x50/0x58)
        [&lt;&gt;] (vfs_readv) from [&lt;&gt;] (default_file_splice_read+0x1a4/0x308)
        [&lt;&gt;] (default_file_splice_read) from [&lt;&gt;] (do_splice_to+0x78/0x84)
        [&lt;&gt;] (do_splice_to) from [&lt;&gt;] (splice_direct_to_actor+0xc8/0x1cc)
        [&lt;&gt;] (splice_direct_to_actor) from [&lt;&gt;] (do_splice_direct+0xa0/0xb8)
        [&lt;&gt;] (do_splice_direct) from [&lt;&gt;] (do_sendfile+0x1a8/0x30c)
        [&lt;&gt;] (do_sendfile) from [&lt;&gt;] (SyS_sendfile64+0x104/0x10c)
        [&lt;&gt;] (SyS_sendfile64) from [&lt;&gt;] (ret_fast_syscall+0x0/0x38)

    Signed-off-by: Vladimir Zapolskiy &lt;vz@mleia.com&gt;
    Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 1a640c6b2d1d4fdbf424b2958daa23ffbbbb9e06
Author: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
Date:   Mon Oct 12 14:56:28 2015 +0200

    iio:ad7793: Fix ad7785 product ID

    commit 785171fd6cd7dcd7ada5a733b6a2d44ec566c3a0 upstream.

    While the datasheet for the AD7785 lists 0xXB as the product ID the actual
    product ID is 0xX3.

    Fix the product ID otherwise the driver will reject the device due to non
    matching IDs.

    Fixes: e786cc26dcc5 ("staging:iio:ad7793: Implement stricter id checking")
    Signed-off-by: Lars-Peter Clausen &lt;lars@metafoo.de&gt;
    Signed-off-by: Jonathan Cameron &lt;jic23@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 8a3f8369fb82b6c2dd8bed82e219b8a49abade2d
Author: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Date:   Wed Feb 10 08:03:26 2016 -0800

    scsi: fix soft lockup in scsi_remove_target() on module removal

    commit 90a88d6ef88edcfc4f644dddc7eef4ea41bccf8b upstream.

    This softlockup is currently happening:

    [  444.088002] NMI watchdog: BUG: soft lockup - CPU#1 stuck for 22s! [kworker/1:1:29]
    [  444.088002] Modules linked in: lpfc(-) qla2x00tgt(O) qla2xxx_scst(O) scst_vdisk(O) scsi_transport_fc libcrc32c scst(O) dlm configfs nfsd lockd grace nfs_acl auth_rpcgss sunrpc ed
    d snd_pcm_oss snd_mixer_oss snd_seq snd_seq_device dm_mod iTCO_wdt snd_hda_codec_realtek snd_hda_codec_generic gpio_ich iTCO_vendor_support ppdev snd_hda_intel snd_hda_codec snd_hda
    _core snd_hwdep tg3 snd_pcm snd_timer libphy lpc_ich parport_pc ptp acpi_cpufreq snd pps_core fjes parport i2c_i801 ehci_pci tpm_tis tpm sr_mod cdrom soundcore floppy hwmon sg 8250_
    fintek pcspkr i915 drm_kms_helper uhci_hcd ehci_hcd drm fb_sys_fops sysimgblt sysfillrect syscopyarea i2c_algo_bit usbcore button video usb_common fan ata_generic ata_piix libata th
    ermal
    [  444.088002] CPU: 1 PID: 29 Comm: kworker/1:1 Tainted: G           O    4.4.0-rc5-2.g1e923a3-default #1
    [  444.088002] Hardware name: FUJITSU SIEMENS ESPRIMO E           /D2164-A1, BIOS 5.00 R1.10.2164.A1               05/08/2006
    [  444.088002] Workqueue: fc_wq_4 fc_rport_final_delete [scsi_transport_fc]
    [  444.088002] task: f6266ec0 ti: f6268000 task.ti: f6268000
    [  444.088002] EIP: 0060:[&lt;c07e7044&gt;] EFLAGS: 00000286 CPU: 1
    [  444.088002] EIP is at _raw_spin_unlock_irqrestore+0x14/0x20
    [  444.088002] EAX: 00000286 EBX: f20d3800 ECX: 00000002 EDX: 00000286
    [  444.088002] ESI: f50ba800 EDI: f2146848 EBP: f6269ec8 ESP: f6269ec8
    [  444.088002]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
    [  444.088002] CR0: 8005003b CR2: 08f96600 CR3: 363ae000 CR4: 000006d0
    [  444.088002] Stack:
    [  444.088002]  f6269eec c066b0f7 00000286 f2146848 f50ba808 f50ba800 f50ba800 f2146a90
    [  444.088002]  f2146848 f6269f08 f8f0a4ed f3141000 f2146800 f2146a90 f619fa00 00000040
    [  444.088002]  f6269f40 c026cb25 00000001 166c6392 00000061 f6757140 f6136340 00000004
    [  444.088002] Call Trace:
    [  444.088002]  [&lt;c066b0f7&gt;] scsi_remove_target+0x167/0x1c0
    [  444.088002]  [&lt;f8f0a4ed&gt;] fc_rport_final_delete+0x9d/0x1e0 [scsi_transport_fc]
    [  444.088002]  [&lt;c026cb25&gt;] process_one_work+0x155/0x3e0
    [  444.088002]  [&lt;c026cde7&gt;] worker_thread+0x37/0x490
    [  444.088002]  [&lt;c027214b&gt;] kthread+0x9b/0xb0
    [  444.088002]  [&lt;c07e72c1&gt;] ret_from_kernel_thread+0x21/0x40

    What appears to be happening is that something has pinned the target
    so it can't go into STARGET_DEL via final release and the loop in
    scsi_remove_target spins endlessly until that happens.

    The fix for this soft lockup is to not keep looping over a device that
    we've called remove on but which hasn't gone into DEL state.  This
    patch will retain a simplistic memory of the last target and not keep
    looping over it.

    Reported-by: Sebastian Herbszt &lt;herbszt@gmx.de&gt;
    Tested-by: Sebastian Herbszt &lt;herbszt@gmx.de&gt;
    Fixes: 40998193560dab6c3ce8d25f4fa58a23e252ef38
    Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 50ec3624a2eadcf6d06fa32a8d89324639066c53
Author: Hannes Reinecke &lt;hare@suse.de&gt;
Date:   Fri Jan 22 15:42:41 2016 +0100

    scsi_dh_rdac: always retry MODE SELECT on command lock violation

    commit d2d06d4fe0f2cc2df9b17fefec96e6e1a1271d91 upstream.

    If MODE SELECT returns with sense '05/91/36' (command lock violation)
    it should always be retried without counting the number of retries.
    During an HBA upgrade or similar circumstances one might see a flood
    of MODE SELECT command from various HBAs, which will easily trigger
    the sense code and exceed the retry count.

    Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
    Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
    Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 014212bf4f4bd566c88dd7809882b1be0eb79c51
Author: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
Date:   Tue Feb 2 16:57:35 2016 -0800

    drivers/scsi/sg.c: mark VMA as VM_IO to prevent migration

    commit 461c7fa126794157484dca48e88effa4963e3af3 upstream.

    Reduced testcase:

        #include &lt;fcntl.h&gt;
        #include &lt;unistd.h&gt;
        #include &lt;sys/mman.h&gt;
        #include &lt;numaif.h&gt;

        #define SIZE 0x2000

        int main()
        {
            int fd;
            void *p;

            fd = open("/dev/sg0", O_RDWR);
            p = mmap(NULL, SIZE, PROT_EXEC, MAP_PRIVATE | MAP_LOCKED, fd, 0);
            mbind(p, SIZE, 0, NULL, 0, MPOL_MF_MOVE);
            return 0;
        }

    We shouldn't try to migrate pages in sg VMA as we don't have a way to
    update Sg_scatter_hold::pages accordingly from mm core.

    Let's mark the VMA as VM_IO to indicate to mm core that the VMA is not
    migratable.

    Signed-off-by: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
    Reported-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Acked-by: Vlastimil Babka &lt;vbabka@suse.cz&gt;
    Cc: Doug Gilbert &lt;dgilbert@interlog.com&gt;
    Cc: David Rientjes &lt;rientjes@google.com&gt;
    Cc: Naoya Horiguchi &lt;n-horiguchi@ah.jp.nec.com&gt;
    Cc: "Kirill A. Shutemov" &lt;kirill.shutemov@linux.intel.com&gt;
    Cc: Shiraz Hashim &lt;shashim@codeaurora.org&gt;
    Cc: Hugh Dickins &lt;hughd@google.com&gt;
    Cc: Sasha Levin &lt;sasha.levin@oracle.com&gt;
    Cc: syzkaller &lt;syzkaller@googlegroups.com&gt;
    Cc: Kostya Serebryany &lt;kcc@google.com&gt;
    Cc: Alexander Potapenko &lt;glider@google.com&gt;
    Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.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;

commit 3d1df27856ea8b9455e4a59dd22eee9afa40ead9
Author: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Date:   Wed Jan 20 11:26:01 2016 -0500

    SCSI: fix crashes in sd and sr runtime PM

    commit 13b4389143413a1f18127c07f72c74cad5b563e8 upstream.

    Runtime suspend during driver probe and removal can cause problems.
    The driver's runtime_suspend or runtime_resume callbacks may invoked
    before the driver has finished binding to the device or after the
    driver has unbound from the device.

    This problem shows up with the sd and sr drivers, and can cause disk
    or CD/DVD drives to become unusable as a result.  The fix is simple.
    The drivers store a pointer to the scsi_disk or scsi_cd structure as
    their private device data when probing is finished, so we simply have
    to be sure to clear the private data during removal and test it during
    runtime suspend/resume.

    This fixes &lt;https://bugs.debian.org/801925&gt;.

    Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
    Reported-by: Paul Menzel &lt;paul.menzel@giantmonkey.de&gt;
    Reported-by: Erich Schubert &lt;erich@debian.org&gt;
    Reported-by: Alexandre Rossi &lt;alexandre.rossi@gmail.com&gt;
    Tested-by: Paul Menzel &lt;paul.menzel@giantmonkey.de&gt;
    Tested-by: Erich Schubert &lt;erich@debian.org&gt;
    Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit bac26cabd29db3237c288d054054a1dfbea835f6
Author: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Date:   Tue Jan 19 16:15:27 2016 -0800

    iscsi-target: Fix potential dead-lock during node acl delete

    commit 26a99c19f810b2593410899a5b304b21b47428a6 upstream.

    This patch is a iscsi-target specific bug-fix for a dead-lock
    that can occur during explicit struct se_node_acl-&gt;acl_group
    se_session deletion via configfs rmdir(2), when iscsi-target
    time2retain timer is still active.

    It changes iscsi-target to obtain se_portal_group-&gt;session_lock
    internally using spin_in_locked() to check for the specific
    se_node_acl configfs shutdown rmdir(2) case.

    Note this patch is intended for stable, and the subsequent
    v4.5-rc patch converts target_core_tpg.c to use proper
    se_sess-&gt;sess_kref reference counting for both se_node_acl
    deletion + se_node_acl-&gt;queue_depth se_session restart.

    Reported-by:: Sagi Grimberg &lt;sagig@mellanox.com&gt;
    Cc: Christoph Hellwig &lt;hch@lst.de&gt;
    Cc: Hannes Reinecke &lt;hare@suse.de&gt;
    Cc: Andy Grover &lt;agrover@redhat.com&gt;
    Cc: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
    Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 2bfa7bba55afcfbd887de08f936c3186ca2fae82
Author: Ken Xue &lt;ken.xue@amd.com&gt;
Date:   Tue Dec 1 14:45:46 2015 +0800

    SCSI: Fix NULL pointer dereference in runtime PM

    commit 4fd41a8552afc01054d9d9fc7f1a63c324867d27 upstream.

    The routines in scsi_pm.c assume that if a runtime-PM callback is
    invoked for a SCSI device, it can only mean that the device's driver
    has asked the block layer to handle the runtime power management (by
    calling blk_pm_runtime_init(), which among other things sets q-&gt;dev).

    However, this assumption turns out to be wrong for things like the ses
    driver.  Normally ses devices are not allowed to do runtime PM, but
    userspace can override this setting.  If this happens, the kernel gets
    a NULL pointer dereference when blk_post_runtime_resume() tries to use
    the uninitialized q-&gt;dev pointer.

    This patch fixes the problem by checking q-&gt;dev in block layer before
    handle runtime PM. Since ses doesn't define any PM callbacks and call
    blk_pm_runtime_init(), the crash won't occur.

    This fixes Bugzilla #101371.
    https://bugzilla.kernel.org/show_bug.cgi?id=101371

    More discussion can be found from below link.
    http://marc.info/?l=linux-scsi&amp;m=144163730531875&amp;w=2

    Signed-off-by: Ken Xue &lt;Ken.Xue@amd.com&gt;
    Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
    Cc: Xiangliang Yu &lt;Xiangliang.Yu@amd.com&gt;
    Cc: James E.J. Bottomley &lt;JBottomley@odin.com&gt;
    Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
    Cc: Michael Terry &lt;Michael.terry@canonical.com&gt;
    Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 0c808c2962e2cfc9ded0b96a211ed819562e45ba
Author: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Date:   Wed Nov 18 14:56:36 2015 -0800

    Fix a memory leak in scsi_host_dev_release()

    commit b49493f99690c8eaacfbc635bafaad629ea2c036 upstream.

    Avoid that kmemleak reports the following memory leak if a
    SCSI LLD calls scsi_host_alloc() and scsi_host_put() but neither
    scsi_host_add() nor scsi_host_remove(). The following shell
    command triggers that scenario:

    for ((i=0; i&lt;2; i++)); do
      srp_daemon -oac |
      while read line; do
        echo $line &gt;/sys/class/infiniband_srp/srp-mlx4_0-1/add_target
      done
    done

    unreferenced object 0xffff88021b24a220 (size 8):
      comm "srp_daemon", pid 56421, jiffies 4295006762 (age 4240.750s)
      hex dump (first 8 bytes):
        68 6f 73 74 35 38 00 a5                          host58..
      backtrace:
        [&lt;ffffffff8151014a&gt;] kmemleak_alloc+0x7a/0xc0
        [&lt;ffffffff81165c1e&gt;] __kmalloc_track_caller+0xfe/0x160
        [&lt;ffffffff81260d2b&gt;] kvasprintf+0x5b/0x90
        [&lt;ffffffff81260e2d&gt;] kvasprintf_const+0x8d/0xb0
        [&lt;ffffffff81254b0c&gt;] kobject_set_name_vargs+0x3c/0xa0
        [&lt;ffffffff81337e3c&gt;] dev_set_name+0x3c/0x40
        [&lt;ffffffff81355757&gt;] scsi_host_alloc+0x327/0x4b0
        [&lt;ffffffffa03edc8e&gt;] srp_create_target+0x4e/0x8a0 [ib_srp]
        [&lt;ffffffff8133778b&gt;] dev_attr_store+0x1b/0x20
        [&lt;ffffffff811f27fa&gt;] sysfs_kf_write+0x4a/0x60
        [&lt;ffffffff811f1e8e&gt;] kernfs_fop_write+0x14e/0x180
        [&lt;ffffffff81176eef&gt;] __vfs_write+0x2f/0xf0
        [&lt;ffffffff811771e4&gt;] vfs_write+0xa4/0x100
        [&lt;ffffffff81177c64&gt;] SyS_write+0x54/0xc0
        [&lt;ffffffff8151b257&gt;] entry_SYSCALL_64_fastpath+0x12/0x6f

    Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
    Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
    Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
    Reviewed-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
    Reviewed-by: Lee Duncan &lt;lduncan@suse.com&gt;
    Cc: Christoph Hellwig &lt;hch@lst.de&gt;
    Cc: Hannes Reinecke &lt;hare@suse.de&gt;
    Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 481c34209a7e52a9f74ce60e539b9c00036e66b3
Author: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Date:   Thu Nov 5 14:11:59 2015 -0800

    iscsi-target: Fix rx_login_comp hang after login failure

    commit ca82c2bded29b38d36140bfa1e76a7bbfcade390 upstream.

    This patch addresses a case where iscsi_target_do_tx_login_io()
    fails sending the last login response PDU, after the RX/TX
    threads have already been started.

    The case centers around iscsi_target_rx_thread() not invoking
    allow_signal(SIGINT) before the send_sig(SIGINT, ...) occurs
    from the failure path, resulting in RX thread hanging
    indefinately on iscsi_conn-&gt;rx_login_comp.

    Note this bug is a regression introduced by:

      commit e54198657b65625085834847ab6271087323ffea
      Author: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
      Date:   Wed Jul 22 23:14:19 2015 -0700

          iscsi-target: Fix iscsit_start_kthreads failure OOPs

    To address this bug, complete -&gt;rx_login_complete for good
    measure in the failure path, and immediately return from
    RX thread context if connection state did not actually reach
    full feature phase (TARG_CONN_STATE_LOGGED_IN).

    Cc: Sagi Grimberg &lt;sagig@mellanox.com&gt;
    Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit f7d615b9cc7bcfaf064d715770b061b995b44bce
Author: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Date:   Tue Oct 27 10:49:54 2015 +0100

    scsi_sysfs: Fix queue_ramp_up_period return code

    commit 863e02d0e173bb9d8cea6861be22820b25c076cc upstream.

    Writing a number to /sys/bus/scsi/devices/&lt;sdev&gt;/queue_ramp_up_period
    returns the value of that number instead of the number of bytes written.
    This behavior can confuse programs expecting POSIX write() semantics.
    Fix this by returning the number of bytes written instead.

    Signed-off-by: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
    Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
    Reviewed-by: Matthew R. Ochs &lt;mrochs@linux.vnet.ibm.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: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 2544cce12c7bd18e880b09c21b1a2d944a3423eb
Author: Christoph Hellwig &lt;hch@lst.de&gt;
Date:   Mon Oct 19 16:35:46 2015 +0200

    scsi: restart list search after unlock in scsi_remove_target

    commit 40998193560dab6c3ce8d25f4fa58a23e252ef38 upstream.

    When dropping a lock while iterating a list we must restart the search
    as other threads could have manipulated the list under us.  Without this
    we can get stuck in an endless loop.  This bug was introduced by

    commit bc3f02a795d3b4faa99d37390174be2a75d091bd
    Author: Dan Williams &lt;djbw@fb.com&gt;
    Date:   Tue Aug 28 22:12:10 2012 -0700

        [SCSI] scsi_remove_target: fix softlockup regression on hot remove

    Which was itself trying to fix a reported soft lockup issue

    http://thread.gmane.org/gmane.linux.kernel/1348679

    However, we believe even with this revert of the original patch, the soft
    lockup problem has been fixed by

    commit f2495e228fce9f9cec84367547813cbb0d6db15a
    Author: James Bottomley &lt;JBottomley@Parallels.com&gt;
    Date:   Tue Jan 21 07:01:41 2014 -0800

        [SCSI] dual scan thread bug fix

    Thanks go to Dan Williams &lt;dan.j.williams@intel.com&gt; for tracking all this
    prior history down.

    Reported-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
    Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
    Tested-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
    Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
    Fixes: bc3f02a795d3b4faa99d37390174be2a75d091bd
    Signed-off-by: James Bottomley &lt;JBottomley@Odin.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 00707985578715324f32a0d71dbf6221bc4a2fc7
Author: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Date:   Wed Jan 13 08:10:31 2016 -0800

    klist: fix starting point removed bug in klist iterators

    commit 00cd29b799e3449f0c68b1cc77cd4a5f95b42d17 upstream.

    The starting node for a klist iteration is often passed in from
    somewhere way above the klist infrastructure, meaning there's no
    guarantee the node is still on the list.  We've seen this in SCSI where
    we use bus_find_device() to iterate through a list of devices.  In the
    face of heavy hotplug activity, the last device returned by
    bus_find_device() can be removed before the next call.  This leads to

    Dec  3 13:22:02 localhost kernel: WARNING: CPU: 2 PID: 28073 at include/linux/kref.h:47 klist_iter_init_node+0x3d/0x50()
    Dec  3 13:22:02 localhost kernel: Modules linked in: scsi_debug x86_pkg_temp_thermal kvm_intel kvm irqbypass crc32c_intel joydev iTCO_wdt dcdbas ipmi_devintf acpi_power_meter iTCO_vendor_support ipmi_si imsghandler pcspkr wmi acpi_cpufreq tpm_tis tpm shpchp lpc_ich mfd_core nfsd nfs_acl lockd grace sunrpc tg3 ptp pps_core
    Dec  3 13:22:02 localhost kernel: CPU: 2 PID: 28073 Comm: cat Not tainted 4.4.0-rc1+ #2
    Dec  3 13:22:02 localhost kernel: Hardware name: Dell Inc. PowerEdge R320/08VT7V, BIOS 2.0.22 11/19/2013
    Dec  3 13:22:02 localhost kernel: ffffffff81a20e77 ffff880613acfd18 ffffffff81321eef 0000000000000000
    Dec  3 13:22:02 localhost kernel: ffff880613acfd50 ffffffff8107ca52 ffff88061176b198 0000000000000000
    Dec  3 13:22:02 localhost kernel: ffffffff814542b0 ffff880610cfb100 ffff88061176b198 ffff880613acfd60
    Dec  3 13:22:02 localhost kernel: Call Trace:
    Dec  3 13:22:02 localhost kernel: [&lt;ffffffff81321eef&gt;] dump_stack+0x44/0x55
    Dec  3 13:22:02 localhost kernel: [&lt;ffffffff8107ca52&gt;] warn_slowpath_common+0x82/0xc0
    Dec  3 13:22:02 localhost kernel: [&lt;ffffffff814542b0&gt;] ? proc_scsi_show+0x20/0x20
    Dec  3 13:22:02 localhost kernel: [&lt;ffffffff8107cb4a&gt;] warn_slowpath_null+0x1a/0x20
    Dec  3 13:22:02 localhost kernel: [&lt;ffffffff8167225d&gt;] klist_iter_init_node+0x3d/0x50
    Dec  3 13:22:02 localhost kernel: [&lt;ffffffff81421d41&gt;] bus_find_device+0x51/0xb0
    Dec  3 13:22:02 localhost kernel: [&lt;ffffffff814545ad&gt;] scsi_seq_next+0x2d/0x40
    [...]

    And an eventual crash. It can actually occur in any hotplug system
    which has a device finder and a starting device.

    We can fix this globally by making sure the starting node for
    klist_iter_init_node() is actually a member of the list before using it
    (and by starting from the beginning if it isn't).

    Reported-by: Ewan D. Milne &lt;emilne@redhat.com&gt;
    Tested-by: Ewan D. Milne &lt;emilne@redhat.com&gt;
    Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 710636bc7a255376fe26c768377afa8aee030d86
Author: Arnd Bergmann &lt;arnd@arndb.de&gt;
Date:   Fri Feb 12 22:26:42 2016 +0100

    tracing: Fix freak link error caused by branch tracer

    commit b33c8ff4431a343561e2319f17c14286f2aa52e2 upstream.

    In my randconfig tests, I came across a bug that involves several
    components:

    * gcc-4.9 through at least 5.3
    * CONFIG_GCOV_PROFILE_ALL enabling -fprofile-arcs for all files
    * CONFIG_PROFILE_ALL_BRANCHES overriding every if()
    * The optimized implementation of do_div() that tries to
      replace a library call with an division by multiplication
    * code in drivers/media/dvb-frontends/zl10353.c doing

            u32 adc_clock = 450560; /* 45.056 MHz */
            if (state-&gt;config.adc_clock)
                    adc_clock = state-&gt;config.adc_clock;
            do_div(value, adc_clock);

    In this case, gcc fails to determine whether the divisor
    in do_div() is __builtin_constant_p(). In particular, it
    concludes that __builtin_constant_p(adc_clock) is false, while
    __builtin_constant_p(!!adc_clock) is true.

    That in turn throws off the logic in do_div() that also uses
    __builtin_constant_p(), and instead of picking either the
    constant- optimized division, and the code in ilog2() that uses
    __builtin_constant_p() to figure out whether it knows the answer at
    compile time. The result is a link error from failing to find
    multiple symbols that should never have been called based on
    the __builtin_constant_p():

    dvb-frontends/zl10353.c:138: undefined reference to `____ilog2_NaN'
    dvb-frontends/zl10353.c:138: undefined reference to `__aeabi_uldivmod'
    ERROR: "____ilog2_NaN" [drivers/media/dvb-frontends/zl10353.ko] undefined!
    ERROR: "__aeabi_uldivmod" [drivers/media/dvb-frontends/zl10353.ko] undefined!

    This patch avoids the problem by changing __trace_if() to check
    whether the condition is known at compile-time to be nonzero, rather
    than checking whether it is actually a constant.

    I see this one link error in roughly one out of 1600 randconfig builds
    on ARM, and the patch fixes all known instances.

    Link: http://lkml.kernel.org/r/1455312410-1058841-1-git-send-email-arnd@arndb.de

    Acked-by: Nicolas Pitre &lt;nico@linaro.org&gt;
    Fixes: ab3c9c686e22 ("branch tracer, intel-iommu: fix build with CONFIG_BRANCH_TRACER=y")
    Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
    Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit c3b066b6e4d524dd27f23a4417ac2c3633b13327
Author: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Date:   Mon Nov 16 17:25:16 2015 -0500

    tools lib traceevent: Fix output of %llu for 64 bit values read on 32 bit machines

    commit 32abc2ede536aae52978d6c0a8944eb1df14f460 upstream.

    When a long value is read on 32 bit machines for 64 bit output, the
    parsing needs to change "%lu" into "%llu", as the value is read
    natively.

    Unfortunately, if "%llu" is already there, the code will add another "l"
    to it and fail to parse it properly.

    Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
    Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
    Link: http://lkml.kernel.org/r/20151116172516.4b79b109@gandalf.local.home
    Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 414f6fbc84b58e3f1724f9056efb0c730d040ba6
Author: Jann Horn &lt;jann@thejh.net&gt;
Date:   Wed Jan 20 15:00:04 2016 -0800

    ptrace: use fsuid, fsgid, effective creds for fs access checks

    commit caaee6234d05a58c5b4d05e7bf766131b810a657 upstream.

    By checking the effective credentials instead of the real UID / permitted
    capabilities, ensure that the calling process actually intended to use its
    credentials.

    To ensure that all ptrace checks use the correct caller credentials (e.g.
    in case out-of-tree code or newly added code omits the PTRACE_MODE_*CREDS
    flag), use two new flags and require one of them to be set.

    The problem was that when a privileged task had temporarily dropped its
    privileges, e.g.  by calling setreuid(0, user_uid), with the intent to
    perform following syscalls with the credentials of a user, it still passed
    ptrace access checks that the user would not be able to pass.

    While an attacker should not be able to convince the privileged task to
    perform a ptrace() syscall, this is a problem because the ptrace access
    check is reused for things in procfs.

    In particular, the following somewhat interesting procfs entries only rely
    on ptrace access checks:

     /proc/$pid/stat - uses the check for determining whether pointers
         should be visible, useful for bypassing ASLR
     /proc/$pid/maps - also useful for bypassing ASLR
     /proc/$pid/cwd - useful for gaining access to restricted
         directories that contain files with lax permissions, e.g. in
         this scenario:
         lrwxrwxrwx root root /proc/13020/cwd -&gt; /root/foobar
         drwx------ root root /root
         drwxr-xr-x root root /root/foobar
         -rw-r--r-- root root /root/foobar/secret

    Therefore, on a system where a root-owned mode 6755 binary changes its
    effective credentials as described and then dumps a user-specified file,
    this could be used by an attacker to reveal the memory layout of root's
    processes or reveal the contents of files he is not allowed to access
    (through /proc/$pid/cwd).

    [akpm@linux-foundation.org: fix warning]
    Signed-off-by: Jann Horn &lt;jann@thejh.net&gt;
    Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
    Cc: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
    Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
    Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
    Cc: James Morris &lt;james.l.morris@oracle.com&gt;
    Cc: "Serge E. Hallyn" &lt;serge.hallyn@ubuntu.com&gt;
    Cc: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
    Cc: Andy Lutomirski &lt;luto@kernel.org&gt;
    Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
    Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
    Cc: Willy Tarreau &lt;w@1wt.eu&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 05c5582559ac40ab12a4624681d41f2771239c8e
Author: Peter Zijlstra &lt;peterz@infradead.org&gt;
Date:   Mon Nov 2 10:50:51 2015 +0100

    perf: Fix inherited events vs. tracepoint filters

    commit b71b437eedaed985062492565d9d421d975ae845 upstream.

    Arnaldo reported that tracepoint filters seem to misbehave (ie. not
    apply) on inherited events.

    The fix is obvious; filters are only set on the actual (parent)
    event, use the normal pattern of using this parent event for filters.
    This is safe because each child event has a reference to it.

    Reported-by: Arnaldo Carvalho de Melo &lt;acme@kernel.org&gt;
    Tested-by: Arnaldo Carvalho de Melo &lt;acme@kernel.org&gt;
    Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
    Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
    Cc: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
    Cc: David Ahern &lt;dsahern@gmail.com&gt;
    Cc: Frédéric Weisbecker &lt;fweisbec@gmail.com&gt;
    Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
    Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
    Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&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;
    Cc: Wang Nan &lt;wangnan0@huawei.com&gt;
    Link: http://lkml.kernel.org/r/20151102095051.GN17308@twins.programming.kicks-ass.net
    Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 590a2f0b8c5d10279bf8cb6d07ca426e6086b349
Author: Filipe Manana &lt;fdmanana@suse.com&gt;
Date:   Wed Feb 3 19:17:27 2016 +0000

    Btrfs: fix hang on extent buffer lock caused by the inode_paths ioctl

    commit 0c0fe3b0fa45082cd752553fdb3a4b42503a118e upstream.

    While doing some tests I ran into an hang on an extent buffer's rwlock
    that produced the following trace:

    [39389.800012] NMI watchdog: BUG: soft lockup - CPU#15 stuck for 22s! [fdm-stress:32166]
    [39389.800016] NMI watchdog: BUG: soft lockup - CPU#14 stuck for 22s! [fdm-stress:32165]
    [39389.800016] Modules linked in: btrfs dm_mod ppdev xor sha256_generic hmac raid6_pq drbg ansi_cprng aesni_intel i2c_piix4 acpi_cpufreq aes_x86_64 ablk_helper tpm_tis parport_pc i2c_core sg cryptd evdev psmouse lrw tpm parport gf128mul serio_raw pcspkr glue_helper processor button loop autofs4 ext4 crc16 mbcache jbd2 sd_mod sr_mod cdrom ata_generic virtio_scsi ata_piix libata virtio_pci virtio_ring crc32c_intel scsi_mod e1000 virtio floppy [last unloaded: btrfs]
    [39389.800016] irq event stamp: 0
    [39389.800016] hardirqs last  enabled at (0): [&lt;          (null)&gt;]           (null)
    [39389.800016] hardirqs last disabled at (0): [&lt;ffffffff8104e58d&gt;] copy_process+0x638/0x1a35
    [39389.800016] softirqs last  enabled at (0): [&lt;ffffffff8104e58d&gt;] copy_process+0x638/0x1a35
    [39389.800016] softirqs last disabled at (0): [&lt;          (null)&gt;]           (null)
    [39389.800016] CPU: 14 PID: 32165 Comm: fdm-stress Not tainted 4.4.0-rc6-btrfs-next-18+ #1
    [39389.800016] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS by qemu-project.org 04/01/2014
    [39389.800016] task: ffff880175b1ca40 ti: ffff8800a185c000 task.ti: ffff8800a185c000
    [39389.800016] RIP: 0010:[&lt;ffffffff810902af&gt;]  [&lt;ffffffff810902af&gt;] queued_spin_lock_slowpath+0x57/0x158
    [39389.800016] RSP: 0018:ffff8800a185fb80  EFLAGS: 00000202
    [39389.800016] RAX: 0000000000000101 RBX: ffff8801710c4e9c RCX: 0000000000000101
    [39389.800016] RDX: 0000000000000100 RSI: 0000000000000001 RDI: 0000000000000001
    [39389.800016] RBP: ffff8800a185fb98 R08: 0000000000000001 R09: 0000000000000000
    [39389.800016] R10: ffff8800a185fb68 R11: 6db6db6db6db6db7 R12: ffff8801710c4e98
    [39389.800016] R13: ffff880175b1ca40 R14: ffff8800a185fc10 R15: ffff880175b1ca40
    [39389.800016] FS:  00007f6d37fff700(0000) GS:ffff8802be9c0000(0000) knlGS:0000000000000000
    [39389.800016] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [39389.800016] CR2: 00007f6d300019b8 CR3: 0000000037c93000 CR4: 00000000001406e0
    [39389.800016] Stack:
    [39389.800016]  ffff8801710c4e98 ffff8801710c4e98 ffff880175b1ca40 ffff8800a185fbb0
    [39389.800016]  ffffffff81091e11 ffff8801710c4e98 ffff8800a185fbc8 ffffffff81091895
    [39389.800016]  ffff8801710c4e98 ffff8800a185fbe8 ffffffff81486c5c ffffffffa067288c
    [39389.800016] Call Trace:
    [39389.800016]  [&lt;ffffffff81091e11&gt;] queued_read_lock_slowpath+0x46/0x60
    [39389.800016]  [&lt;ffffffff81091895&gt;] do_raw_read_lock+0x3e/0x41
    [39389.800016]  [&lt;ffffffff81486c5c&gt;] _raw_read_lock+0x3d/0x44
    [39389.800016]  [&lt;ffffffffa067288c&gt;] ? btrfs_tree_read_lock+0x54/0x125 [btrfs]
    [39389.800016]  [&lt;ffffffffa067288c&gt;] btrfs_tree_read_lock+0x54/0x125 [btrfs]
    [39389.800016]  [&lt;ffffffffa0622ced&gt;] ? btrfs_find_item+0xa7/0xd2 [btrfs]
    [39389.800016]  [&lt;ffffffffa069363f&gt;] btrfs_ref_to_path+0xd6/0x174 [btrfs]
    [39389.800016]  [&lt;ffffffffa0693730&gt;] inode_to_path+0x53/0xa2 [btrfs]
    [39389.800016]  [&lt;ffffffffa0693e2e&gt;] paths_from_inode+0x117/0x2ec [btrfs]
    [39389.800016]  [&lt;ffffffffa0670cff&gt;] btrfs_ioctl+0xd5b/0x2793 [btrfs]
    [39389.800016]  [&lt;ffffffff8108a8b0&gt;] ? arch_local_irq_save+0x9/0xc
    [39389.800016]  [&lt;ffffffff81276727&gt;] ? __this_cpu_preempt_check+0x13/0x15
    [39389.800016]  [&lt;ffffffff8108a8b0&gt;] ? arch_local_irq_save+0x9/0xc
    [39389.800016]  [&lt;ffffffff8118b3d4&gt;] ? rcu_read_unlock+0x3e/0x5d
    [39389.800016]  [&lt;ffffffff811822f8&gt;] do_vfs_ioctl+0x42b/0x4ea
    [39389.800016]  [&lt;ffffffff8118b4f3&gt;] ? __fget_light+0x62/0x71
    [39389.800016]  [&lt;ffffffff8118240e&gt;] SyS_ioctl+0x57/0x79
    [39389.800016]  [&lt;ffffffff814872d7&gt;] entry_SYSCALL_64_fastpath+0x12/0x6f
    [39389.800016] Code: b9 01 01 00 00 f7 c6 00 ff ff ff 75 32 83 fe 01 89 ca 89 f0 0f 45 d7 f0 0f b1 13 39 f0 74 04 89 c6 eb e2 ff ca 0f 84 fa 00 00 00 &lt;8b&gt; 03 84 c0 74 04 f3 90 eb f6 66 c7 03 01 00 e9 e6 00 00 00 e8
    [39389.800012] Modules linked in: btrfs dm_mod ppdev xor sha256_generic hmac raid6_pq drbg ansi_cprng aesni_intel i2c_piix4 acpi_cpufreq aes_x86_64 ablk_helper tpm_tis parport_pc i2c_core sg cryptd evdev psmouse lrw tpm parport gf128mul serio_raw pcspkr glue_helper processor button loop autofs4 ext4 crc16 mbcache jbd2 sd_mod sr_mod cdrom ata_generic virtio_scsi ata_piix libata virtio_pci virtio_ring crc32c_intel scsi_mod e1000 virtio floppy [last unloaded: btrfs]
    [39389.800012] irq event stamp: 0
    [39389.800012] hardirqs last  enabled at (0): [&lt;          (null)&gt;]           (null)
    [39389.800012] hardirqs last disabled at (0): [&lt;ffffffff8104e58d&gt;] copy_process+0x638/0x1a35
    [39389.800012] softirqs last  enabled at (0): [&lt;ffffffff8104e58d&gt;] copy_process+0x638/0x1a35
    [39389.800012] softirqs last disabled at (0): [&lt;          (null)&gt;]           (null)
    [39389.800012] CPU: 15 PID: 32166 Comm: fdm-stress Tainted: G             L  4.4.0-rc6-btrfs-next-18+ #1
    [39389.800012] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS by qemu-project.org 04/01/2014
    [39389.800012] task: ffff880179294380 ti: ffff880034a60000 task.ti: ffff880034a60000
    [39389.800012] RIP: 0010:[&lt;ffffffff81091e8d&gt;]  [&lt;ffffffff81091e8d&gt;] queued_write_lock_slowpath+0x62/0x72
    [39389.800012] RSP: 0018:ffff880034a639f0  EFLAGS: 00000206
    [39389.800012] RAX: 0000000000000101 RBX: ffff8801710c4e98 RCX: 0000000000000000
    [39389.800012] RDX: 00000000000000ff RSI: 0000000000000000 RDI: ffff8801710c4e9c
    [39389.800012] RBP: ffff880034a639f8 R08: 0000000000000001 R09: 0000000000000000
    [39389.800012] R10: ffff880034a639b0 R11: 0000000000001000 R12: ffff8801710c4e98
    [39389.800012] R13: 0000000000000001 R14: ffff880172cbc000 R15: ffff8801710c4e00
    [39389.800012] FS:  00007f6d377fe700(0000) GS:ffff8802be9e0000(0000) knlGS:0000000000000000
    [39389.800012] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [39389.800012] CR2: 00007f6d3d3c1000 CR3: 0000000037c93000 CR4: 00000000001406e0
    [39389.800012] Stack:
    [39389.800012]  ffff8801710c4e98 ffff880034a63a10 ffffffff81091963 ffff8801710c4e98
    [39389.800012]  ffff880034a63a30 ffffffff81486f1b ffffffffa0672cb3 ffff8801710c4e00
    [39389.800012]  ffff880034a63a78 ffffffffa0672cb3 ffff8801710c4e00 ffff880034a63a58
    [39389.800012] Call Trace:
    [39389.800012]  [&lt;ffffffff81091963&gt;] do_raw_write_lock+0x72/0x8c
    [39389.800012]  [&lt;ffffffff81486f1b&gt;] _raw_write_lock+0x3a/0x41
    [39389.800012]  [&lt;ffffffffa0672cb3&gt;] ? btrfs_tree_lock+0x119/0x251 [btrfs]
    [39389.800012]  [&lt;ffffffffa0672cb3&gt;] btrfs_tree_lock+0x119/0x251 [btrfs]
    [39389.800012]  [&lt;ffffffffa061aeba&gt;] ? rcu_read_unlock+0x5b/0x5d [btrfs]
    [39389.800012]  [&lt;ffffffffa061ce13&gt;] ? btrfs_root_node+0xda/0xe6 [btrfs]
    [39389.800012]  [&lt;ffffffffa061ce83&gt;] btrfs_lock_root_node+0x22/0x42 [btrfs]
    [39389.800012]  [&lt;ffffffffa062046b&gt;] btrfs_search_slot+0x1b8/0x758 [btrfs]
    [39389.800012]  [&lt;ffffffff810fc6b0&gt;] ? time_hardirqs_on+0x15/0x28
    [39389.800012]  [&lt;ffffffffa06365db&gt;] btrfs_lookup_inode+0x31/0x95 [btrfs]
    [39389.800012]  [&lt;ffffffff8108d62f&gt;] ? trace_hardirqs_on+0xd/0xf
    [39389.800012]  [&lt;ffffffff8148482b&gt;] ? mutex_lock_nested+0x397/0x3bc
    [39389.800012]  [&lt;ffffffffa068821b&gt;] __btrfs_update_delayed_inode+0x59/0x1c0 [btrfs]
    [39389.800012]  [&lt;ffffffffa068858e&gt;] __btrfs_commit_inode_delayed_items+0x194/0x5aa [btrfs]
    [39389.800012]  [&lt;ffffffff81486ab7&gt;] ? _raw_spin_unlock+0x31/0x44
    [39389.800012]  [&lt;ffffffffa0688a48&gt;] __btrfs_run_delayed_items+0xa4/0x15c [btrfs]
    [39389.800012]  [&lt;ffffffffa0688d62&gt;] btrfs_run_delayed_items+0x11/0x13 [btrfs]
    [39389.800012]  [&lt;ffffffffa064048e&gt;] btrfs_commit_transaction+0x234/0x96e [btrfs]
    [39389.800012]  [&lt;ffffffffa0618d10&gt;] btrfs_sync_fs+0x145/0x1ad [btrfs]
    [39389.800012]  [&lt;ffffffffa0671176&gt;] btrfs_ioctl+0x11d2/0x2793 [btrfs]
    [39389.800012]  [&lt;ffffffff8108a8b0&gt;] ? arch_local_irq_save+0x9/0xc
    [39389.800012]  [&lt;ffffffff81140261&gt;] ? __might_fault+0x4c/0xa7
    [39389.800012]  [&lt;ffffffff81140261&gt;] ? __might_fault+0x4c/0xa7
    [39389.800012]  [&lt;ffffffff8108a8b0&gt;] ? arch_local_irq_save+0x9/0xc
    [39389.800012]  [&lt;ffffffff8118b3d4&gt;] ? rcu_read_unlock+0x3e/0x5d
    [39389.800012]  [&lt;ffffffff811822f8&gt;] do_vfs_ioctl+0x42b/0x4ea
    [39389.800012]  [&lt;ffffffff8118b4f3&gt;] ? __fget_light+0x62/0x71
    [39389.800012]  [&lt;ffffffff8118240e&gt;] SyS_ioctl+0x57/0x79
    [39389.800012]  [&lt;ffffffff814872d7&gt;] entry_SYSCALL_64_fastpath+0x12/0x6f
    [39389.800012] Code: f0 0f b1 13 85 c0 75 ef eb 2a f3 90 8a 03 84 c0 75 f8 f0 0f b0 13 84 c0 75 f0 ba ff 00 00 00 eb 0a f0 0f b1 13 ff c8 74 0b f3 90 &lt;8b&gt; 03 83 f8 01 75 f7 eb ed c6 43 04 00 5b 5d c3 0f 1f 44 00 00

    This happens because in the code path executed by the inode_paths ioctl we
    end up nesting two calls to read lock a leaf's rwlock when after the first
    call to read_lock() and before the second call to read_lock(), another
    task (running the delayed items as part of a transaction commit) has
    already called write_lock() against the leaf's rwlock. This situation is
    illustrated by the following diagram:

             Task A                       Task B

      btrfs_ref_to_path()               btrfs_commit_transaction()
        read_lock(&amp;eb-&gt;lock);

                                          btrfs_run_delayed_items()
                                            __btrfs_commit_inode_delayed_items()
                                              __btrfs_update_delayed_inode()
                                                btrfs_lookup_inode()

                                                  write_lock(&amp;eb-&gt;lock);
                                                    --&gt; task waits for lock

        read_lock(&amp;eb-&gt;lock);
        --&gt; makes this task hang
            forever (and task B too
    	of course)

    So fix this by avoiding doing the nested read lock, which is easily
    avoidable. This issue does not happen if task B calls write_lock() after
    task A does the second call to read_lock(), however there does not seem
    to exist anything in the documentation that mentions what is the expected
    behaviour for recursive locking of rwlocks (leaving the idea that doing
    so is not a good usage of rwlocks).

    Also, as a side effect necessary for this fix, make sure we do not
    needlessly read lock extent buffers when the input path has skip_locking
    set (used when called from send).

    Signed-off-by: Filipe Manana &lt;fdmanana@suse.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 819f428a70930100319b7e30716e467c6a183737
Author: Insu Yun &lt;wuninsu@gmail.com&gt;
Date:   Fri Feb 12 01:15:59 2016 -0500

    ext4: fix potential integer overflow

    commit 46901760b46064964b41015d00c140c83aa05bcf upstream.

    Since sizeof(ext_new_group_data) &gt; sizeof(ext_new_flex_group_data),
    integer overflow could be happened.
    Therefore, need to fix integer overflow sanitization.

    Signed-off-by: Insu Yun &lt;wuninsu@gmail.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 ff19ac8fb71e8a2bf07d61b959062998139c1104
Author: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Date:   Fri Feb 19 17:36:21 2016 -0800

    AIO: properly check iovec sizes

    In Linus's tree, the iovec code has been reworked massively, but in
    older kernels the AIO layer should be checking this before passing the
    request on to other layers.

    Many thanks to Ben Hawkes of Google Project Zero for pointing out the
    issue.

    Reported-by: Ben Hawkes &lt;hawkes@google.com&gt;
    Acked-by: Benjamin LaHaise &lt;bcrl@kvack.org&gt;
    Tested-by: Willy Tarreau &lt;w@1wt.eu&gt;
    [backported to 3.10 - willy]
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 8355335f9bea09864ca2cba55abf25e4486c13f9
Author: Herton R. Krzesinski &lt;herton@redhat.com&gt;
Date:   Thu Jan 14 17:56:58 2016 -0200

    pty: make sure super_block is still valid in final /dev/tty close

    commit 1f55c718c290616889c04946864a13ef30f64929 upstream.

    Considering current pty code and multiple devpts instances, it's possible
    to umount a devpts file system while a program still has /dev/tty opened
    pointing to a previosuly closed pty pair in that instance. In the case all
    ptmx and pts/N files are closed, umount can be done. If the program closes
    /dev/tty after umount is done, devpts_kill_index will use now an invalid
    super_block, which was already destroyed in the umount operation after
    running -&gt;kill_sb. This is another "use after free" type of issue, but now
    related to the allocated super_block instance.

    To avoid the problem (warning at ida_remove and potential crashes) for
    this specific case, I added two functions in devpts which grabs additional
    references to the super_block, which pty code now uses so it makes sure
    the super block structure is still valid until pty shutdown is done.
    I also moved the additional inode references to the same functions, which
    also covered similar case with inode being freed before /dev/tty final
    close/shutdown.

    Signed-off-by: Herton R. Krzesinski &lt;herton@redhat.com&gt;
    Reviewed-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 042105bb8df0b22c4cd5867f15cfdd0048326f86
Author: Herton R. Krzesinski &lt;herton@redhat.com&gt;
Date:   Mon Jan 11 12:07:43 2016 -0200

    pty: fix possible use after free of tty-&gt;driver_data

    commit 2831c89f42dcde440cfdccb9fee9f42d54bbc1ef upstream.

    This change fixes a bug for a corner case where we have the the last
    release from a pty master/slave coming from a previously opened /dev/tty
    file. When this happens, the tty-&gt;driver_data can be stale, due to all
    ptmx or pts/N files having already been closed before (and thus the inode
    related to these files, which tty-&gt;driver_data points to, being already
    freed/destroyed).

    The fix here is to keep a reference on the opened master ptmx inode.
    We maintain the inode referenced until the final pty_unix98_shutdown,
    and only pass this inode to devpts_kill_index.

    Signed-off-by: Herton R. Krzesinski &lt;herton@redhat.com&gt;
    Reviewed-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit d2878b36ad382cb3184e37737b6d7f24162321f8
Author: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Date:   Sun Jan 10 22:40:58 2016 -0800

    staging/speakup: Use tty_ldisc_ref() for paste kworker

    commit f4f9edcf9b5289ed96113e79fa65a7bf27ecb096 upstream.

    As the function documentation for tty_ldisc_ref_wait() notes, it is
    only callable from a tty file_operations routine; otherwise there
    is no guarantee the ref won't be NULL.

    The key difference with the VT's paste_selection() is that is an ioctl,
    where __speakup_paste_selection() is completely async kworker, kicked
    off from interrupt context.

    Fixes: 28a821c30688 ("Staging: speakup: Update __speakup_paste_selection()
           tty (ab)usage to match vt")
    Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 2ea15d97629bda8f5616a46c01fe7057f046a743
Author: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Date:   Fri Nov 27 14:18:39 2015 -0500

    wan/x25: Fix use-after-free in x25_asy_open_tty()

    commit ee9159ddce14bc1dec9435ae4e3bd3153e783706 upstream.

    The N_X25 line discipline may access the previous line discipline's closed
    and already-freed 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]
        [  634.336761] ==================================================================
        [  634.338226] BUG: KASAN: use-after-free in x25_asy_open_tty+0x13d/0x490 at addr ffff8800a743efd0
        [  634.339558] Read of size 4 by task syzkaller_execu/8981
        [  634.340359] =============================================================================
        [  634.341598] BUG kmalloc-512 (Not tainted): kasan: bad access detected
        ...
        [  634.405018] Call Trace:
        [  634.405277] dump_stack (lib/dump_stack.c:52)
        [  634.405775] print_trailer (mm/slub.c:655)
        [  634.406361] object_err (mm/slub.c:662)
        [  634.406824] kasan_report_error (mm/kasan/report.c:138 mm/kasan/report.c:236)
        [  634.409581] __asan_report_load4_noabort (mm/kasan/report.c:279)
        [  634.411355] x25_asy_open_tty (drivers/net/wan/x25_asy.c:559 (discriminator 1))
        [  634.413997] tty_ldisc_open.isra.2 (drivers/tty/tty_ldisc.c:447)
        [  634.414549] tty_set_ldisc (drivers/tty/tty_ldisc.c:567)
        [  634.415057] tty_ioctl (drivers/tty/tty_io.c:2646 drivers/tty/tty_io.c:2879)
        [  634.423524] do_vfs_ioctl (fs/ioctl.c:43 fs/ioctl.c:607)
        [  634.427491] SyS_ioctl (fs/ioctl.c:622 fs/ioctl.c:613)
        [  634.427945] entry_SYSCALL_64_fastpath (arch/x86/entry/entry_64.S:188)

    Reported-and-tested-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
    Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.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 549584e9e1241756e244b35398a25e63de37f11c
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Tue Feb 16 14:15:59 2016 +0100

    ALSA: seq: Fix double port list deletion

    commit 13d5e5d4725c64ec06040d636832e78453f477b7 upstream.

    The commit [7f0973e973cd: ALSA: seq: Fix lockdep warnings due to
    double mutex locks] split the management of two linked lists (source
    and destination) into two individual calls for avoiding the AB/BA
    deadlock.  However, this may leave the possible double deletion of one
    of two lists when the counterpart is being deleted concurrently.
    It ends up with a list corruption, as revealed by syzkaller fuzzer.

    This patch fixes it by checking the list emptiness and skipping the
    deletion and the following process.

    BugLink: http://lkml.kernel.org/r/CACT4Y+bay9qsrz6dQu31EcGaH9XwfW7o3oBzSQUG9fMszoh=Sg@mail.gmail.com
    Fixes: 7f0973e973cd ('ALSA: seq: Fix lockdep warnings due to 'double mutex locks)
    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;
</content>
</entry>
<entry>
<title>Linux 3.10.97 (accumulative patch)</title>
<updated>2016-08-26T18:53:11+00:00</updated>
<author>
<name>Stefan Guendhoer</name>
<email>stefan@guendhoer.com</email>
</author>
<published>2016-02-20T13:26:56+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=f41aeea32505d2299c7782f4294bf477065e2875'/>
<id>urn:sha1:f41aeea32505d2299c7782f4294bf477065e2875</id>
<content type='text'>
commit 66b4554a10194a0fb4272f185b5fc6f2710741de
Author: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Date:   Fri Feb 19 14:22:57 2016 -0800

    Linux 3.10.97

commit d67d24e13204af21c1855460472bbe66491d8625
Author: Maciej W. Rozycki &lt;macro@imgtec.com&gt;
Date:   Mon Oct 26 15:48:19 2015 +0000

    binfmt_elf: Don't clobber passed executable's file header

    commit b582ef5c53040c5feef4c96a8f9585b6831e2441 upstream.

    Do not clobber the buffer space passed from `search_binary_handler' and
    originally preloaded by `prepare_binprm' with the executable's file
    header by overwriting it with its interpreter's file header.  Instead
    keep the buffer space intact and directly use the data structure locally
    allocated for the interpreter's file header, fixing a bug introduced in
    2.1.14 with loadable module support (linux-mips.org commit beb11695
    [Import of Linux/MIPS 2.1.14], predating kernel.org repo's history).
    Adjust the amount of data read from the interpreter's file accordingly.

    This was not an issue before loadable module support, because back then
    `load_elf_binary' was executed only once for a given ELF executable,
    whether the function succeeded or failed.

    With loadable module support supported and enabled, upon a failure of
    `load_elf_binary' -- which may for example be caused by architecture
    code rejecting an executable due to a missing hardware feature requested
    in the file header -- a module load is attempted and then the function
    reexecuted by `search_binary_handler'.  With the executable's file
    header replaced with its interpreter's file header the executable can
    then be erroneously accepted in this subsequent attempt.

    Signed-off-by: Maciej W. Rozycki &lt;macro@imgtec.com&gt;
    Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 669e0b00cba824568ebe800ee34c14254b917654
Author: Kinglong Mee &lt;kinglongmee@gmail.com&gt;
Date:   Wed Nov 4 15:20:15 2015 +0000

    FS-Cache: Increase reference of parent after registering, netfs success

    commit 86108c2e34a26e4bec3c6ddb23390bf8cedcf391 upstream.

    If netfs exist, fscache should not increase the reference of parent's
    usage and n_children, otherwise, never be decreased.

    v2: thanks David's suggest,
     move increasing reference of parent if success
     use kmem_cache_free() freeing primary_index directly

    v3: don't move "netfs-&gt;primary_index-&gt;parent = &amp;fscache_fsdef_index;"

    Signed-off-by: Kinglong Mee &lt;kinglongmee@gmail.com&gt;
    Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
    Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 471b81310d2198d0a9dfeddfffdac036b9c9cee7
Author: Mathias Krause &lt;minipli@googlemail.com&gt;
Date:   Mon Feb 1 14:27:30 2016 +0100

    crypto: user - lock crypto_alg_list on alg dump

    commit 63e41ebc6630f39422d87f8a4bade1e793f37a01 upstream.

    We miss to take the crypto_alg_sem semaphore when traversing the
    crypto_alg_list for CRYPTO_MSG_GETALG dumps. This allows a race with
    crypto_unregister_alg() removing algorithms from the list while we're
    still traversing it, thereby leading to a use-after-free as show below:

    [ 3482.071639] general protection fault: 0000 [#1] SMP
    [ 3482.075639] Modules linked in: aes_x86_64 glue_helper lrw ablk_helper cryptd gf128mul ipv6 pcspkr serio_raw virtio_net microcode virtio_pci virtio_ring virtio sr_mod cdrom [last unloaded: aesni_intel]
    [ 3482.075639] CPU: 1 PID: 11065 Comm: crconf Not tainted 4.3.4-grsec+ #126
    [ 3482.075639] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014
    [ 3482.075639] task: ffff88001cd41a40 ti: ffff88001cd422c8 task.ti: ffff88001cd422c8
    [ 3482.075639] RIP: 0010:[&lt;ffffffff93722bd3&gt;]  [&lt;ffffffff93722bd3&gt;] strncpy+0x13/0x30
    [ 3482.075639] RSP: 0018:ffff88001f713b60  EFLAGS: 00010202
    [ 3482.075639] RAX: ffff88001f6c4430 RBX: ffff88001f6c43a0 RCX: ffff88001f6c4430
    [ 3482.075639] RDX: 0000000000000040 RSI: fefefefefefeff16 RDI: ffff88001f6c4430
    [ 3482.075639] RBP: ffff88001f713b60 R08: ffff88001f6c4470 R09: ffff88001f6c4480
    [ 3482.075639] R10: 0000000000000002 R11: 0000000000000246 R12: ffff88001ce2aa28
    [ 3482.075639] R13: ffff880000093700 R14: ffff88001f5e4bf8 R15: 0000000000003b20
    [ 3482.075639] FS:  0000033826fa2700(0000) GS:ffff88001e900000(0000) knlGS:0000000000000000
    [ 3482.075639] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [ 3482.075639] CR2: ffffffffff600400 CR3: 00000000139ec000 CR4: 00000000001606f0
    [ 3482.075639] Stack:
    [ 3482.075639]  ffff88001f713bd8 ffffffff936ccd00 ffff88001e5c4200 ffff880000093700
    [ 3482.075639]  ffff88001f713bd0 ffffffff938ef4bf 0000000000000000 0000000000003b20
    [ 3482.075639]  ffff88001f5e4bf8 ffff88001f5e4848 0000000000000000 0000000000003b20
    [ 3482.075639] Call Trace:
    [ 3482.075639]  [&lt;ffffffff936ccd00&gt;] crypto_report_alg+0xc0/0x3e0
    [ 3482.075639]  [&lt;ffffffff938ef4bf&gt;] ? __alloc_skb+0x16f/0x300
    [ 3482.075639]  [&lt;ffffffff936cd08a&gt;] crypto_dump_report+0x6a/0x90
    [ 3482.075639]  [&lt;ffffffff93935707&gt;] netlink_dump+0x147/0x2e0
    [ 3482.075639]  [&lt;ffffffff93935f99&gt;] __netlink_dump_start+0x159/0x190
    [ 3482.075639]  [&lt;ffffffff936ccb13&gt;] crypto_user_rcv_msg+0xc3/0x130
    [ 3482.075639]  [&lt;ffffffff936cd020&gt;] ? crypto_report_alg+0x3e0/0x3e0
    [ 3482.075639]  [&lt;ffffffff936cc4b0&gt;] ? alg_test_crc32c+0x120/0x120
    [ 3482.075639]  [&lt;ffffffff93933145&gt;] ? __netlink_lookup+0xd5/0x120
    [ 3482.075639]  [&lt;ffffffff936cca50&gt;] ? crypto_add_alg+0x1d0/0x1d0
    [ 3482.075639]  [&lt;ffffffff93938141&gt;] netlink_rcv_skb+0xe1/0x130
    [ 3482.075639]  [&lt;ffffffff936cc4f8&gt;] crypto_netlink_rcv+0x28/0x40
    [ 3482.075639]  [&lt;ffffffff939375a8&gt;] netlink_unicast+0x108/0x180
    [ 3482.075639]  [&lt;ffffffff93937c21&gt;] netlink_sendmsg+0x541/0x770
    [ 3482.075639]  [&lt;ffffffff938e31e1&gt;] sock_sendmsg+0x21/0x40
    [ 3482.075639]  [&lt;ffffffff938e4763&gt;] SyS_sendto+0xf3/0x130
    [ 3482.075639]  [&lt;ffffffff93444203&gt;] ? bad_area_nosemaphore+0x13/0x20
    [ 3482.075639]  [&lt;ffffffff93444470&gt;] ? __do_page_fault+0x80/0x3a0
    [ 3482.075639]  [&lt;ffffffff939d80cb&gt;] entry_SYSCALL_64_fastpath+0x12/0x6e
    [ 3482.075639] Code: 88 4a ff 75 ed 5d 48 0f ba 2c 24 3f c3 66 66 2e 0f 1f 84 00 00 00 00 00 55 48 85 d2 48 89 f8 48 89 f9 4c 8d 04 17 48 89 e5 74 15 &lt;0f&gt; b6 16 80 fa 01 88 11 48 83 de ff 48 83 c1 01 4c 39 c1 75 eb
    [ 3482.075639] RIP  [&lt;ffffffff93722bd3&gt;] strncpy+0x13/0x30

    To trigger the race run the following loops simultaneously for a while:
      $ while : ; do modprobe aesni-intel; rmmod aesni-intel; done
      $ while : ; do crconf show all &gt; /dev/null; done

    Fix the race by taking the crypto_alg_sem read lock, thereby preventing
    crypto_unregister_alg() from modifying the algorithm list during the
    dump.

    This bug has been detected by the PaX memory sanitize feature.

    Signed-off-by: Mathias Krause &lt;minipli@googlemail.com&gt;
    Cc: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
    Cc: PaX Team &lt;pageexec@freemail.hu&gt;
    Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 9250afa47650e39ee56511b86450dd11b3217c3a
Author: Wang, Rui Y &lt;rui.y.wang@intel.com&gt;
Date:   Wed Jan 27 17:08:37 2016 +0800

    crypto: algif_hash - wait for crypto_ahash_init() to complete

    commit fe09786178f9df713a4b2dd6b93c0a722346bf5e upstream.

    hash_sendmsg/sendpage() need to wait for the completion
    of crypto_ahash_init() otherwise it can cause panic.

    Signed-off-by: Rui Wang &lt;rui.y.wang@intel.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;

commit 71eec872a94409c9a595b2a02a5d9eb8c9d335c5
Author: Alexandra Yates &lt;alexandra.yates@linux.intel.com&gt;
Date:   Fri Feb 5 15:27:49 2016 -0800

    ahci: Intel DNV device IDs SATA

    commit 342decff2b846b46fa61eb5ee40986fab79a9a32 upstream.

    Adding Intel codename DNV platform device IDs for SATA.

    Signed-off-by: Alexandra Yates &lt;alexandra.yates@linux.intel.com&gt;
    Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit f6c2bfd8a8829cc0cddefe6f952b7436b875cd18
Author: Tejun Heo &lt;tj@kernel.org&gt;
Date:   Fri Jan 15 15:13:05 2016 -0500

    libata: disable forced PORTS_IMPL for &gt;= AHCI 1.3

    commit 566d1827df2ef0cbe921d3d6946ac3007b1a6938 upstream.

    Some early controllers incorrectly reported zero ports in PORTS_IMPL
    register and the ahci driver fabricates PORTS_IMPL from the number of
    ports in those cases.  This hasn't mattered but with the new nvme
    controllers there are cases where zero PORTS_IMPL is valid and should
    be honored.

    Disable the workaround for &gt;= AHCI 1.3.

    Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
    Reported-by: Andy Lutomirski &lt;luto@amacapital.net&gt;
    Link: http://lkml.kernel.org/g/CALCETrU7yMvXEDhjAUShoHEhDwifJGapdw--BKxsP0jmjKGmRw@mail.gmail.com
    Cc: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit d2b76ee2681e369a0ab38fdd7df9ea3ea94c2bd2
Author: Xiangliang Yu &lt;Xiangliang.Yu@amd.com&gt;
Date:   Thu Nov 26 20:27:02 2015 +0800

    AHCI: Fix softreset failed issue of Port Multiplier

    commit 023113d24ef9e1d2b44cb2446872b17e2b01d8b1 upstream.

    Current code doesn't update port value of Port Multiplier(PM) when
    sending FIS of softreset to device, command will fail if FBS is
    enabled.

    There are two ways to fix the issue: the first is to disable FBS
    before sending softreset command to PM device and the second is
    to update port value of PM when sending command.

    For the first way, i can't find any related rule in AHCI Spec. The
    second way can avoid disabling FBS and has better performance.

    Signed-off-by: Xiangliang Yu &lt;Xiangliang.Yu@amd.com&gt;
    Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit f77597b2ef65757d6e24daf96eb58446dfb83491
Author: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Date:   Wed Dec 30 20:24:17 2015 +0800

    crypto: af_alg - Fix socket double-free when accept fails

    commit a383292c86663bbc31ac62cc0c04fc77504636a6 upstream.

    When we fail an accept(2) call we will end up freeing the socket
    twice, once due to the direct sk_free call and once again through
    newsock.

    This patch fixes this by removing the sk_free call.

    Reported-by: Dmitry Vyukov &lt;dvyukov@google.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;

commit 5a707f0972e1c9d8a4a921ddae79d0f9dc36a341
Author: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Date:   Wed Dec 30 11:47:53 2015 +0800

    crypto: af_alg - Disallow bind/setkey/... after accept(2)

    commit c840ac6af3f8713a71b4d2363419145760bd6044 upstream.

    Each af_alg parent socket obtained by socket(2) corresponds to a
    tfm object once bind(2) has succeeded.  An accept(2) call on that
    parent socket creates a context which then uses the tfm object.

    Therefore as long as any child sockets created by accept(2) exist
    the parent socket must not be modified or freed.

    This patch guarantees this by using locks and a reference count
    on the parent socket.  Any attempt to modify the parent socket will
    fail with EBUSY.

    Reported-by: Dmitry Vyukov &lt;dvyukov@google.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;

commit 766ac2a01cbbb7762f88127c32bcd9697c97f060
Author: David Turner &lt;novalis@novalis.org&gt;
Date:   Tue Nov 24 14:34:37 2015 -0500

    ext4: Fix handling of extended tv_sec

    commit a4dad1ae24f850410c4e60f22823cba1289b8d52 upstream.

    In ext4, the bottom two bits of {a,c,m}time_extra are used to extend
    the {a,c,m}time fields, deferring the year 2038 problem to the year
    2446.

    When decoding these extended fields, for times whose bottom 32 bits
    would represent a negative number, sign extension causes the 64-bit
    extended timestamp to be negative as well, which is not what's
    intended.  This patch corrects that issue, so that the only negative
    {a,c,m}times are those between 1901 and 1970 (as per 32-bit signed
    timestamps).

    Some older kernels might have written pre-1970 dates with 1,1 in the
    extra bits.  This patch treats those incorrectly-encoded dates as
    pre-1970, instead of post-2311, until kernel 4.20 is released.
    Hopefully by then e2fsck will have fixed up the bad data.

    Also add a comment explaining the encoding of ext4's extra {a,c,m}time
    bits.

    Signed-off-by: David Turner &lt;novalis@novalis.org&gt;
    Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
    Reported-by: Mark Harris &lt;mh8928@yahoo.com&gt;
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=23732
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 6f2db87b6c797290116ef2783815b37b76394430
Author: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Date:   Sun Jan 10 22:40:55 2016 -0800

    tty: Fix unsafe ldisc reference via ioctl(TIOCGETD)

    commit 5c17c861a357e9458001f021a7afa7aab9937439 upstream.

    ioctl(TIOCGETD) retrieves the line discipline id directly from the
    ldisc because the line discipline id (c_line) in termios is untrustworthy;
    userspace may have set termios via ioctl(TCSETS*) without actually
    changing the line discipline via ioctl(TIOCSETD).

    However, directly accessing the current ldisc via tty-&gt;ldisc is
    unsafe; the ldisc ptr dereferenced may be stale if the line discipline
    is changing via ioctl(TIOCSETD) or hangup.

    Wait for the line discipline reference (just like read() or write())
    to retrieve the "current" line discipline id.

    Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 4478e2240dfbbd5491d5aaf9c92e5fb603f1bfdd
Author: John Ernberg &lt;john.ernberg@actia.se&gt;
Date:   Mon Jan 25 12:27:17 2016 +0000

    USB: option: fix Cinterion AHxx enumeration

    commit 4152b387da81617c80cb2946b2d56e3958906b3e upstream.

    In certain kernel configurations where the cdc_ether and option drivers
    are compiled as modules there can occur a race condition in enumeration.
    This causes the option driver to enumerate the ethernet(wwan) interface
    as usb-serial interfaces.

    usb-devices output for the modem:
    T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  5 Spd=480 MxCh= 0
    D:  Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs=  1
    P:  Vendor=1e2d ProdID=0055 Rev=00.00
    S:  Manufacturer=Cinterion
    S:  Product=AHx
    C:  #Ifs= 6 Cfg#= 1 Atr=e0 MxPwr=10mA
    I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    I:  If#= 4 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether
    I:  If#= 5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether

    Signed-off-by: John Ernberg &lt;john.ernberg@actia.se&gt;
    Fixes: 1941138e1c02 ("USB: added support for Cinterion's products...")
    Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 3bee9e6e206d990619cdb3a62df7cef89eb919b4
Author: Daniele Palmas &lt;dnlplm@gmail.com&gt;
Date:   Tue Jan 12 17:22:06 2016 +0100

    USB: serial: option: Adding support for Telit LE922

    commit ff4e2494dc17b173468e1713fdf6237fd8578bc7 upstream.

    This patch adds support for two PIDs of LE922.

    Signed-off-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 e193199af5199c771e1d38e03349d94969759d3b
Author: Peter Dedecker &lt;peter.dedecker@hotmail.com&gt;
Date:   Fri Jan 8 12:34:41 2016 +0100

    USB: cp210x: add ID for IAI USB to RS485 adaptor

    commit f487c54ddd544e1c9172cd510954f697b77b76e3 upstream.

    Added the USB serial console device ID for IAI Corp. RCB-CV-USB
    USB to RS485 adaptor.

    Signed-off-by: Peter Dedecker &lt;peter.dedecker@hotmail.com&gt;
    Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 03b987cbcf2d1b012e95f9530a2652237a721326
Author: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Date:   Tue Jan 19 23:43:13 2016 -0800

    USB: serial: ftdi_sio: add support for Yaesu SCU-18 cable

    commit e03cdf22a2727c60307be6a729233edab3bfda9c upstream.

    Harald Linden reports that the ftdi_sio driver works properly for the
    Yaesu SCU-18 cable if the device ids are added to the driver.  So let's
    add them.

    Reported-by: Harald Linden &lt;harald.linden@7183.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit f1a9ca0d6949ec920c7e34a1eb48dbf55e84f8ed
Author: Johan Hovold &lt;johan@kernel.org&gt;
Date:   Tue Jan 12 12:05:20 2016 +0100

    USB: visor: fix null-deref at probe

    commit cac9b50b0d75a1d50d6c056ff65c005f3224c8e0 upstream.

    Fix null-pointer dereference at probe should a (malicious) Treo device
    lack the expected endpoints.

    Specifically, the Treo port-setup hack was dereferencing the bulk-in and
    interrupt-in urbs without first making sure they had been allocated by
    core.

    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 3b079e37731a962211c65e9aff9928f3ac2e6840
Author: Vladis Dronov &lt;vdronov@redhat.com&gt;
Date:   Tue Jan 12 15:10:50 2016 +0100

    USB: serial: visor: fix crash on detecting device without write_urbs

    commit cb3232138e37129e88240a98a1d2aba2187ff57c upstream.

    The visor driver crashes in clie_5_attach() when a specially crafted USB
    device without bulk-out endpoint is detected. This fix adds a check 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;
    Fixes: cfb8da8f69b8 ("USB: visor: fix initialisation of UX50/TH55 devices")
    Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 24e1fdb327b97cde4ff92e7ceca86f9882a723e6
Author: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Date:   Wed Dec 23 13:25:54 2015 +0000

    USB: ti_usb_3410_502: Fix ID table size

    Commit 35a2fbc941ac ("USB: serial: ti_usb_3410_5052: new device id for
    Abbot strip port cable") failed to update the size of the
    ti_id_table_3410 array.  This doesn't need to be fixed upstream
    following commit d7ece6515e12 ("USB: ti_usb_3410_5052: remove
    vendor/product module parameters") but should be fixed in stable
    branches older than 3.12.

    Backports of commit c9d09dc7ad10 ("USB: serial: ti_usb_3410_5052: add
    Abbott strip port ID to combined table as well.") similarly failed to
    update the size of the ti_id_table_combined array.

    Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit d5ce15e88eecfb9657fade8c8cfe4d02d96252ac
Author: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
Date:   Thu Feb 4 15:59:43 2016 -0200

    saa7134-alsa: Only frees registered sound cards

    commit ac75fe5d8fe4a0bf063be18fb29684405279e79e upstream.

    That prevents this bug:
    [ 2382.269496] BUG: unable to handle kernel NULL pointer dereference at 0000000000000540
    [ 2382.270013] IP: [&lt;ffffffffa01fe616&gt;] snd_card_free+0x36/0x70 [snd]
    [ 2382.270013] PGD 0
    [ 2382.270013] Oops: 0002 [#1] SMP
    [ 2382.270013] Modules linked in: saa7134_alsa(-) tda1004x saa7134_dvb videobuf2_dvb dvb_core tda827x tda8290 tuner saa7134 tveeprom videobuf2_dma_sg videobuf2_memops videobuf2_v4l2 videobuf2_core v4l2_common videodev media auth_rpcgss nfsv4 dns_resolver nfs lockd grace sunrpc tun bridge stp llc ebtables ip6table_filter ip6_tables nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack it87 hwmon_vid snd_hda_codec_idt snd_hda_codec_generic iTCO_wdt iTCO_vendor_support snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core snd_seq pcspkr i2c_i801 snd_seq_device snd_pcm snd_timer lpc_ich snd mfd_core soundcore binfmt_misc i915 video i2c_algo_bit drm_kms_helper drm r8169 ata_generic serio_raw pata_acpi mii i2c_core [last unloaded: videobuf2_memops]
    [ 2382.270013] CPU: 0 PID: 4899 Comm: rmmod Not tainted 4.5.0-rc1+ #4
    [ 2382.270013] Hardware name: PCCHIPS P17G/P17G, BIOS 080012  05/14/2008
    [ 2382.270013] task: ffff880039c38000 ti: ffff88003c764000 task.ti: ffff88003c764000
    [ 2382.270013] RIP: 0010:[&lt;ffffffffa01fe616&gt;]  [&lt;ffffffffa01fe616&gt;] snd_card_free+0x36/0x70 [snd]
    [ 2382.270013] RSP: 0018:ffff88003c767ea0  EFLAGS: 00010286
    [ 2382.270013] RAX: ffff88003c767eb8 RBX: 0000000000000000 RCX: 0000000000006260
    [ 2382.270013] RDX: ffffffffa020a060 RSI: ffffffffa0206de1 RDI: ffff88003c767eb0
    [ 2382.270013] RBP: ffff88003c767ed8 R08: 0000000000019960 R09: ffffffff811a5412
    [ 2382.270013] R10: ffffea0000d7c200 R11: 0000000000000000 R12: ffff88003c767ea8
    [ 2382.270013] R13: 00007ffe760617f7 R14: 0000000000000000 R15: 0000557625d7f1e0
    [ 2382.270013] FS:  00007f80bb1c0700(0000) GS:ffff88003f400000(0000) knlGS:0000000000000000
    [ 2382.270013] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    [ 2382.270013] CR2: 0000000000000540 CR3: 000000003c00f000 CR4: 00000000000006f0
    [ 2382.270013] Stack:
    [ 2382.270013]  000000003c767ed8 ffffffff00000000 ffff880000000000 ffff88003c767eb8
    [ 2382.270013]  ffff88003c767eb8 ffffffffa049a890 00007ffe76060060 ffff88003c767ef0
    [ 2382.270013]  ffffffffa049889d ffffffffa049a500 ffff88003c767f48 ffffffff8111079c
    [ 2382.270013] Call Trace:
    [ 2382.270013]  [&lt;ffffffffa049889d&gt;] saa7134_alsa_exit+0x1d/0x780 [saa7134_alsa]
    [ 2382.270013]  [&lt;ffffffff8111079c&gt;] SyS_delete_module+0x19c/0x1f0
    [ 2382.270013]  [&lt;ffffffff8170fc2e&gt;] entry_SYSCALL_64_fastpath+0x12/0x71
    [ 2382.270013] Code: 20 a0 48 c7 c6 e1 6d 20 a0 48 89 e5 41 54 53 4c 8d 65 d0 48 89 fb 48 83 ec 28 c7 45 d0 00 00 00 00 49 8d 7c 24 08 e8 7a 55 ed e0 &lt;4c&gt; 89 a3 40 05 00 00 48 89 df e8 eb fd ff ff 85 c0 75 1a 48 8d
    [ 2382.270013] RIP  [&lt;ffffffffa01fe616&gt;] snd_card_free+0x36/0x70 [snd]
    [ 2382.270013]  RSP &lt;ffff88003c767ea0&gt;
    [ 2382.270013] CR2: 0000000000000540

    Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 49911dcd7655be44947a0a5f7343bf3dc5d0b3ce
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Tue Feb 9 12:02:32 2016 +0100

    ALSA: timer: Fix race between stop and interrupt

    commit ed8b1d6d2c741ab26d60d499d7fbb7ac801f0f51 upstream.

    A slave timer element also unlinks at snd_timer_stop() but it takes
    only slave_active_lock.  When a slave is assigned to a master,
    however, this may become a race against the master's interrupt
    handling, eventually resulting in a list corruption.  The actual bug
    could be seen with a syzkaller fuzzer test case in BugLink below.

    As a fix, we need to take timeri-&gt;timer-&gt;lock when timer isn't NULL,
    i.e. assigned to a master, while the assignment to a master itself is
    protected by slave_active_lock.

    BugLink: http://lkml.kernel.org/r/CACT4Y+Y_Bm+7epAb=8Wi=AaWd+DYS7qawX52qxdCfOfY49vozQ@mail.gmail.com
    Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit e063b1a0b8df95a648dde437f57b2a306caced2e
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Tue Feb 2 15:27:36 2016 +0100

    ALSA: dummy: Implement timer backend switching more safely

    commit ddce57a6f0a2d8d1bfacfa77f06043bc760403c2 upstream.

    Currently the selected timer backend is referred at any moment from
    the running PCM callbacks.  When the backend is switched, it's
    possible to lead to inconsistency from the running backend.  This was
    pointed by syzkaller fuzzer, and the commit [7ee96216c31a: ALSA:
    dummy: Disable switching timer backend via sysfs] disabled the dynamic
    switching for avoiding the crash.

    This patch improves the handling of timer backend switching.  It keeps
    the reference to the selected backend during the whole operation of an
    opened stream so that it won't be changed by other streams.

    Together with this change, the hrtimer parameter is reenabled as
    writable now.

    NOTE: this patch also turned out to fix the still remaining race.
    Namely, ops was still replaced dynamically at dummy_pcm_open:

      static int dummy_pcm_open(struct snd_pcm_substream *substream)
      {
      ....
              dummy-&gt;timer_ops = &amp;dummy_systimer_ops;
              if (hrtimer)
                      dummy-&gt;timer_ops = &amp;dummy_hrtimer_ops;

    Since dummy-&gt;timer_ops is common among all streams, and when the
    replacement happens during accesses of other streams, it may lead to a
    crash.  This was actually triggered by syzkaller fuzzer and KASAN.

    This patch rewrites the code not to use the ops shared by all streams
    any longer, too.

    BugLink: http://lkml.kernel.org/r/CACT4Y+aZ+xisrpuM6cOXbL21DuM0yVxPYXf4cD4Md9uw0C3dBQ@mail.gmail.com
    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 c5929da4dd38c95d7c9b738c9d3ef597c60331de
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Sun Feb 7 09:38:26 2016 +0100

    ALSA: hda - Fix speaker output from VAIO AiO machines

    commit c44d9b1181cf34e0860c72cc8a00e0c47417aac0 upstream.

    Some Sony VAIO AiO models (VGC-JS4EF and VGC-JS25G, both with PCI SSID
    104d:9044) need the same quirk to make the speaker working properly.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=112031
    Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 538d254bc87055e696aa15939c2c9f4f84e92315
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Mon Feb 8 17:36:25 2016 +0100

    ALSA: timer: Fix wrong instance passed to slave callbacks

    commit 117159f0b9d392fb433a7871426fad50317f06f7 upstream.

    In snd_timer_notify1(), the wrong timer instance was passed for slave
    ccallback function.  This leads to the access to the wrong data when
    an incompatible master is handled (e.g. the master is the sequencer
    timer and the slave is a user timer), as spotted by syzkaller fuzzer.

    This patch fixes that wrong assignment.

    BugLink: http://lkml.kernel.org/r/CACT4Y+Y_Bm+7epAb=8Wi=AaWd+DYS7qawX52qxdCfOfY49vozQ@mail.gmail.com
    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 8a778712b23eb46da3b41bd4d8b6ff2f4084681b
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Sat Jan 30 23:09:08 2016 +0100

    ALSA: timer: Fix link corruption due to double start or stop

    commit f784beb75ce82f4136f8a0960d3ee872f7109e09 upstream.

    Although ALSA timer code got hardening for races, it still causes
    use-after-free error.  This is however rather a corrupted linked list,
    not actually the concurrent accesses.  Namely, when timer start is
    triggered twice, list_add_tail() is called twice, too.  This ends
    up with the link corruption and triggers KASAN error.

    The simplest fix would be replacing list_add_tail() with
    list_move_tail(), but fundamentally it's the problem that we don't
    check the double start/stop correctly.  So, the right fix here is to
    add the proper checks to snd_timer_start() and snd_timer_stop() (and
    their variants).

    BugLink: http://lkml.kernel.org/r/CACT4Y+ZyPRoMQjmawbvmCEDrkBD2BQuH7R09=eOkf5ESK8kJAw@mail.gmail.com
    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 732bc470a1017cd272b4f200d63691a09b287533
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Thu Feb 4 17:06:13 2016 +0100

    ALSA: timer: Fix leftover link at closing

    commit 094fd3be87b0f102589e2d5c3fa5d06b7e20496d upstream.

    In ALSA timer core, the active timer instance is managed in
    active_list linked list.  Each element is added / removed dynamically
    at timer start, stop and in timer interrupt.  The problem is that
    snd_timer_interrupt() has a thinko and leaves the element in
    active_list when it's the last opened element.  This eventually leads
    to list corruption or use-after-free error.

    This hasn't been revealed because we used to delete the list forcibly
    in snd_timer_stop() in the past.  However, the recent fix avoids the
    double-stop behavior (in commit [f784beb75ce8: ALSA: timer: Fix link
    corruption due to double start or stop]), and this leak hits reality.

    This patch fixes the link management in snd_timer_interrupt().  Now it
    simply unlinks no matter which stream is.

    BugLink: http://lkml.kernel.org/r/CACT4Y+Yy2aukHP-EDp8-ziNqNNmb-NTf=jDWXMP7jB8HDa2vng@mail.gmail.com
    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 51e9bd72a09bfe3707262917b9562f36ba8d6f07
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Thu Jan 14 17:01:46 2016 +0100

    ALSA: timer: Code cleanup

    commit c3b1681375dc6e71d89a3ae00cc3ce9e775a8917 upstream.

    This is a minor code cleanup without any functional changes:
    - Kill keep_flag argument from _snd_timer_stop(), as all callers pass
      only it false.
    - Remove redundant NULL check in _snd_timer_stop().

    Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit e53ec492395424bc75b90d8ef650cb960ef28a79
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Wed Feb 3 08:32:44 2016 +0100

    ALSA: seq: Fix lockdep warnings due to double mutex locks

    commit 7f0973e973cd74aa40747c9d38844560cd184ee8 upstream.

    The port subscription code uses double mutex locks for source and
    destination ports, and this may become racy once when wrongly set up.
    It leads to lockdep warning splat, typically triggered by fuzzer like
    syzkaller, although the actual deadlock hasn't been seen, so far.

    This patch simplifies the handling by reducing to two single locks, so
    that no lockdep warning will be trigger any longer.

    By splitting to two actions, a still-in-progress element shall be
    added in one list while handling another.  For ignoring this element,
    a new check is added in deliver_to_subscribers().

    Along with it, the code to add/remove the subscribers list element was
    cleaned up and refactored.

    BugLink: http://lkml.kernel.org/r/CACT4Y+aKQXV7xkBW9hpQbzaDO7LrUvohxWh-UwMxXjDy-yBD=A@mail.gmail.com
    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 14bdca3fa46eb56d2f042ce9f0a8b42f800a9a12
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Mon Feb 1 12:06:42 2016 +0100

    ALSA: seq: Fix race at closing in virmidi driver

    commit 2d1b5c08366acd46c35a2e9aba5d650cb5bf5c19 upstream.

    The virmidi driver has an open race at closing its assigned rawmidi
    device, and this may lead to use-after-free in
    snd_seq_deliver_single_event().

    Plug the hole by properly protecting the linked list deletion and
    calling in the right order in snd_virmidi_input_close().

    BugLink: http://lkml.kernel.org/r/CACT4Y+Zd66+w12fNN85-425cVQT=K23kWbhnCEcMB8s3us-Frw@mail.gmail.com
    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 4df6314c220c4943f82fdcb882b48561f5ffebbc
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Sat Jan 30 23:30:25 2016 +0100

    ALSA: seq: Fix yet another races among ALSA timer accesses

    commit 2cdc7b636d55cbcf42e1e6c8accd85e62d3e9ae8 upstream.

    ALSA sequencer may open/close and control ALSA timer instance
    dynamically either via sequencer events or direct ioctls.  These are
    done mostly asynchronously, and it may call still some timer action
    like snd_timer_start() while another is calling snd_timer_close().
    Since the instance gets removed by snd_timer_close(), it may lead to
    a use-after-free.

    This patch tries to address such a race by protecting each
    snd_timer_*() call via the existing spinlock and also by avoiding the
    access to timer during close call.

    BugLink: http://lkml.kernel.org/r/CACT4Y+Z6RzW5MBr-HUdV-8zwg71WQfKTdPpYGvOeS7v4cyurNQ@mail.gmail.com
    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 f042b75af1097cf81265f4db67a1ba38c7ec7207
Author: Vinod Koul &lt;vinod.koul@intel.com&gt;
Date:   Mon Feb 1 22:26:40 2016 +0530

    ASoC: dpcm: fix the BE state on hw_free

    commit 5e82d2be6ee53275c72e964507518d7964c82753 upstream.

    While performing hw_free, DPCM checks the BE state but leaves out
    the suspend state. The suspend state needs to be checked as well,
    as we might be suspended and then usermode closes rather than
    resuming the audio stream.

    This was found by a stress testing of system with playback in
    loop and killed after few seconds running in background and second
    script running suspend-resume test in loop

    Signed-off-by: Vinod Koul &lt;vinod.koul@intel.com&gt;
    Acked-by: Liam Girdwood &lt;liam.r.girdwood@linux.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 aae80d6591f9d7c8e7aa48bad5b365c05ee9c2fd
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Sun Jan 31 10:32:37 2016 +0100

    ALSA: pcm: Fix potential deadlock in OSS emulation

    commit b248371628aad599a48540962f6b85a21a8a0c3f upstream.

    There are potential deadlocks in PCM OSS emulation code while
    accessing read/write and mmap concurrently.  This comes from the
    infamous mmap_sem usage in copy_from/to_user().  Namely,

       snd_pcm_oss_write() -&gt;
         &amp;runtime-&gt;oss.params_lock -&gt;
            copy_to_user() -&gt;
              &amp;mm-&gt;mmap_sem
      mmap() -&gt;
        &amp;mm-&gt;mmap_sem -&gt;
          snd_pcm_oss_mmap() -&gt;
            &amp;runtime-&gt;oss.params_lock

    Since we can't avoid taking params_lock from mmap code path, use
    trylock variant and aborts with -EAGAIN as a workaround of this AB/BA
    deadlock.

    BugLink: http://lkml.kernel.org/r/CACT4Y+bVrBKDG0G2_AcUgUQa+X91VKTeS4v+wN7BSHwHtqn3kQ@mail.gmail.com
    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 264df9ec4e1f538b08167eae04ccfeb79678d111
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Wed Feb 3 14:41:22 2016 +0100

    ALSA: rawmidi: Fix race at copying &amp; updating the position

    commit 81f577542af15640cbcb6ef68baa4caa610cbbfc upstream.

    The rawmidi read and write functions manage runtime stream status
    such as runtime-&gt;appl_ptr and runtime-&gt;avail.  These point where to
    copy the new data and how many bytes have been copied (or to be
    read).  The problem is that rawmidi read/write call copy_from_user()
    or copy_to_user(), and the runtime spinlock is temporarily unlocked
    and relocked while copying user-space.  Since the current code
    advances and updates the runtime status after the spin unlock/relock,
    the copy and the update may be asynchronous, and eventually
    runtime-&gt;avail might go to a negative value when many concurrent
    accesses are done.  This may lead to memory corruption in the end.

    For fixing this race, in this patch, the status update code is
    performed in the same lock before the temporary unlock.  Also, the
    spinlock is now taken more widely in snd_rawmidi_kernel_read1() for
    protecting more properly during the whole operation.

    BugLink: http://lkml.kernel.org/r/CACT4Y+b-dCmNf1GpgPKfDO0ih+uZCL2JV4__j-r1kdhPLSgQCQ@mail.gmail.com
    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 f6cbda794bd0faf328e06425922666b371307a33
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Mon Feb 1 12:04:55 2016 +0100

    ALSA: rawmidi: Remove kernel WARNING for NULL user-space buffer check

    commit cc85f7a634cfaf9f0713c6aa06d08817424db37a upstream.

    NULL user-space buffer can be passed even in a normal path, thus it's
    not good to spew a kernel warning with stack trace at each time.
    Just drop snd_BUG_ON() macro usage there.

    BugLink: http://lkml.kernel.org/r/CACT4Y+YfVJ3L+q0i-4vyQVyyPD7V=OMX0PWPi29x9Bo3QaBLdw@mail.gmail.com
    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 a04cbfbf93a719d9851a0a27972191e472191ed8
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Mon Jan 25 11:01:47 2016 +0100

    ALSA: seq: Fix incorrect sanity check at snd_seq_oss_synth_cleanup()

    commit 599151336638d57b98d92338aa59c048e3a3e97d upstream.

    ALSA sequencer OSS emulation code has a sanity check for currently
    opened devices, but there is a thinko there, eventually it spews
    warnings and skips the operation wrongly like:
      WARNING: CPU: 1 PID: 7573 at sound/core/seq/oss/seq_oss_synth.c:311

    Fix this off-by-one error.

    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 3e24e598a4663d244bfc90aa4dbdba8f929f0dd2
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Thu Jan 28 07:54:16 2016 +0100

    ALSA: dummy: Disable switching timer backend via sysfs

    commit 7ee96216c31aabe1eb42fb91ff50dae9fcd014b2 upstream.

    ALSA dummy driver can switch the timer backend between system timer
    and hrtimer via its hrtimer module option.  This can be also switched
    dynamically via sysfs, but it may lead to a memory corruption when
    switching is done while a PCM stream is running; the stream instance
    for the newly switched timer method tries to access the memory that
    was allocated by another timer method although the sizes differ.

    As the simplest fix, this patch just disables the switch via sysfs by
    dropping the writable bit.

    BugLink: http://lkml.kernel.org/r/CACT4Y+ZGEeEBntHW5WHn2GoeE0G_kRrCmUh6=dWyy-wfzvuJLg@mail.gmail.com
    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 074e46b6e22aad0ec94eb38ed3e57a7b7c944d0c
Author: Takashi Iwai &lt;tiwai@suse.de&gt;
Date:   Mon Jan 25 13:59:21 2016 +0100

    ALSA: compress: Disable GET_CODEC_CAPS ioctl for some architectures

    commit 462b3f161beb62eeb290f4ec52f5ead29a2f8ac7 upstream.

    Some architectures like PowerPC can handle the maximum struct size in
    an ioctl only up to 13 bits, and struct snd_compr_codec_caps used by
    SNDRV_COMPRESS_GET_CODEC_CAPS ioctl overflows this limit.  This
    problem was revealed recently by a powerpc change, as it's now treated
    as a fatal build error.

    This patch is a stop-gap for that: for architectures with less than 14
    bit ioctl struct size, get rid of the handling of the relevant ioctl.
    We should provide an alternative equivalent ioctl code later, but for
    now just paper over it.  Luckily, the compress API hasn't been used on
    such architectures, so the impact must be effectively zero.

    Reviewed-by: Mark Brown &lt;broonie@kernel.org&gt;
    Acked-by: Sudip Mukherjee &lt;sudipm.mukherjee@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 482c4c1a74eab8c45ece6b353a92d65154b7ea98
Author: Andrey Konovalov &lt;andreyknvl@gmail.com&gt;
Date:   Sat Feb 13 11:08:06 2016 +0300

    ALSA: usb-audio: avoid freeing umidi object twice

    commit 07d86ca93db7e5cdf4743564d98292042ec21af7 upstream.

    The 'umidi' object will be free'd on the error path by snd_usbmidi_free()
    when tearing down the rawmidi interface. So we shouldn't try to free it
    in snd_usbmidi_create() after having registered the rawmidi interface.

    Found by KASAN.

    Signed-off-by: Andrey Konovalov &lt;andreyknvl@gmail.com&gt;
    Acked-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 fc345885783318c63a9860d4476e8cc4257de230
Author: Guillaume Fougnies &lt;guillaume@eulerian.com&gt;
Date:   Tue Jan 26 00:28:27 2016 +0100

    ALSA: usb-audio: Fix TEAC UD-501/UD-503/NT-503 usb delay

    commit 5a4ff9ec8d6edd2ab1cfe8ce6a080d6e57cbea9a upstream.

    TEAC UD-501/UD-503/NT-503 fail to switch properly between different
    rate/format. Similar to 'Playback Design', this patch corrects the
    invalid clock source error for TEAC products and avoids complete
    freeze of the usb interface of 503 series.

    Signed-off-by: Guillaume Fougnies &lt;guillaume@eulerian.com&gt;
    Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 863475041a73939c8c4b637711e4fe87b0464abd
Author: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Date:   Mon Nov 23 21:11:08 2015 -0500

    fix sysvfs symlinks

    commit 0ebf7f10d67a70e120f365018f1c5fce9ddc567d upstream.

    The thing got broken back in 2002 - sysvfs does *not* have inline
    symlinks; even short ones have bodies stored in the first block
    of file.  sysv_symlink() handles that correctly; unfortunately,
    attempting to look an existing symlink up will end up confusing
    them for inline symlinks, and interpret the block number containing
    the body as the body itself.

    Nobody has noticed until now, which says something about the level
    of testing sysvfs gets ;-/

    Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 53587d46617da3b8c2a212c4ffff837ee137c3aa
Author: Tiffany Lin &lt;tiffany.lin@mediatek.com&gt;
Date:   Thu Sep 24 06:02:36 2015 -0300

    media: vb2 dma-contig: Fully cache synchronise buffers in prepare and finish

    commit d9a985883fa32453d099d6293188c11d75cef1fa upstream.

    In videobuf2 dma-contig memory type the prepare and finish ops, instead of
    passing the number of entries in the original scatterlist as the "nents"
    parameter to dma_sync_sg_for_device() and dma_sync_sg_for_cpu(), the value
    returned by dma_map_sg() was used. Albeit this has been suggested in
    comments of some implementations (which have since been corrected), this
    is wrong.

    Fixes: 199d101efdba ("v4l: vb2-dma-contig: add prepare/finish to dma-contig allocator")

    Signed-off-by: Tiffany Lin &lt;tiffany.lin@mediatek.com&gt;
    Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.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;

commit 1b97331b42c93644cf2798f412f2f8ce53e35044
Author: Andrzej Hajda &lt;a.hajda@samsung.com&gt;
Date:   Mon Aug 31 08:56:15 2015 -0300

    v4l2-compat-ioctl32: fix alignment for ARM64

    commit 655e9780ab913a3a06d4a164d55e3b755524186d upstream.

    Alignment/padding rules on AMD64 and ARM64 differs. To allow properly match
    compatible ioctls on ARM64 kernels without breaking AMD64 some fields
    should be aligned using compat_s64 type and in one case struct should be
    unpacked.

    Signed-off-by: Andrzej Hajda &lt;a.hajda@samsung.com&gt;
    [hans.verkuil@cisco.com: use compat_u64 instead of compat_s64 in v4l2_input32]
    Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

    Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@osg.samsung.com&gt;

commit 4fdefe95e6c1607e0bfd14e11f53696989dc636d
Author: Helge Deller &lt;deller@gmx.de&gt;
Date:   Sun Jan 10 09:30:42 2016 +0100

    parisc: Fix __ARCH_SI_PREAMBLE_SIZE

    commit e60fc5aa608eb38b47ba4ee058f306f739eb70a0 upstream.

    On a 64bit kernel build the compiler aligns the _sifields union in the
    struct siginfo_t on a 64bit address. The __ARCH_SI_PREAMBLE_SIZE define
    compensates for this alignment and thus fixes the wait testcase of the
    strace package.

    The symptoms of a wrong __ARCH_SI_PREAMBLE_SIZE value is that
    _sigchld.si_stime variable is missed to be copied and thus after a
    copy_siginfo() will have uninitialized values.

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

commit fedff89dcaa254b09bd0e14ebf82e25912f9f77e
Author: Helge Deller &lt;deller@gmx.de&gt;
Date:   Mon Dec 21 10:03:30 2015 +0100

    parisc: Fix syscall restarts

    commit 71a71fb5374a23be36a91981b5614590b9e722c3 upstream.

    On parisc syscalls which are interrupted by signals sometimes failed to
    restart and instead returned -ENOSYS which in the worst case lead to
    userspace crashes.
    A similiar problem existed on MIPS and was fixed by commit e967ef02
    ("MIPS: Fix restart of indirect syscalls").

    On parisc the current syscall restart code assumes that all syscall
    callers load the syscall number in the delay slot of the ble
    instruction. That's how it is e.g. done in the unistd.h header file:
    	ble 0x100(%sr2, %r0)
    	ldi #syscall_nr, %r20
    Because of that assumption the current code never restored %r20 before
    returning to userspace.

    This assumption is at least not true for code which uses the glibc
    syscall() function, which instead uses this syntax:
    	ble 0x100(%sr2, %r0)
    	copy regX, %r20
    where regX depend on how the compiler optimizes the code and register
    usage.

    This patch fixes this problem by adding code to analyze how the syscall
    number is loaded in the delay branch and - if needed - copy the syscall
    number to regX prior returning to userspace for the syscall restart.

    Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
    Cc: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit d2bb787af44a88804427e7343ce17b7ec7e1d48e
Author: Helge Deller &lt;deller@gmx.de&gt;
Date:   Sun Nov 22 12:14:14 2015 +0100

    parisc: Drop unused MADV_xxxK_PAGES flags from asm/mman.h

    commit dcbf0d299c00ed4f82ea8d6e359ad88a5182f9b8 upstream.

    Drop the MADV_xxK_PAGES flags, which were never used and were from a proposed
    API which was never integrated into the generic Linux kernel code.

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

commit 1daeb19fa8cbd87b06d7f60f2114ba65fd701973
Author: Andy Leiserson &lt;andy@leiserson.org&gt;
Date:   Sun Oct 18 00:36:29 2015 -0400

    fix calculation of meta_bg descriptor backups

    commit 904dad4742d211b7a8910e92695c0fa957483836 upstream.

    "group" is the group where the backup will be placed, and is
    initialized to zero in the declaration. This meant that backups for
    meta_bg descriptors were erroneously written to the backup block group
    descriptors in groups 1 and (desc_per_block-1).

    Reproduction information:
      mke2fs -Fq -t ext4 -b 1024 -O ^resize_inode /tmp/foo.img 16G
      truncate -s 24G /tmp/foo.img
      losetup /dev/loop0 /tmp/foo.img
      mount /dev/loop0 /mnt
      resize2fs /dev/loop0
      umount /dev/loop0
      dd if=/dev/zero of=/dev/loop0 bs=1024 count=2
      e2fsck -fy /dev/loop0
      losetup -d /dev/loop0

    Signed-off-by: Andy Leiserson &lt;andy@leiserson.org&gt;
    Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 1174350e4dba0abb95f9f21154e333c54d97555d
Author: Jan Kara &lt;jack@suse.cz&gt;
Date:   Tue Nov 24 15:34:35 2015 -0500

    jbd2: Fix unreclaimed pages after truncate in data=journal mode

    commit bc23f0c8d7ccd8d924c4e70ce311288cb3e61ea8 upstream.

    Ted and Namjae have reported that truncated pages don't get timely
    reclaimed after being truncated in data=journal mode. The following test
    triggers the issue easily:

    for (i = 0; i &lt; 1000; i++) {
    	pwrite(fd, buf, 1024*1024, 0);
    	fsync(fd);
    	fsync(fd);
    	ftruncate(fd, 0);
    }

    The reason is that journal_unmap_buffer() finds that truncated buffers
    are not journalled (jh-&gt;b_transaction == NULL), they are part of
    checkpoint list of a transaction (jh-&gt;b_cp_transaction != NULL) and have
    been already written out (!buffer_dirty(bh)). We clean such buffers but
    we leave them in the checkpoint list. Since checkpoint transaction holds
    a reference to the journal head, these buffers cannot be released until
    the checkpoint transaction is cleaned up. And at that point we don't
    call release_buffer_page() anymore so pages detached from mapping are
    lingering in the system waiting for reclaim to find them and free them.

    Fix the problem by removing buffers from transaction checkpoint lists
    when journal_unmap_buffer() finds out they don't have to be there
    anymore.

    Reported-and-tested-by: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
    Fixes: de1b794130b130e77ffa975bb58cb843744f9ae5
    Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
    Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 98b3bd61b250e6ebe77f475d7dd0660eec20b183
Author: Boris BREZILLON &lt;boris.brezillon@free-electrons.com&gt;
Date:   Thu Jul 30 12:18:03 2015 +0200

    mtd: mtdpart: fix add_mtd_partitions error path

    commit e5bae86797141e4a95e42d825f737cb36d7b8c37 upstream.

    If we fail to allocate a partition structure in the middle of the partition
    creation process, the already allocated partitions are never removed, which
    means they are still present in the partition list and their resources are
    never freed.

    Signed-off-by: Boris Brezillon &lt;boris.brezillon@free-electrons.com&gt;
    Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 2acba4b8b307985e93a2d86e619f8a16d39a247b
Author: Hon Ching \(Vicky\) Lo &lt;honclo@linux.vnet.ibm.com&gt;
Date:   Wed Oct 7 20:11:51 2015 -0400

    vTPM: fix memory allocation flag for rtce buffer at kernel boot

    commit 60ecd86c4d985750efa0ea3d8610972b09951715 upstream.

    At ibm vtpm initialzation, tpm_ibmvtpm_probe() registers its interrupt
    handler, ibmvtpm_interrupt, which calls ibmvtpm_crq_process to allocate
    memory for rtce buffer.  The current code uses 'GFP_KERNEL' as the
    type of kernel memory allocation, which resulted a warning at
    kernel/lockdep.c.  This patch uses 'GFP_ATOMIC' instead so that the
    allocation is high-priority and does not sleep.

    Signed-off-by: Hon Ching(Vicky) Lo &lt;honclo@linux.vnet.ibm.com&gt;
    Signed-off-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit c0d57f2bd29e813cb12f84cc2dd0d7508134bc26
Author: Uri Mashiach &lt;uri.mashiach@compulab.co.il&gt;
Date:   Thu Dec 24 16:05:00 2015 +0200

    wlcore/wl12xx: spi: fix NULL pointer dereference (Oops)

    commit e47301b06d5a65678690f04c2248fd181db1e59a upstream.

    Fix the below Oops when trying to modprobe wlcore_spi.
    The oops occurs because the wl1271_power_{off,on}()
    function doesn't check the power() function pointer.

    [   23.401447] Unable to handle kernel NULL pointer dereference at
    virtual address 00000000
    [   23.409954] pgd = c0004000
    [   23.412922] [00000000] *pgd=00000000
    [   23.416693] Internal error: Oops: 80000007 [#1] SMP ARM
    [   23.422168] Modules linked in: wl12xx wlcore mac80211 cfg80211
    musb_dsps musb_hdrc usbcore usb_common snd_soc_simple_card evdev joydev
    omap_rng wlcore_spi snd_soc_tlv320aic23_i2c rng_core snd_soc_tlv320aic23
    c_can_platform c_can can_dev snd_soc_davinci_mcasp snd_soc_edma
    snd_soc_omap omap_wdt musb_am335x cpufreq_dt thermal_sys hwmon
    [   23.453253] CPU: 0 PID: 36 Comm: kworker/0:2 Not tainted
    4.2.0-00002-g951efee-dirty #233
    [   23.461720] Hardware name: Generic AM33XX (Flattened Device Tree)
    [   23.468123] Workqueue: events request_firmware_work_func
    [   23.473690] task: de32efc0 ti: de4ee000 task.ti: de4ee000
    [   23.479341] PC is at 0x0
    [   23.482112] LR is at wl12xx_set_power_on+0x28/0x124 [wlcore]
    [   23.488074] pc : [&lt;00000000&gt;]    lr : [&lt;bf2581f0&gt;]    psr: 60000013
    [   23.488074] sp : de4efe50  ip : 00000002  fp : 00000000
    [   23.500162] r10: de7cdd00  r9 : dc848800  r8 : bf27af00
    [   23.505663] r7 : bf27a1a8  r6 : dcbd8a80  r5 : dce0e2e0  r4 :
    dce0d2e0
    [   23.512536] r3 : 00000000  r2 : 00000000  r1 : 00000001  r0 :
    dc848810
    [   23.519412] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM
    Segment kernel
    [   23.527109] Control: 10c5387d  Table: 9cb78019  DAC: 00000015
    [   23.533160] Process kworker/0:2 (pid: 36, stack limit = 0xde4ee218)
    [   23.539760] Stack: (0xde4efe50 to 0xde4f0000)

    [...]

    [   23.665030] [&lt;bf2581f0&gt;] (wl12xx_set_power_on [wlcore]) from
    [&lt;bf25f7ac&gt;] (wlcore_nvs_cb+0x118/0xa4c [wlcore])
    [   23.675604] [&lt;bf25f7ac&gt;] (wlcore_nvs_cb [wlcore]) from [&lt;c04387ec&gt;]
    (request_firmware_work_func+0x30/0x58)
    [   23.685784] [&lt;c04387ec&gt;] (request_firmware_work_func) from
    [&lt;c0058e2c&gt;] (process_one_work+0x1b4/0x4b4)
    [   23.695591] [&lt;c0058e2c&gt;] (process_one_work) from [&lt;c0059168&gt;]
    (worker_thread+0x3c/0x4a4)
    [   23.704124] [&lt;c0059168&gt;] (worker_thread) from [&lt;c005ee68&gt;]
    (kthread+0xd4/0xf0)
    [   23.711747] [&lt;c005ee68&gt;] (kthread) from [&lt;c000f598&gt;]
    (ret_from_fork+0x14/0x3c)
    [   23.719357] Code: bad PC value
    [   23.722760] ---[ end trace 981be8510db9b3a9 ]---

    Prevent oops by validationg power() pointer value before
    calling the function.

    Signed-off-by: Uri Mashiach &lt;uri.mashiach@compulab.co.il&gt;
    Acked-by: Igor Grinberg &lt;grinberg@compulab.co.il&gt;
    Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 0d2099937583ef8ed9d7c34f2ac9aa73e098d808
Author: Uri Mashiach &lt;uri.mashiach@compulab.co.il&gt;
Date:   Thu Dec 10 15:12:56 2015 +0200

    wlcore/wl12xx: spi: fix oops on firmware load

    commit 9b2761cb72dc41e1948c8a5512b4efd384eda130 upstream.

    The maximum chunks used by the function is
    (SPI_AGGR_BUFFER_SIZE / WSPI_MAX_CHUNK_SIZE + 1).
    The original commands array had space for
    (SPI_AGGR_BUFFER_SIZE / WSPI_MAX_CHUNK_SIZE) commands.
    When the last chunk is used (len &gt; 4 * WSPI_MAX_CHUNK_SIZE), the last
    command is stored outside the bounds of the commands array.

    Oops 5 (page fault) is generated during current wl1271 firmware load
    attempt:

    root@debian-armhf:~# ifconfig wlan0 up
    [  294.312399] Unable to handle kernel paging request at virtual address
    00203fc4
    [  294.320173] pgd = de528000
    [  294.323028] [00203fc4] *pgd=00000000
    [  294.326916] Internal error: Oops: 5 [#1] SMP ARM
    [  294.331789] Modules linked in: bnep rfcomm bluetooth ipv6 arc4 wl12xx
    wlcore mac80211 musb_dsps cfg80211 musb_hdrc usbcore usb_common
    wlcore_spi omap_rng rng_core musb_am335x omap_wdt cpufreq_dt thermal_sys
    hwmon
    [  294.351838] CPU: 0 PID: 1827 Comm: ifconfig Not tainted
    4.2.0-00002-g3e9ad27-dirty #78
    [  294.360154] Hardware name: Generic AM33XX (Flattened Device Tree)
    [  294.366557] task: dc9d6d40 ti: de550000 task.ti: de550000
    [  294.372236] PC is at __spi_validate+0xa8/0x2ac
    [  294.376902] LR is at __spi_sync+0x78/0x210
    [  294.381200] pc : [&lt;c049c760&gt;]    lr : [&lt;c049ebe0&gt;]    psr: 60000013
    [  294.381200] sp : de551998  ip : de5519d8  fp : 00200000
    [  294.393242] r10: de551c8c  r9 : de5519d8  r8 : de3a9000
    [  294.398730] r7 : de3a9258  r6 : de3a9400  r5 : de551a48  r4 :
    00203fbc
    [  294.405577] r3 : 00000000  r2 : 00000000  r1 : 00000000  r0 :
    de3a9000
    [  294.412420] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM
    Segment user
    [  294.419918] Control: 10c5387d  Table: 9e528019  DAC: 00000015
    [  294.425954] Process ifconfig (pid: 1827, stack limit = 0xde550218)
    [  294.432437] Stack: (0xde551998 to 0xde552000)

    ...

    [  294.883613] [&lt;c049c760&gt;] (__spi_validate) from [&lt;c049ebe0&gt;]
    (__spi_sync+0x78/0x210)
    [  294.891670] [&lt;c049ebe0&gt;] (__spi_sync) from [&lt;bf036598&gt;]
    (wl12xx_spi_raw_write+0xfc/0x148 [wlcore_spi])
    [  294.901661] [&lt;bf036598&gt;] (wl12xx_spi_raw_write [wlcore_spi]) from
    [&lt;bf21c694&gt;] (wlcore_boot_upload_firmware+0x1ec/0x458 [wlcore])
    [  294.914038] [&lt;bf21c694&gt;] (wlcore_boot_upload_firmware [wlcore]) from
    [&lt;bf24532c&gt;] (wl12xx_boot+0xc10/0xfac [wl12xx])
    [  294.925161] [&lt;bf24532c&gt;] (wl12xx_boot [wl12xx]) from [&lt;bf20d5cc&gt;]
    (wl1271_op_add_interface+0x5b0/0x910 [wlcore])
    [  294.936364] [&lt;bf20d5cc&gt;] (wl1271_op_add_interface [wlcore]) from
    [&lt;bf15c4ac&gt;] (ieee80211_do_open+0x44c/0xf7c [mac80211])
    [  294.947963] [&lt;bf15c4ac&gt;] (ieee80211_do_open [mac80211]) from
    [&lt;c0537978&gt;] (__dev_open+0xa8/0x110)
    [  294.957307] [&lt;c0537978&gt;] (__dev_open) from [&lt;c0537bf8&gt;]
    (__dev_change_flags+0x88/0x148)
    [  294.965713] [&lt;c0537bf8&gt;] (__dev_change_flags) from [&lt;c0537cd0&gt;]
    (dev_change_flags+0x18/0x48)
    [  294.974576] [&lt;c0537cd0&gt;] (dev_change_flags) from [&lt;c05a55a0&gt;]
    (devinet_ioctl+0x6b4/0x7d0)
    [  294.983191] [&lt;c05a55a0&gt;] (devinet_ioctl) from [&lt;c0517040&gt;]
    (sock_ioctl+0x1e4/0x2bc)
    [  294.991244] [&lt;c0517040&gt;] (sock_ioctl) from [&lt;c017d378&gt;]
    (do_vfs_ioctl+0x420/0x6b0)
    [  294.999208] [&lt;c017d378&gt;] (do_vfs_ioctl) from [&lt;c017d674&gt;]
    (SyS_ioctl+0x6c/0x7c)
    [  295.006880] [&lt;c017d674&gt;] (SyS_ioctl) from [&lt;c000f4c0&gt;]
    (ret_fast_syscall+0x0/0x54)
    [  295.014835] Code: e1550004 e2444034 0a00007d e5953018 (e5942008)
    [  295.021544] ---[ end trace 66ed188198f4e24e ]---

    Signed-off-by: Uri Mashiach &lt;uri.mashiach@compulab.co.il&gt;
    Acked-by: Igor Grinberg &lt;grinberg@compulab.co.il&gt;
    Signed-off-by: Kalle Valo &lt;kvalo@codeaurora.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 1dcdf54f2426085c65f00a171259da0f1bd6fd93
Author: Johan Hovold &lt;johan@kernel.org&gt;
Date:   Mon Dec 14 16:16:19 2015 +0100

    spi: fix parent-device reference leak

    commit 157f38f993919b648187ba341bfb05d0e91ad2f6 upstream.

    Fix parent-device reference leak due to SPI-core taking an unnecessary
    reference to the parent when allocating the master structure, a
    reference that was never released.

    Note that driver core takes its own reference to the parent when the
    master device is registered.

    Fixes: 49dce689ad4e ("spi doesn't need class_device")
    Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
    Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 092f4b70fe24ef591430e5111ebeffb67ec241eb
Author: David Mosberger-Tang &lt;davidm@egauge.net&gt;
Date:   Tue Oct 20 14:26:47 2015 +0200

    spi: atmel: Fix DMA-setup for transfers with more than 8 bits per word

    commit 06515f83908d038d9e12ffa3dcca27a1b67f2de0 upstream.

    The DMA-slave configuration depends on the whether &lt;= 8 or &gt; 8 bits
    are transferred per word, so we need to call
    atmel_spi_dma_slave_config() with the correct value.

    Signed-off-by: David Mosberger &lt;davidm@egauge.net&gt;
    Signed-off-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
    Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 0fd9b8b499b31651d3b2d1c837a0f199ea25cc41
Author: Mauricio Faria de Oliveira &lt;mauricfo@linux.vnet.ibm.com&gt;
Date:   Thu Oct 29 10:24:23 2015 -0200

    Revert "dm mpath: fix stalls when handling invalid ioctls"

    commit 47796938c46b943d157ac8a6f9ed4e3b98b83cf4 upstream.

    This reverts commit a1989b330093578ea5470bea0a00f940c444c466.

    That commit introduced a regression at least for the case of the SG_IO ioctl()
    running without CAP_SYS_RAWIO capability (e.g., unprivileged users) when there
    are no active paths: the ioctl() fails with the ENOTTY errno immediately rather
    than blocking due to queue_if_no_path until a path becomes active, for example.

    That case happens to be exercised by QEMU KVM guests with 'scsi-block' devices
    (qemu "-device scsi-block" [1], libvirt "&lt;disk type='block' device='lun'&gt;" [2])
    from multipath devices; which leads to SCSI/filesystem errors in such a guest.

    More general scenarios can hit that regression too. The following demonstration
    employs a SG_IO ioctl() with a standard SCSI INQUIRY command for this objective
    (some output &amp; user changes omitted for brevity and comments added for clarity).

    Reverting that commit restores normal operation (queueing) in failing scenarios;
    tested on linux-next (next-20151022).

    1) Test-case is based on sg_simple0 [3] (just SG_IO; remove SG_GET_VERSION_NUM)

        $ cat sg_simple0.c
        ... see [3] ...
        $ sed '/SG_GET_VERSION_NUM/,/}/d' sg_simple0.c &gt; sgio_inquiry.c
        $ gcc sgio_inquiry.c -o sgio_inquiry

    2) The ioctl() works fine with active paths present.

        # multipath -l 85ag56
        85ag56 (...) dm-19 IBM     ,2145
        size=60G features='1 queue_if_no_path' hwhandler='0' wp=rw
        |-+- policy='service-time 0' prio=0 status=active
        | |- 8:0:11:0  sdz  65:144  active undef running
        | `- 9:0:9:0   sdbf 67:144  active undef running
        `-+- policy='service-time 0' prio=0 status=enabled
          |- 8:0:12:0  sdae 65:224  active undef running
          `- 9:0:12:0  sdbo 68:32   active undef running

        $ ./sgio_inquiry /dev/mapper/85ag56
        Some of the INQUIRY command's response:
            IBM       2145              0000
        INQUIRY duration=0 millisecs, resid=0

    3) The ioctl() fails with ENOTTY errno with _no_ active paths present,
       for unprivileged users (rather than blocking due to queue_if_no_path).

        # for path in $(multipath -l 85ag56 | grep -o 'sd[a-z]\+'); \
              do multipathd -k"fail path $path"; done

        # multipath -l 85ag56
        85ag56 (...) dm-19 IBM     ,2145
        size=60G features='1 queue_if_no_path' hwhandler='0' wp=rw
        |-+- policy='service-time 0' prio=0 status=enabled
        | |- 8:0:11:0  sdz  65:144  failed undef running
        | `- 9:0:9:0   sdbf 67:144  failed undef running
        `-+- policy='service-time 0' prio=0 status=enabled
          |- 8:0:12:0  sdae 65:224  failed undef running
          `- 9:0:12:0  sdbo 68:32   failed undef running

        $ ./sgio_inquiry /dev/mapper/85ag56
        sg_simple0: Inquiry SG_IO ioctl error: Inappropriate ioctl for device

    4) dmesg shows that scsi_verify_blk_ioctl() failed for SG_IO (0x2285);
       it returns -ENOIOCTLCMD, later replaced with -ENOTTY in vfs_ioctl().

        $ dmesg
        &lt;...&gt;
        [] device-mapper: multipath: Failing path 65:144.
        [] device-mapper: multipath: Failing path 67:144.
        [] device-mapper: multipath: Failing path 65:224.
        [] device-mapper: multipath: Failing path 68:32.
        [] sgio_inquiry: sending ioctl 2285 to a partition!

    5) The ioctl() only works if the SYS_CAP_RAWIO capability is present
       (then queueing happens -- in this example, queue_if_no_path is set);
       this is due to a conditional check in scsi_verify_blk_ioctl().

        # capsh --drop=cap_sys_rawio -- -c './sgio_inquiry /dev/mapper/85ag56'
        sg_simple0: Inquiry SG_IO ioctl error: Inappropriate ioctl for device

        # ./sgio_inquiry /dev/mapper/85ag56 &amp;
        [1] 72830

        # cat /proc/72830/stack
        [&lt;c00000171c0df700&gt;] 0xc00000171c0df700
        [&lt;c000000000015934&gt;] __switch_to+0x204/0x350
        [&lt;c000000000152d4c&gt;] msleep+0x5c/0x80
        [&lt;c00000000077dfb0&gt;] dm_blk_ioctl+0x70/0x170
        [&lt;c000000000487c40&gt;] blkdev_ioctl+0x2b0/0x9b0
        [&lt;c0000000003128e4&gt;] block_ioctl+0x64/0xd0
        [&lt;c0000000002dd3b0&gt;] do_vfs_ioctl+0x490/0x780
        [&lt;c0000000002dd774&gt;] SyS_ioctl+0xd4/0xf0
        [&lt;c000000000009358&gt;] system_call+0x38/0xd0

    6) This is the function call chain exercised in this analysis:

    SYSCALL_DEFINE3(ioctl, &lt;...&gt;) @ fs/ioctl.c
        -&gt; do_vfs_ioctl()
            -&gt; vfs_ioctl()
                ...
                error = filp-&gt;f_op-&gt;unlocked_ioctl(filp, cmd, arg);
                ...
                    -&gt; dm_blk_ioctl() @ drivers/md/dm.c
                        -&gt; multipath_ioctl() @ drivers/md/dm-mpath.c
                            ...
                            (bdev = NULL, due to no active paths)
                            ...
                            if (!bdev || &lt;...&gt;) {
                                int err = scsi_verify_blk_ioctl(NULL, cmd);
                                if (err)
                                    r = err;
                            }
                            ...
                                -&gt; scsi_verify_blk_ioctl() @ block/scsi_ioctl.c
                                    ...
                                    if (bd &amp;&amp; bd == bd-&gt;bd_contains) // not taken (bd = NULL)
                                        return 0;
                                    ...
                                    if (capable(CAP_SYS_RAWIO)) // not taken (unprivileged user)
                                        return 0;
                                    ...
                                    printk_ratelimited(KERN_WARNING
                                               "%s: sending ioctl %x to a partition!\n" &lt;...&gt;);

                                    return -ENOIOCTLCMD;
                                &lt;-
                            ...
                            return r ? : &lt;...&gt;
                        &lt;-
                ...
                if (error == -ENOIOCTLCMD)
                    error = -ENOTTY;
                 out:
                    return error;
                ...

    Links:
    [1] http://git.qemu.org/?p=qemu.git;a=commit;h=336a6915bc7089fb20fea4ba99972ad9a97c5f52
    [2] https://libvirt.org/formatdomain.html#elementsDisks (see 'disk' -&gt; 'device')
    [3] http://tldp.org/HOWTO/SCSI-Generic-HOWTO/pexample.html (Revision 1.2, 2002-05-03)

    Signed-off-by: Mauricio Faria de Oliveira &lt;mauricfo@linux.vnet.ibm.com&gt;
    Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 516932b7059a935f0360e486014fdabbb28f45da
Author: Dmitry V. Levin &lt;ldv@altlinux.org&gt;
Date:   Fri Dec 11 13:41:06 2015 -0800

    sh64: fix __NR_fgetxattr

    commit 2d33fa1059da4c8e816627a688d950b613ec0474 upstream.

    According to arch/sh/kernel/syscalls_64.S and common sense, __NR_fgetxattr
    has to be defined to 259, but it doesn't.  Instead, it's defined to 269,
    which is of course used by another syscall, __NR_sched_setaffinity in this
    case.

    This bug was found by strace test suite.

    Signed-off-by: Dmitry V. Levin &lt;ldv@altlinux.org&gt;
    Acked-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&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 bb169b2b585790c58d59aa09e1408e365a7acccc
Author: xuejiufei &lt;xuejiufei@huawei.com&gt;
Date:   Fri Feb 5 15:36:47 2016 -0800

    ocfs2/dlm: clear refmap bit of recovery lock while doing local recovery cleanup

    commit c95a51807b730e4681e2ecbdfd669ca52601959e upstream.

    When recovery master down, dlm_do_local_recovery_cleanup() only remove
    the $RECOVERY lock owned by dead node, but do not clear the refmap bit.
    Which will make umount thread falling in dead loop migrating $RECOVERY
    to the dead node.

    Signed-off-by: xuejiufei &lt;xuejiufei@huawei.com&gt;
    Reviewed-by: Joseph Qi &lt;joseph.qi@huawei.com&gt;
    Cc: Mark Fasheh &lt;mfasheh@suse.de&gt;
    Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
    Cc: Junxiao Bi &lt;junxiao.bi@oracle.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;

commit 854e6fc9de5bf94952095b544daa6c339b41014b
Author: xuejiufei &lt;xuejiufei@huawei.com&gt;
Date:   Thu Jan 14 15:17:38 2016 -0800

    ocfs2/dlm: ignore cleaning the migration mle that is inuse

    commit bef5502de074b6f6fa647b94b73155d675694420 upstream.

    We have found that migration source will trigger a BUG that the refcount
    of mle is already zero before put when the target is down during
    migration.  The situation is as follows:

    dlm_migrate_lockres
      dlm_add_migration_mle
      dlm_mark_lockres_migrating
      dlm_get_mle_inuse
      &lt;&lt;&lt;&lt;&lt;&lt; Now the refcount of the mle is 2.
      dlm_send_one_lockres and wait for the target to become the
      new master.
      &lt;&lt;&lt;&lt;&lt;&lt; o2hb detect the target down and clean the migration
      mle. Now the refcount is 1.

    dlm_migrate_lockres woken, and put the mle twice when found the target
    goes down which trigger the BUG with the following message:

      "ERROR: bad mle: ".

    Signed-off-by: Jiufei Xue &lt;xuejiufei@huawei.com&gt;
    Reviewed-by: Joseph Qi &lt;joseph.qi@huawei.com&gt;
    Cc: Mark Fasheh &lt;mfasheh@suse.de&gt;
    Cc: Joel Becker &lt;jlbec@evilplan.org&gt;
    Cc: Junxiao Bi &lt;junxiao.bi@oracle.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;

commit fa17bfe3b7bf53e68be8dc3eda4ebfbfae85d6ea
Author: Richard Weinberger &lt;richard@nod.at&gt;
Date:   Fri Nov 20 15:57:21 2015 -0800

    kernel/signal.c: unexport sigsuspend()

    commit 9d8a765211335cfdad464b90fb19f546af5706ae upstream.

    sigsuspend() is nowhere used except in signal.c itself, so we can mark it
    static do not pollute the global namespace.

    But this patch is more than a boring cleanup patch, it fixes a real issue
    on UserModeLinux.  UML has a special console driver to display ttys using
    xterm, or other terminal emulators, on the host side.  Vegard reported
    that sometimes UML is unable to spawn a xterm and he's facing the
    following warning:

      WARNING: CPU: 0 PID: 908 at include/linux/thread_info.h:128 sigsuspend+0xab/0xc0()

    It turned out that this warning makes absolutely no sense as the UML
    xterm code calls sigsuspend() on the host side, at least it tries.  But
    as the kernel itself offers a sigsuspend() symbol the linker choose this
    one instead of the glibc wrapper.  Interestingly this code used to work
    since ever but always blocked signals on the wrong side.  Some recent
    kernel change made the WARN_ON() trigger and uncovered the bug.

    It is a wonderful example of how much works by chance on computers. :-)

    Fixes: 68f3f16d9ad0f1 ("new helper: sigsuspend()")
    Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
    Reported-by: Vegard Nossum &lt;vegard.nossum@oracle.com&gt;
    Tested-by: Vegard Nossum &lt;vegard.nossum@oracle.com&gt;
    Acked-by: Oleg Nesterov &lt;oleg@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;

commit 2ed0426bd1fd55d115787cbdb7c381f4c907a8e5
Author: Arnd Bergmann &lt;arnd@arndb.de&gt;
Date:   Fri Nov 20 18:26:07 2015 +0100

    remoteproc: avoid stack overflow in debugfs file

    commit 92792e48e2ae6051af30468a87994b5432da2f06 upstream.

    Recent gcc versions warn about reading from a negative offset of
    an on-stack array:

    drivers/remoteproc/remoteproc_debugfs.c: In function 'rproc_recovery_write':
    drivers/remoteproc/remoteproc_debugfs.c:167:9: warning: 'buf[4294967295u]' may be used uninitialized in this function [-Wmaybe-uninitialized]

    I don't see anything in sys_write() that prevents us from
    being called with a zero 'count' argument, so we should
    add an extra check in rproc_recovery_write() to prevent the
    access and avoid the warning.

    Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
    Fixes: 2e37abb89a2e ("remoteproc: create a 'recovery' debugfs entry")
    Signed-off-by: Ohad Ben-Cohen &lt;ohad@wizery.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit e9828fd09906acf8fedb6152f58ec97b24d671e2
Author: Ioan-Adrian Ratiu &lt;adi@adirat.com&gt;
Date:   Fri Nov 20 22:19:02 2015 +0200

    HID: usbhid: fix recursive deadlock

    commit e470127e9606b1fa151c4184243e61296d1e0c0f upstream.

    The critical section protected by usbhid-&gt;lock in hid_ctrl() is too
    big and because of this it causes a recursive deadlock. "Too big" means
    the case statement and the call to hid_input_report() do not need to be
    protected by the spinlock (no URB operations are done inside them).

    The deadlock happens because in certain rare cases drivers try to grab
    the lock while handling the ctrl irq which grabs the lock before them
    as described above. For example newer wacom tablets like 056a:033c try
    to reschedule proximity reads from wacom_intuos_schedule_prox_event()
    calling hid_hw_request() -&gt; usbhid_request() -&gt; usbhid_submit_report()
    which tries to grab the usbhid lock already held by hid_ctrl().

    There are two ways to get out of this deadlock:
        1. Make the drivers work "around" the ctrl critical region, in the
        wacom case for ex. by delaying the scheduling of the proximity read
        request itself to a workqueue.
        2. Shrink the critical region so the usbhid lock protects only the
        instructions which modify usbhid state, calling hid_input_report()
        with the spinlock unlocked, allowing the device driver to grab the
        lock first, finish and then grab the lock afterwards in hid_ctrl().

    This patch implements the 2nd solution.

    Signed-off-by: Ioan-Adrian Ratiu &lt;adi@adirat.com&gt;
    Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
    Signed-off-by: Jason Gerecke &lt;jason.gerecke@wacom.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit d6671b052b3d6a885d0fa53d553b71c3d492ba62
Author: Mike Snitzer &lt;snitzer@redhat.com&gt;
Date:   Mon Nov 23 16:24:45 2015 -0500

    dm btree: fix leak of bufio-backed block in btree_split_sibling error path

    commit 30ce6e1cc5a0f781d60227e9096c86e188d2c2bd upstream.

    The block allocated at the start of btree_split_sibling() is never
    released if later insert_at() fails.

    Fix this by releasing the previously allocated bufio block using
    unlock_block().

    Reported-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
    Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit daaf3fd914414d67fd656a39c0f1575c07f02985
Author: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Date:   Sun Nov 1 17:11:19 2015 +0800

    crypto: algif_hash - Only export and import on sockets with data

    commit 4afa5f9617927453ac04b24b584f6c718dfb4f45 upstream.

    The hash_accept call fails to work on sockets that have not received
    any data.  For some algorithm implementations it may cause crashes.

    This patch fixes this by ensuring that we only export and import on
    sockets that have received data.

    Reported-by: Harsh Jain &lt;harshjain.prof@gmail.com&gt;
    Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
    Tested-by: Stephan Mueller &lt;smueller@chronox.de&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 12c1515f4aae559359aec9d9381c2657fb19498a
Author: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Date:   Sun Jan 31 11:11:58 2016 -0800

    xhci: fix placement of call to usb_disabled()

    In the backport of 1eaf35e4dd592c59041bc1ed3248c46326da1f5f, the call to
    usb_disabled() was too late, after we had already done some allocation.
    Move that call to the top of the function instead, making the logic
    match what is intended and is in the original patch.

    Reported-by: Luis Henriques &lt;luis.henriques@canonical.com&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

commit 4bd503f766d2388df8050bb4975918c677709476
Author: libin &lt;huawei.libin@huawei.com&gt;
Date:   Tue Nov 3 08:58:47 2015 +0800

    recordmcount: Fix endianness handling bug for nop_mcount

    commit c84da8b9ad3761eef43811181c7e896e9834b26b upstream.

    In nop_mcount, shdr-&gt;sh_offset and welp-&gt;r_offset should handle
    endianness properly, otherwise it will trigger Segmentation fault
    if the recordmcount main and file.o have different endianness.

    Link: http://lkml.kernel.org/r/563806C7.7070606@huawei.com

    Signed-off-by: Li Bin &lt;huawei.libin@huawei.com&gt;
    Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&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>xhci: handle no ping response error properly</title>
<updated>2016-08-26T18:46:28+00:00</updated>
<author>
<name>Mathias Nyman</name>
<email>mathias.nyman@linux.intel.com</email>
</author>
<published>2015-10-12T08:30:12+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=866281d7e09aceb325bdcc35ac887dcf809ecdbd'/>
<id>urn:sha1:866281d7e09aceb325bdcc35ac887dcf809ecdbd</id>
<content type='text'>
commit 3b4739b8951d650becbcd855d7d6f18ac98a9a85 upstream.

If a host fails to wake up a isochronous SuperSpeed device from U1/U2
in time for a isoch transfer it will generate a "No ping response error"
Host will then move to the next transfer descriptor.

Handle this case in the same way as missed service errors, tag the
current TD as skipped and handle it on the next transfer event.

Signed-off-by: Mathias Nyman &lt;mathias.nyman@linux.intel.com&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>usb: xhci: Add support for URB_ZERO_PACKET to bulk/sg transfers</title>
<updated>2016-08-26T18:44:43+00:00</updated>
<author>
<name>Reyad Attiyat</name>
<email>reyad.attiyat@gmail.com</email>
</author>
<published>2015-08-06T16:23:58+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=1a4f14a894fb17557ebb3e17f8cceeb6ac7ebfc7'/>
<id>urn:sha1:1a4f14a894fb17557ebb3e17f8cceeb6ac7ebfc7</id>
<content type='text'>
commit 4758dcd19a7d9ba9610b38fecb93f65f56f86346 upstream.

This commit checks for the URB_ZERO_PACKET flag and creates an extra
zero-length td if the urb transfer length is a multiple of the endpoint's
max packet length.

Signed-off-by: Reyad Attiyat &lt;reyad.attiyat@gmail.com&gt;
Signed-off-by: Mathias Nyman &lt;mathias.nyman@linux.intel.com&gt;
Cc: Oliver Neukum &lt;oneukum@suse.com&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>xhci: change xhci 1.0 only restrictions to support xhci 1.1</title>
<updated>2016-08-26T18:44:42+00:00</updated>
<author>
<name>Mathias Nyman</name>
<email>mathias.nyman@linux.intel.com</email>
</author>
<published>2015-09-21T14:46:16+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=583bdf213670cd698732ceca3132f9859ee136f3'/>
<id>urn:sha1:583bdf213670cd698732ceca3132f9859ee136f3</id>
<content type='text'>
commit dca7794539eff04b786fb6907186989e5eaaa9c2 upstream.

Some changes between xhci 0.96 and xhci 1.0 specifications forced us to
check the hci version in code, some of these checks were implemented as
hci_version == 1.0, which will not work with new xhci 1.1 controllers.

xhci 1.1 behaves similar to xhci 1.0 in these cases, so change these
checks to hci_version &gt;= 1.0

Signed-off-by: Mathias Nyman &lt;mathias.nyman@linux.intel.com&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>usb: xhci: Clear XHCI_STATE_DYING on start</title>
<updated>2016-08-26T18:44:41+00:00</updated>
<author>
<name>Roger Quadros</name>
<email>rogerq@ti.com</email>
</author>
<published>2015-09-21T14:46:13+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=38493ab147dacd257e1f481881e24a5d4686c175'/>
<id>urn:sha1:38493ab147dacd257e1f481881e24a5d4686c175</id>
<content type='text'>
commit e5bfeab0ad515b4f6df39fe716603e9dc6d3dfd0 upstream.

For whatever reason if XHCI died in the previous instant
then it will never recover on the next xhci_start unless we
clear the DYING flag.

Signed-off-by: Roger Quadros &lt;rogerq@ti.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;
Signed-off-by: Stefan Guendhoer &lt;stefan@guendhoer.com&gt;
</content>
</entry>
<entry>
<title>usb: host: ehci-sys: delete useless bus_to_hcd conversion</title>
<updated>2016-08-26T18:01:15+00:00</updated>
<author>
<name>Peter Chen</name>
<email>peter.chen@freescale.com</email>
</author>
<published>2015-08-17T02:23:03+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=8badcf9a75fd7b1c0fc753565c61b3026d82f552'/>
<id>urn:sha1:8badcf9a75fd7b1c0fc753565c61b3026d82f552</id>
<content type='text'>
commit 0521cfd06e1ebcd575e7ae36aab068b38df23850 upstream.

The ehci platform device's drvdata is the pointer of struct usb_hcd
already, so we doesn't need to call bus_to_hcd conversion again.

Signed-off-by: Peter Chen &lt;peter.chen@freescale.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: Stefan Guendhoer &lt;stefan@guendhoer.com&gt;
</content>
</entry>
</feed>
