<feed xmlns='http://www.w3.org/2005/Atom'>
<title>xavi/android_kernel_m2note/arch/parisc/kernel, branch o-8.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=o-8.1</id>
<link rel='self' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/atom?h=o-8.1'/>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/'/>
<updated>2018-11-29T17:33:35+00:00</updated>
<entry>
<title>Replace &lt;asm/uaccess.h&gt; with &lt;linux/uaccess.h&gt; globally</title>
<updated>2018-11-29T17:33:35+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-12-24T19:46:01+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=97d31ff07bb554e2861bd3e1e4ab3756a8fb1f51'/>
<id>urn:sha1:97d31ff07bb554e2861bd3e1e4ab3756a8fb1f51</id>
<content type='text'>
This was entirely automated, using the script by Al:

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

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

Requested-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Moyster &lt;oysterized@gmail.com&gt;
</content>
</entry>
<entry>
<title> Get rid of __cpuinit</title>
<updated>2017-04-11T09:00:11+00:00</updated>
<author>
<name>Moyster</name>
<email>oysterized@gmail.com</email>
</author>
<published>2017-03-18T01:50:50+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=7c777e87cb30fc926920d677a845d651decaf997'/>
<id>urn:sha1:7c777e87cb30fc926920d677a845d651decaf997</id>
<content type='text'>
This commit is the result of

find . -name '*.c' | xargs sed -i 's/ __cpuinit / /g'
find . -name '*.c' | xargs sed -i 's/ __cpuexit / /g'
find . -name '*.c' | xargs sed -i 's/ __cpuinitdata / /g'
find . -name '*.c' | xargs sed -i 's/ __cpuinit$//g'
find ./arch/ -name '*.h' | xargs sed -i 's/ __cpuinit//g'
find . -name '*.c' | xargs sed -i 's/^__cpuinit //g'
find . -name '*.c' | xargs sed -i 's/^__cpuinitdata //g'
find . -name '*.c' | xargs sed -i 's/\*__cpuinit /\*/g'
find . -name '*.c' | xargs sed -i 's/ __cpuinitconst / /g'
find . -name '*.h' | xargs sed -i 's/ __cpuinit / /g'
find . -name '*.h' | xargs sed -i 's/ __cpuinitdata / /g'
git add .
git reset include/linux/init.h
git checkout -- include/linux/init.h

based off : https://github.com/jollaman999/jolla-kernel_bullhead/commit/bc15db84a622eed7d61d3ece579b577154d0ec29
</content>
</entry>
<entry>
<title>parisc: Ensure consistent state when switching to kernel stack at syscall entry</title>
<updated>2017-04-11T08:57:53+00:00</updated>
<author>
<name>John David Anglin</name>
<email>dave.anglin@bell.net</email>
</author>
<published>2016-10-29T03:00:34+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=2cf639dbdac302f5257b57e76d5cbecf96733470'/>
<id>urn:sha1:2cf639dbdac302f5257b57e76d5cbecf96733470</id>
<content type='text'>
commit 6ed518328d0189e0fdf1bb7c73290d546143ea66 upstream.

We have one critical section in the syscall entry path in which we switch from
the userspace stack to kernel stack. In the event of an external interrupt, the
interrupt code distinguishes between those two states by analyzing the value of
sr7. If sr7 is zero, it uses the kernel stack. Therefore it's important, that
the value of sr7 is in sync with the currently enabled stack.

This patch now disables interrupts while executing the critical section.  This
prevents the interrupt handler to possibly see an inconsistent state which in
the worst case can lead to crashes.

Interestingly, in the syscall exit path interrupts were already disabled in the
critical section which switches back to the userspace stack.

Signed-off-by: John David Anglin &lt;dave.anglin@bell.net&gt;
Signed-off-by: Helge Deller &lt;deller@gmx.de&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>3.10.102-&gt; 3.10.103</title>
<updated>2016-09-09T22:45:11+00:00</updated>
<author>
<name>Jan Engelmohr</name>
<email>jan.engelmohr@mailbox.tu-dresden.de</email>
</author>
<published>2016-09-04T14:45:09+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=0a1e8e11acd3cc36b1d65023ce1cb1a06a887b11'/>
<id>urn:sha1:0a1e8e11acd3cc36b1d65023ce1cb1a06a887b11</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Linux 3.10.102 (accumulative patch)</title>
<updated>2016-08-26T19:06:18+00:00</updated>
<author>
<name>Stefan Guendhoer</name>
<email>stefan@guendhoer.com</email>
</author>
<published>2016-06-18T18:57:35+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=1e0c74c9fb68682a41947b9d2af1933f8385c194'/>
<id>urn:sha1:1e0c74c9fb68682a41947b9d2af1933f8385c194</id>
<content type='text'>
commit ca1199fccf14540e86f6da955333e31d6fec5f3e
Author: Willy Tarreau &lt;w@1wt.eu&gt;
Date:   Sun Jun 12 11:41:54 2016 +0200

    Linux 3.10.102

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

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

    commit b8995f527aac143e83d3900ff39357651ea4e0f6 upstream.

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

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

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

    tty: vt, return error when con_startup fails

    commit 6798df4c5fe0a7e6d2065cf79649a794e5ba7114 upstream.

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

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

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

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

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

    commit 444f94e9e625f6ec6bbe2cb232a6451c637f35a3 upstream.

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

    In addition some minor renaming and formatting.

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

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

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

    commit c8d62957d450cc1a22ce3242908709fe367ddc8e upstream.

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

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

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

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

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

    commit 028c49f5e02a257c94129cd815f7c8485f51d4ef upstream.

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

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

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

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

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

    commit 35be1a71d70775e7bd7e45fa6d2897342ff4c9d2 upstream.

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

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

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

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

    Bluetooth: vhci: purge unhandled skbs

    commit 13407376b255325fa817798800117a839f3aa055 upstream.

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

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

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

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

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

    			usleep(50);

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

    			usleep(50);

    			close(fd);
    		}

    		return 0;
    	}

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

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

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

    mmc: longer timeout for long read time quirk

    commit 32ecd320db39bcb007679ed42f283740641b81ea upstream.

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

    This patch will...

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

    () Add this specific MMC to the quirk

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

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

    mmc: mmc: Fix partition switch timeout for some eMMCs

    commit 1c447116d017a98c90f8f71c8c5a611e0aa42178 upstream.

    Some eMMCs set the partition switch timeout too low.

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

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

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

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

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

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

    commit b49b927f16acee626c56a1af4ab4cb062f75b5df upstream.

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

    Fixes the following issue:

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

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

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

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

    commit 59643d1535eb220668692a5359de22545af579f6 upstream.

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

    Here's the details:

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

    tracing_entries_write() processes this and converts kb to bytes.

     18014398509481980 &lt;&lt; 10 = 18446744073709547520

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

     size = DIV_ROUND_UP(size, BUF_PAGE_SIZE);

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

    BUF_PAGE_SIZE is 4080 and here

     18446744073709547520 + 4080 - 1 = 18446744073709551599

    where 18446744073709551599 is still smaller than 2^64

     2^64 - 18446744073709551599 = 17

    But now 18446744073709551599 / 4080 = 4521260802379792

    and size = size * 4080 = 18446744073709551360

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

    Then we convert to the number of buffer pages needed.

     nr_page = DIV_ROUND_UP(size, BUF_PAGE_SIZE)

    but this time size is 18446744073709551360 and

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

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

      3823 / 4080 = 0

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

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

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

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

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

    commit 9b94a8fba501f38368aef6ac1b30e7335252a220 upstream.

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

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

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

    Then you get the warning of:

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

    Which is:

      RB_WARN_ON(cpu_buffer, nr_removed);

    Note each ring buffer page holds 4080 bytes.

    This is because:

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

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

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

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

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

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

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

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

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

    fs/cifs: correctly to anonymous authentication via NTLMSSP

    commit cfda35d98298131bf38fbad3ce4cd5ecb3cf18db upstream.

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

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

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

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

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

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

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

    net: fix a kernel infoleak in x25 module

    commit 79e48650320e6fba48369fccf13fd045315b19b8 upstream.

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

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

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

    net: bridge: fix old ioctl unlocked net device walk

    commit 31ca0458a61a502adb7ed192bf9716c6d05791a5 upstream.

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

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

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

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

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

    commit dedc58e067d8c379a15a8a183c5db318201295bb upstream.

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

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

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

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

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

    net: fix infoleak in rtnetlink

    commit 5f8e44741f9f216e33736ea4ec65ca9ac03036e6 upstream.

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

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

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

    net: fix infoleak in llc

    commit b8670c09f37bdf2847cc44f36511a53afc6161fd upstream.

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

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

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

    atl2: Disable unimplemented scatter/gather feature

    commit f43bfaeddc79effbf3d0fcb53ca477cca66f3db8 upstream.

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

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

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

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

    packet: fix heap info leak in PACKET_DIAG_MCLIST sock_diag interface

    commit 309cf37fe2a781279b7675d4bb7173198e532867 upstream.

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

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

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

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

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

    commit d6d5e999e5df67f8ec20b6be45e2229455ee3699 upstream.

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

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

    Sample dhcp_release command line:

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

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

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

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

    commit a36a0d4008488fa545c74445d69eaf56377d5d4e upstream.

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

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

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

    ARM: OMAP3: Fix booting with thumb2 kernel

    commit d8a50941c91a68da202aaa96a3dacd471ea9c693 upstream.

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

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

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

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

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

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

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

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

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

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

    asmlinkage, pnp: Make variables used from assembler code visible

    commit a99aa42d0253f033cbb85096d3f2bd82201321e6 upstream.

    Mark variables referenced from assembler files visible.

    This fixes compile problems with LTO.

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

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

    Input: max8997-haptic - fix NULL pointer dereference

    commit 6ae645d5fa385f3787bf1723639cd907fe5865e7 upstream.

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

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

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

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

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

    get_rock_ridge_filename(): handle malformed NM entries

    commit 99d825822eade8d827a1817357cbf3f889a552d6 upstream.

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

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

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

    crypto: hash - Fix page length clamping in hash walk

    commit 13f4bb78cf6a312bbdec367ba3da044b09bf0e29 upstream.

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

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

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

    powerpc: scan_features() updates incorrect bits for REAL_LE

    commit 6997e57d693b07289694239e52a10d2f02c3a46f upstream.

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

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

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

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

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

      #define MMU_FTR_TYPE_8xx		0x00000002

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

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

      #define PPC_FEATURE_PPC_LE		0x00000001

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

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

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

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

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

    Input: ads7846 - correct the value got from SPI

    commit 879f2fea8a5a748bcbf98d2cdce9139c045505d3 upstream.

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

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

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

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

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

    USB: serial: cp210x: add Straizona Focusers device ids

    commit 613ac23a46e10d4d4339febdd534fafadd68e059 upstream.

    Adding VID:PID for Straizona Focusers to cp210x driver.

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

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

    USB: serial: cp210x: add ID for Link ECU

    commit 1d377f4d690637a0121eac8701f84a0aa1e69a69 upstream.

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

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

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

    ACPICA: Dispatcher: Update thread ID for recursive method calls

    commit 93d68841a23a5779cef6fb9aa0ef32e7c5bd00da upstream.

    ACPICA commit 7a3bd2d962f221809f25ddb826c9e551b916eb25

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

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

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

    MAINTAINERS: Remove asterisk from EFI directory names

    commit e8dfe6d8f6762d515fcd4f30577f7bfcf7659887 upstream.

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

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

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

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

    commit c4fdb6cff2aa0ae740c5f19b6f745cbbe786d42f upstream.

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

    This patch is supposed to fix this issue.

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

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

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

    commit 8148a73c9901a8794a50f950083c00ccf97d43b3 upstream.

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

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

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

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

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

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

    ARM: SoCFPGA: Fix secondary CPU startup in thumb2 kernel

    commit 5616f36713ea77f57ae908bf2fef641364403c9f upstream.

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

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

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

    lpfc: fix misleading indentation

    commit aeb6641f8ebdd61939f462a8255b316f9bfab707 upstream.

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

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

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

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

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

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

    clk: versatile: sp810: support reentrance

    commit ec7957a6aa0aaf981fb8356dc47a2cdd01cde03c upstream.

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

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

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

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

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

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

    nbd: ratelimit error msgs after socket close

    commit da6ccaaa79caca4f38b540b651238f87215217a2 upstream.

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

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

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

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

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

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

    commit 7617a24f83b5d67f4dab1844956be1cebc44aec8 upstream.

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

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

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

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

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

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

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

    compiler-gcc: disable -ftracer for __noclone functions

    commit 95272c29378ee7dc15f43fa2758cb28a5913a06d upstream.

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

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

    and -ftracer causes a double declaration.

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

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

    ARM: OMAP3: Add cpuidle parameters table for omap3430

    commit 98f42221501353067251fbf11e732707dbb68ce3 upstream.

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

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

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

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

    perf stat: Document --detailed option

    commit f594bae08183fb6b57db55387794ece3e1edf6f6 upstream.

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

    Add the text from

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

    which added the incrementing aspect to -d.

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

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

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

    commit e513229b4c386e6c9f66298c13fde92f73e6e1ac upstream.

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

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

    Tested with WS2008R2 and WS2012R2.

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

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

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

    commit 8a5e5e02fc83aaf67053ab53b359af08c6c49aaf upstream.

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

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

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

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

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

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

    commit f3df53e4d70b5736368a8fe8aa1bb70c1cb1f577 upstream.

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

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

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

    rtc: vr41xx: Wire up alarm_irq_enable

    commit a25f4a95ec3cded34c1250364eba704c5e4fdac4 upstream.

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

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

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

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

    misc/bmp085: Enable building as a module

    commit 50e6315dba721cbc24ccd6d7b299f1782f210a98 upstream.

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

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

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

    fbdev: da8xx-fb: fix videomodes of lcd panels

    commit 713fced8d10fa1c759c8fb6bf9aaa681bae68cad upstream.

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

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

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

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

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

    commit dec63a4dec2d6d01346fd5d96062e67c0636852b upstream.

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

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

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

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

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

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

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

    commit b348d7dddb6c4fbfc810b7a0626e8ec9e29f7cbb upstream.

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

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

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

    workqueue: fix ghost PENDING flag while doing MQ IO

    commit 346c09f80459a3ad97df1816d6d606169a51001a upstream.

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

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

    The underlying device is a null_blk, with default parameters:

      queue_mode    = MQ
      submit_queues = 1

    Verification that nullb0 has something inflight:

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

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

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

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

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

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

    Further debugging shows the following traces from different CPUs:

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

    As a result request B pended forever.

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

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

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

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

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

    commit 630ba0cc7a6dbafbdee43795617c872b35cde1b4 upstream.

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

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

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

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

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

    ASoC: s3c24xx: use const snd_soc_component_driver pointer

    commit ba4bc32eaa39ba7687f0958ae90eec94da613b46 upstream.

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

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

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

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

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

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

    commit c4fc1956fa31003bfbe4f597e359d751568e2954 upstream.

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

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

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

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

    commit 609d5a1b2b35bb62b4b3750396e55453160c2a17 upstream.

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

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

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

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

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

    Input: gtco - fix crash on detecting device without endpoints

    commit 162f98dea487206d9ab79fc12ed64700667a894d upstream.

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

    Also let's fix a minor coding style issue.

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

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

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

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

    nl80211: check netlink protocol in socket release notification

    commit 8f815cdde3e550e10c2736990d791f60c2ce43eb upstream.

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

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

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

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

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

    crypto: gcm - Fix rfc4543 decryption crash

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

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

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

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

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

    usb: hcd: out of bounds access in for_each_companion

    commit e86103a75705c7c530768f4ffaba74cf382910f2 upstream.

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

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

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

    usb: xhci: fix wild pointers in xhci_mem_cleanup

    commit 71504062a7c34838c3fccd92c447f399d3cb5797 upstream.

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

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

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

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

    usbvision: fix crash on detecting device with invalid configuration

    commit fa52bd506f274b7619955917abfde355e3d19ffe upstream.

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

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

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

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

    commit afd270d1a45043cef14341bcceff62ed50e8dc9a upstream.

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

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

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

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

    usbvision-video: fix memory leak of alt_max_pkt_size

    commit 090c65b694c362adb19ec9c27de216a808ee443c upstream.

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

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

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

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

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

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

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

    Based on the analogous fix for amdgpu.

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

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

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

    commit 972e6a993f278b416a8ee3ec65475724fc36feb2 upstream.

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

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

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

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

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

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

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

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

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

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

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

    ext4: add lockdep annotations for i_data_sem

    commit daf647d2dd58cec59570d7698a45b98e580f2076 upstream.

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

      Possible unsafe locking scenario:

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

    Google-Bug-Id: 27907753

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

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

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

    commit 6490865c67825277b29638e839850882600b48ec upstream.

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

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

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

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

    commit 894f2fc44f2f3f48c36c973b1123f6ab298be160 upstream.

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

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

    This patch adds a condition to avoid the dereference.

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

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

    ip6_tunnel: set rtnl_link_ops before calling register_netdevice

    commit b6ee376cb0b7fb4e7e07d6cd248bd40436fb9ba6 upstream.

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

    Setting rtnl_link_ops before calling register_netdevice fixes that.

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

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

    ipv6: l2tp: fix a potential issue in l2tp_ip6_recv

    commit be447f305494e019dfc37ea4cdf3b0e4200b4eba upstream.

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

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

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

    ipv4: l2tp: fix a potential issue in l2tp_ip_recv

    commit 5745b8232e942abd5e16e85fa9b27cc21324acf0 upstream.

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

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

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

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

    commit e84810c7b85a2d7897797b3ad3e879168a8e032a upstream.

    Thomas reports:
    "Windows:

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

    Linux:

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

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

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

    ppp: take reference on channels netns

    commit 1f461dcdd296eecedaffffc6bae2bfa90bd7eb89 upstream.

    Let channels hold a reference on their network namespace.
    Some channel types, like ppp_async and ppp_synctty, can have their
    userspace controller running in a different namespace. Therefore they
    can't rely on them to preclude their netns from being removed from
    under them.

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

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

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

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

    Fixes: 273ec51dd7ce ("net: ppp_generic - introduce net-namespace functionality v2")
    Reported-by: Baozeng Ding &lt;sploving1@gmail.com&gt;
    Signed-off-by: Guillaume Nault &lt;g.nault@alphalink.fr&gt;
    Reviewed-by: Cyrill Gorcunov &lt;gorcunov@openvz.org&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

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

    qlge: Fix receive packets drop.

    commit 2c9a266afefe137bff06bbe0fc48b4d3b3cb348c upstream.

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

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

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

    ath9k: fix buffer overrun for ar9287

    commit 83d6f1f15f8cce844b0a131cbc63e444620e48b5 upstream.

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

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

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

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

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

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

    farsync: fix off-by-one bug in fst_add_one

    commit e725a66c0202b5f36c2f9d59d26a65c53bbf21f7 upstream.

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

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

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

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

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

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

    net: Fix use after free in the recvmmsg exit path

    commit 34b88a68f26a75e4fded796f1a49c40f82234b7d upstream.

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

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

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

    Reported-and-Tested-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
    Cc: Alexander Potapenko &lt;glider@google.com&gt;
    Cc: Eric Dumazet &lt;edumazet@google.com&gt;
    Cc: Kostya Serebryany &lt;kcc@google.com&gt;
    Cc: Sasha Levin &lt;sasha.levin@oracle.com&gt;
    Fixes: a2e2725541fa ("net: Introduce recvmmsg socket syscall")
    http://lkml.kernel.org/r/20160122211644.GC2470@redhat.com
    Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
    Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;

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

    sh_eth: fix NULL pointer dereference in sh_eth_ring_format()

    commit c1b7fca65070bfadca94dd53a4e6b71cd4f69715 upstream.

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

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

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

    udp6: fix UDP/IPv6 encap resubmit path

    commit 59dca1d8a6725a121dae6c452de0b2611d5865dc upstream.

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

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

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

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

    usbnet: cleanup after bind() in probe()

    commit 1666984c8625b3db19a9abc298931d35ab7bc64b upstream.

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

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

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

    cdc_ncm: toggle altsetting to force reset before setup

    commit 48906f62c96cc2cd35753e59310cb70eb08cc6a5 upstream.

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

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

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

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

    ipv6: re-enable fragment header matching in ipv6_find_hdr

    commit 5d150a985520bbe3cb2aa1ceef24a7e32f20c15f upstream.

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

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

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

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

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

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

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

    sctp: lack the check for ports in sctp_v6_cmp_addr

    commit 40b4f0fd74e46c017814618d67ec9127ff20f157 upstream.

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

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

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

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

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

    net: jme: fix suspend/resume on JMC260

    commit ee50c130c82175eaa0820c96b6d3763928af2241 upstream.

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

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

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

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

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

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

    commit 4a07083ed613644c96c34a7dd2853dc5d7c70902 upstream.

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

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

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

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

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

    parisc: Fix kernel crash with reversed copy_from_user()

    commit ef72f3110d8b19f4c098a0bff7ed7d11945e70c6 upstream.

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

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

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

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

    parisc: Avoid function pointers for kernel exception routines

    commit e3893027a300927049efc1572f852201eb785142 upstream.

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

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

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

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

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

    commit 3c2e2266a5bd2d1cef258e6e54dca1d99946379f upstream.

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

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

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

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

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

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

    commit e17dc65328057c00db7e1bfea249c8771a78b30b upstream.

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

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

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

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

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

    commit e9532e69b8d1d1284e8ecf8d2586de34aec61244 upstream.

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

    	 u64 steal = paravirt_steal_clock(smp_processor_id());

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

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

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

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

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

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

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

    mtd: onenand: fix deadlock in onenand_block_markbad

    commit 5e64c29e98bfbba1b527b0a164f9493f3db9e8cb upstream.

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

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

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

    ocfs2/dlm: fix BUG in dlm_move_lockres_to_recovery_list

    commit be12b299a83fc807bbaccd2bcb8ec50cbb0cb55c upstream.

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

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

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

    ocfs2/dlm: fix race between convert and recovery

    commit ac7cf246dfdbec3d8fed296c7bf30e16f5099dac upstream.

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

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

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

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

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

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

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

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

    commit 950336ba3e4a1ffd2ca60d29f6ef386dd2c7351d upstream.

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

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

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

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

    Input: ims-pcu - sanity check against missing interfaces

    commit a0ad220c96692eda76b2e3fd7279f3dcd1d8a8ff upstream.

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

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

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

    scripts/coccinelle: modernize &amp;

    commit 1b669e713f277a4d4b3cec84e13d16544ac8286d upstream.

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

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

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

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

    commit 3debb0a9ddb16526de8b456491b7db60114f7b5e upstream.

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

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

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

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

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

    tracing: Fix crash from reading trace_pipe with sendfile

    commit a29054d9478d0435ab01b7544da4f674ab13f533 upstream.

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

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

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

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

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

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

    commit cb86e05390debcc084cfdb0a71ed4c5dbbec517d upstream.

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

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

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

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

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

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

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

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

    commit 459ee1c3fd097ab56ababd8ff4bb7ef6a792de33 upstream.

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

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

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

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

    ipr: Fix regression when loading firmware

    commit 21b81716c6bff24cda52dc75588455f879ddbfe9 upstream.

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

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

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

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

    ipr: Fix out-of-bounds null overwrite

    commit d63c7dd5bcb9441af0526d370c43a65ca2c980d9 upstream.

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

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

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

    rapidio/rionet: fix deadlock on SMP

    commit 36915976eca58f2eefa040ba8f9939672564df61 upstream.

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

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

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

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

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

    commit e7597e69dec59b65c5525db1626b9d34afdfa678 upstream.

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

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

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

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

    xtensa: clear all DBREAKC registers on start

    commit 7de7ac785ae18a2cdc78d7560f48e3213d9ea0ab upstream.

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

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

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

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

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

    commit 362014c8d9d51d504c167c44ac280169457732be upstream.

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

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

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

    splice: handle zero nr_pages in splice_to_pipe()

    commit d6785d9152147596f60234157da2b02540c3e60f upstream.

    Running the following command:

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

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

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

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

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

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

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

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

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

    watchdog: rc32434_wdt: fix ioctl error handling

    commit 10e7ac22cdd4d211cef99afcb9371b70cb175be6 upstream.

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

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

    instead.

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

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

    bcache: fix cache_set_flush() NULL pointer dereference on OOM

    commit f8b11260a445169989d01df75d35af0f56178f95 upstream.

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

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

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

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

    commit c0a2ad9b50dd80eeccd73d9ff962234590d5ec93 upstream.

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

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

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

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

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

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

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

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

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

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

    BTW,

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

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

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

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

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

    commit 4061db03dd71d195b9973ee466f6ed32f6a3fc16 upstream.

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

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

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

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

    commit 7df5ab8774aa383c6d2bff00688d004585d96dfd upstream.

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

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

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

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

    commit 5c915c68763889f0183a1cc61c84bb228b60124a upstream.

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

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

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

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

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

    8250: use callbacks to access UART_DLL/UART_DLM

    commit 0b41ce991052022c030fd868e03877700220b090 upstream.

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

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

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

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

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

    commit 401879c57f01cbf2da204ad2e8db910525c6dbea upstream.

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

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

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

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

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

    Input: powermate - fix oops with malicious USB descriptors

    commit 9c6ba456711687b794dcf285856fc14e2c76074f upstream.

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

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

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

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

    pwc: Add USB id for Philips Spc880nc webcam

    commit 7445e45d19a09e5269dc85f17f9635be29d2f76c upstream.

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

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

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

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

    commit d48d5691ebf88a15d95ba96486917ffc79256536 upstream.

    Thomas reports:
    "Windows:

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

    Linux:

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

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

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

    USB: serial: cp210x: Adding GE Healthcare Device ID

    commit cddc9434e3dcc37a85c4412fb8e277d3a582e456 upstream.

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

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

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

    USB: cypress_m8: add endpoint sanity check

    commit c55aee1bf0e6b6feec8b2927b43f7a09a6d5f754 upstream.

    An attack using missing endpoints exists.

    CVE-2016-3137

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

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

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

    commit 5a07975ad0a36708c6b0a5b9fea1ff811d0b0c1f upstream.

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

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

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

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

    USB: mct_u232: add sanity checking in probe

    commit 4e9a0b05257f29cf4b75f3209243ed71614d062e upstream.

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

    CVE-2016-3136

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

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

    USB: usb_driver_claim_interface: add sanity checking

    commit 0b818e3956fc1ad976bee791eadcbb3b5fec5bfd upstream.

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

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

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

    USB: iowarrior: fix oops with malicious USB descriptors

    commit 4ec0ef3a82125efc36173062a50624550a900ae0 upstream.

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

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

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

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

    USB: cdc-acm: more sanity checking

    commit 8835ba4a39cf53f705417b3b3a94eb067673f2c9 upstream.

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

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

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

    usb: retry reset if a device times out

    commit 264904ccc33c604d4b3141bbd33808152dfac45b upstream.

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

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

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

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

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

    commit 84bd64993f916bcf86270c67686ecf4cea7b8933 upstream.

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

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

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

    aacraid: Fix memory leak in aac_fib_map_free

    commit f88fa79a61726ce9434df9b4aede36961f709f17 upstream.

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

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

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

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

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

    sg: fix dxferp in from_to case

    commit 5ecee0a3ee8d74b6950cb41e8989b0c2174568d4 upstream.

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

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

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

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

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

    x86/iopl: Fix iopl capability check on Xen PV

    commit c29016cf41fe9fa994a5ecca607cf5f1cd98801e upstream.

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

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

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

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

    commit d1fbefcb3aa608599a3c9e4582cbeeb6ba6c8939 upstream.

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

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

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

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

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

    x86: Rename X86_CR4_RDWRGSFS to X86_CR4_FSGSBASE

    commit afcbf13fa6d53d8a97eafaca1dcb344331d2ce0c upstream.

    Rename X86_CR4_RDWRGSFS to X86_CR4_FSGSBASE to match the SDM.

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

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

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

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

    commit 2fc016c5bd8aad2e201cdf71b9fb4573f94775bd upstream.

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

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

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

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

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

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

    commit b84106b4e2290c081cdab521fa832596cdfea246 upstream.

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

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

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

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

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

    EDAC, amd64_edac: Shift wrapping issue in f1x_get_norm_dct_addr()

    commit 6f3508f61c814ee852c199988a62bd954c50dfc1 upstream.

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

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

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

    KVM: fix spin_lock_init order on x86

    commit e9ad4ec8379ad1ba6f68b8ca1c26b50b5ae0a327 upstream.

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

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

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

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

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

    KVM: i8254: change PIT discard tick policy

    commit 7dd0fdff145c5be7146d0ac06732ae3613412ac1 upstream.

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

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

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

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

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

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

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

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

    commit c4586256f0c440bc2bdb29d2cbb915f0ca785d26 upstream.

    Similar to the fix in 40413dcb7b273bda681dca38e6ff0bbb3728ef11

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

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

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

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

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

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

    commit cb984d101b30eb7478d32df56a0023e4603cba7f upstream.

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

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

    Neaten comments using normal kernel commenting style.

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

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

    ext4: fix NULL pointer dereference in ext4_mark_inode_dirty()

    commit 5e1021f2b6dff1a86a468a1424d59faae2bc63c1 upstream.

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

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

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

      trap cleanup 0 1 2 3 9 15

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

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

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

      dmsetup create $devname --table "$good_tab"

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

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

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

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

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

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

    commit b7a584598aea7ca73140cb87b40319944dd3393f upstream.

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

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

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

    Fixes XSA-171.

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

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

    pipe: Fix buffer offset after partially failed read

    Quoting the RHEL advisory:

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

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

    References: https://rhn.redhat.com/errata/RHSA-2016-0103.html
    Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
    Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>Linux 3.10.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>parisc: Filter out spurious interrupts in PA-RISC irq handler</title>
<updated>2016-08-26T18:02:06+00:00</updated>
<author>
<name>Helge Deller</name>
<email>deller@gmx.de</email>
</author>
<published>2015-09-03T20:45:21+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=f5d107064123577afbc394d634004d2672f2cd44'/>
<id>urn:sha1:f5d107064123577afbc394d634004d2672f2cd44</id>
<content type='text'>
commit b1b4e435e4ef7de77f07bf2a42c8380b960c2d44 upstream.

When detecting a serial port on newer PA-RISC machines (with iosapic) we have a
long way to go to find the right IRQ line, registering it, then registering the
serial port and the irq handler for the serial port. During this phase spurious
interrupts for the serial port may happen which then crashes the kernel because
the action handler might not have been set up yet.

So, basically it's a race condition between the serial port hardware and the
CPU which sets up the necessary fields in the irq sructs. The main reason for
this race is, that we unmask the serial port irqs too early without having set
up everything properly before (which isn't easily possible because we need the
IRQ number to register the serial ports).

This patch is a work-around for this problem. It adds checks to the CPU irq
handler to verify if the IRQ action field has been initialized already. If not,
we just skip this interrupt (which isn't critical for a serial port at bootup).
The real fix would probably involve rewriting all PA-RISC specific IRQ code
(for CPU, IOSAPIC, GSC and EISA) to use IRQ domains with proper parenting of
the irq chips and proper irq enabling along this line.

This bug has been in the PA-RISC port since the beginning, but the crashes
happened very rarely with currently used hardware.  But on the latest machine
which I bought (a C8000 workstation), which uses the fastest CPUs (4 x PA8900,
1GHz) and which has the largest possible L1 cache size (64MB each), the kernel
crashed at every boot because of this race. So, without this patch the machine
would currently be unuseable.

For the record, here is the flow logic:
1. serial_init_chip() in 8250_gsc.c calls iosapic_serial_irq().
2. iosapic_serial_irq() calls txn_alloc_irq() to find the irq.
3. iosapic_serial_irq() calls cpu_claim_irq() to register the CPU irq
4. cpu_claim_irq() unmasks the CPU irq (which it shouldn't!)
5. serial_init_chip() then registers the 8250 port.
Problems:
- In step 4 the CPU irq shouldn't have been registered yet, but after step 5
- If serial irq happens between 4 and 5 have finished, the kernel will crash

Signed-off-by: Helge Deller &lt;deller@gmx.de&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>first commit</title>
<updated>2016-08-15T02:19:42+00:00</updated>
<author>
<name>Meizu OpenSource</name>
<email>patchwork@meizu.com</email>
</author>
<published>2016-08-15T02:19:42+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/android_kernel_m2note/commit/?id=d2e1446d81725c351dc73a03b397ce043fb18452'/>
<id>urn:sha1:d2e1446d81725c351dc73a03b397ce043fb18452</id>
<content type='text'>
</content>
</entry>
</feed>
