commit 48763742b1bceb119b04656b8dd06e0617dfa89a
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Wed May 4 14:51:35 2016 -0700

    Linux 3.14.68

commit 44a890802b635fb08cf4956ca29ef7cf7686ff6a
Author: NeilBrown <neilb@suse.com>
Date:   Fri Mar 4 17:20:13 2016 +1100

    sunrpc/cache: drop reference when sunrpc_cache_pipe_upcall() detects a race
    
    commit a6ab1e8126d205238defbb55d23661a3a5c6a0d8 upstream.
    
    sunrpc_cache_pipe_upcall() can detect a race if CACHE_PENDING is no longer
    set.  In this case it aborts the queuing of the upcall.
    However it has already taken a new counted reference on "h" and
    doesn't "put" it, even though it frees the data structure holding the reference.
    
    So let's delay the "cache_get" until we know we need it.
    
    Fixes: f9e1aedc6c79 ("sunrpc/cache: remove races with queuing an upcall.")
    Signed-off-by: NeilBrown <neilb@suse.com>
    Signed-off-by: J. Bruce Fields <bfields@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit bfdaced9ab7d00ffa857a23cdfb30d82986d96ee
Author: Guo-Fu Tseng <cooldavid@cooldavid.org>
Date:   Sat Mar 5 08:11:56 2016 +0800

    jme: Fix device PM wakeup API usage
    
    commit 81422e672f8181d7ad1ee6c60c723aac649f538f upstream.
    
    According to Documentation/power/devices.txt
    
    The driver should not use device_set_wakeup_enable() which is the policy
    for user to decide.
    
    Using device_init_wakeup() to initialize dev->power.should_wakeup and
    dev->power.can_wakeup on driver initialization.
    
    And use device_may_wakeup() on suspend to decide if WoL function should
    be enabled on NIC.
    
    Reported-by: Diego Viola <diego.viola@gmail.com>
    Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 560fd2871ea67293e36e00c0af2fc0b2c51e6cd1
Author: Guo-Fu Tseng <cooldavid@cooldavid.org>
Date:   Sat Mar 5 08:11:55 2016 +0800

    jme: Do not enable NIC WoL functions on S0
    
    commit 0772a99b818079e628a1da122ac7ee023faed83e upstream.
    
    Otherwise it might be back on resume right after going to suspend in
    some hardware.
    
    Reported-by: Diego Viola <diego.viola@gmail.com>
    Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 85a3952d73f4f1707285a664e3dbd0f4796e050e
Author: Fabio Estevam <fabio.estevam@nxp.com>
Date:   Mon Feb 22 09:01:53 2016 -0300

    bus: imx-weim: Take the 'status' property value into account
    
    commit 33b96d2c9579213cf3f36d7b29841b1e464750c4 upstream.
    
    Currently we have an incorrect behaviour when multiple devices
    are present under the weim node. For example:
    
    &weim {
    	...
    	status = "okay";
    
    	sram@0,0 {
    		...
            	status = "okay";
    	};
    
    	mram@0,0 {
    		...
            	status = "disabled";
        	};
    };
    
    In this case only the 'sram' device should be probed and not 'mram'.
    
    However what happens currently is that the status variable is ignored,
    causing the 'sram' device to be disabled and 'mram' to be enabled.
    
    Change the weim_parse_dt() function to use
    for_each_available_child_of_node()so that the devices marked with
    'status = disabled' are not probed.
    
    Suggested-by: Wolfgang Netbal <wolfgang.netbal@sigmatek.at>
    Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
    Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
    Acked-by: Shawn Guo <shawnguo@kernel.org>
    Signed-off-by: Olof Johansson <olof@lixom.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d37eea97c2b405f85b4c21efd2051b3b6dd85b4b
Author: Pali Rohár <pali.rohar@gmail.com>
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 <pali.rohar@gmail.com>
    Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Signed-off-by: Tony Lindgren <tony@atomide.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d601c53fb26576639e264612f0cc6eb7d6131de1
Author: Borislav Petkov <bp@suse.de>
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 <acme@redhat.com>
    Signed-off-by: Borislav Petkov <bp@suse.de>
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Davidlohr Bueso <dbueso@suse.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Mel Gorman <mgorman@suse.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    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 <mingo@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f7aecad1b5338e309496c2604e48b0e418b08c7c
Author: Vitaly Kuznetsov <vkuznets@redhat.com>
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 > /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 <vkuznets@redhat.com>
    Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
    [ 3chas3@gmail.com: rebase to 3.14-stable ]
    Signed-off-by: Chas Williams <3chas3@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 703d87a503141999a6749263d0a8caf038ce5b75
Author: Vasily Kulikov <segoon@openwall.com>
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 <segoon@openwall.com>
    Cc: Solar Designer <solar@openwall.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 085dc0f08eb61f6cab5224f1f09d8a2d3ff6095a
Author: Geert Uytterhoeven <geert+renesas@glider.be>
Date:   Tue Jan 5 19:36:37 2016 +0100

    serial: sh-sci: Remove cpufreq notifier to fix crash/deadlock
    
    commit ff1cab374ad98f4b9f408525ca9c08992b4ed784 upstream.
    
    The BSP team noticed that there is spin/mutex lock issue on sh-sci when
    CPUFREQ is used.  The issue is that the notifier function may call
    mutex_lock() while the spinlock is held, which can lead to a BUG().
    This may happen if CPUFREQ is changed while another CPU calls
    clk_get_rate().
    
    Taking the spinlock was added to the notifier function in commit
    e552de2413edad1a ("sh-sci: add platform device private data"), to
    protect the list of serial ports against modification during traversal.
    At that time the Common Clock Framework didn't exist yet, and
    clk_get_rate() just returned clk->rate without taking a mutex.
    Note that since commit d535a2305facf9b4 ("serial: sh-sci: Require a
    device per port mapping."), there's no longer a list of serial ports to
    traverse, and taking the spinlock became superfluous.
    
    To fix the issue, just remove the cpufreq notifier:
      1. The notifier doesn't work correctly: all it does is update stored
         clock rates; it does not update the divider in the hardware.
         The divider will only be updated when calling sci_set_termios().
         I believe this was broken back in 2004, when the old
         drivers/char/sh-sci.c driver (where the notifier did update the
         divider) was replaced by drivers/serial/sh-sci.c (where the
         notifier just updated port->uartclk).
         Cfr. full-history-linux commits 6f8deaef2e9675d9 ("[PATCH] sh: port
         sh-sci driver to the new API") and 3f73fe878dc9210a ("[PATCH]
         Remove old sh-sci driver").
      2. On modern SoCs, the sh-sci parent clock rate is no longer related
         to the CPU clock rate anyway, so using a cpufreq notifier is
         futile.
    
    Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 49b0033802c7eea979afd49ba89ba515f13dd373
Author: Eryu Guan <guaneryu@gmail.com>
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 >/dev/null 2>&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" && dmsetup resume $devname
      echo 3 > /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 <guaneryu@gmail.com>
    Signed-off-by: Theodore Ts'o <tytso@mit.edu>
    Cc: Jan Kara <jack@suse.cz>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f3f0b32c2cd26d9caf0698b39aa57d30f1de7e01
Author: Michael Hennerich <michael.hennerich@analog.com>
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 <michael.hennerich@analog.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 6e2e59c3d3df493786fb1f39f7ad93205c9d1385
Author: Geert Uytterhoeven <geert@linux-m68k.org>
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 <geert@linux-m68k.org>
    Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 48257cde6bf54aae77fee7641b483369e061c21f
Author: Alexander Kochetkov <al.kochet@gmail.com>
Date:   Sun Mar 6 12:43:57 2016 +0300

    rtc: hym8563: fix invalid year calculation
    
    commit d5861262210067fc01b2fb4f7af2fd85a3453f15 upstream.
    
    Year field must be in BCD format, according to
    hym8563 datasheet.
    
    Due to the bug year 2016 became 2010.
    
    Fixes: dcaf03849352 ("rtc: add hym8563 rtc-driver")
    Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com>
    Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 314e5b76c3fc8263f4e6187718ab32ee27cf7c98
Author: Ben Hutchings <ben@decadent.org.uk>
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 <eric.andersson@unixphere.com>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    Acked-by: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 4d05780f35645400464fdd8f3c3707229c61e30a
Author: Sushaanth Srirangapathi <sushaanth.s@ti.com>
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 <sushaanth.s@ti.com>
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 2c88eab5fd52013d0f9b6ec093b9bc67639ce9db
Author: Arnd Bergmann <arnd@arndb.de>
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>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 & misc)")
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Rusty Russell <rusty@rustcorp.com.au>
    Cc: Tim Waugh <tim@cyberelk.net>
    Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
    Cc: Jens Axboe <axboe@fb.com>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c9104ee05af3ecb2943872287da3d576b145c55f
Author: Ignat Korchagin <ignat.korchagin@gmail.com>
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->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->actual_length is filled. Since the input for
    urb->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->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 <ignat.korchagin@gmail.com>
    Cc: Sasha Levin <sasha.levin@oracle.com>
    Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 89c269f2b499c94e11ba5c7b2332fbb08a84b626
Author: Roman Pen <roman.penyaev@profitbricks.com>
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->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 > /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]  [<ffffffff815b0920>] ? bit_wait+0x60/0x60
    [  601.351444]  [<ffffffff815b01d5>] schedule+0x35/0x80
    [  601.351709]  [<ffffffff815b2dd2>] schedule_timeout+0x192/0x230
    [  601.351958]  [<ffffffff812d43f7>] ? blk_flush_plug_list+0xc7/0x220
    [  601.352208]  [<ffffffff810bd737>] ? ktime_get+0x37/0xa0
    [  601.352446]  [<ffffffff815b0920>] ? bit_wait+0x60/0x60
    [  601.352688]  [<ffffffff815af784>] io_schedule_timeout+0xa4/0x110
    [  601.352951]  [<ffffffff815b3a4e>] ? _raw_spin_unlock_irqrestore+0xe/0x10
    [  601.353196]  [<ffffffff815b093b>] bit_wait_io+0x1b/0x70
    [  601.353440]  [<ffffffff815b056d>] __wait_on_bit+0x5d/0x90
    [  601.353689]  [<ffffffff81127bd0>] wait_on_page_bit+0xc0/0xd0
    [  601.353958]  [<ffffffff81096db0>] ? autoremove_wake_function+0x40/0x40
    [  601.354200]  [<ffffffff81127cc4>] __filemap_fdatawait_range+0xe4/0x140
    [  601.354441]  [<ffffffff81127d34>] filemap_fdatawait_range+0x14/0x30
    [  601.354688]  [<ffffffff81129a9f>] filemap_write_and_wait_range+0x3f/0x70
    [  601.354932]  [<ffffffff811ced3b>] blkdev_fsync+0x1b/0x50
    [  601.355193]  [<ffffffff811c82d9>] vfs_fsync_range+0x49/0xa0
    [  601.355432]  [<ffffffff811cf45a>] blkdev_write_iter+0xca/0x100
    [  601.355679]  [<ffffffff81197b1a>] __vfs_write+0xaa/0xe0
    [  601.355925]  [<ffffffff81198379>] vfs_write+0xa9/0x1a0
    [  601.356164]  [<ffffffff811c59d8>] 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->ctx_map[0] bit marked
      kblockd_schedule...() returns 1
      <schedule to kblockd workqueue>
                                             request B inserted
                                             STORE hctx->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->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 <mfence>, 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 <roman.penyaev@profitbricks.com>
    Cc: Gioh Kim <gi-oh.kim@profitbricks.com>
    Cc: Michael Wang <yun.wang@profitbricks.com>
    Cc: Tejun Heo <tj@kernel.org>
    Cc: Jens Axboe <axboe@kernel.dk>
    Cc: linux-block@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c211fd3c2ff20261df2ed2073d24f1ef8d117a8c
Author: Laszlo Ersek <lersek@redhat.com>
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 <chris@chris-wilson.co.uk>
    Signed-off-by: Laszlo Ersek <lersek@redhat.com>
    Cc: Peter Jones <pjones@redhat.com>
    Cc: Matthew Garrett <mjg59@coreos.com>
    Cc: Jason Andryuk <jandryuk@gmail.com>
    Cc: Jani Nikula <jani.nikula@linux.intel.com>
    Link: http://thread.gmane.org/gmane.comp.freedesktop.xorg.drivers.intel/86906
    Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit af3d9704d00b55149aad79af116e0712812ae355
Author: Sugar Zhang <sugar.zhang@rock-chips.com>
Date:   Fri Mar 18 14:54:22 2016 +0800

    ASoC: rt5640: Correct the digital interface data select
    
    commit 653aa4645244042826f105aab1be3d01b3d493ca upstream.
    
    this patch corrects the interface adc/dac control register definition
    according to datasheet.
    
    Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit db7dac1e2da9bba1e05a73f4d6e6fac0a85315fd
Author: Arnd Bergmann <arnd@arndb.de>
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 <arnd@arndb.de>
    Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 4293f979b8eaf793acb5b2be9f10545d39266f7c
Author: Tony Luck <tony.luck@intel.com>
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 <tony.luck@intel.com>
    Acked-by: Aristeu Rozanski <aris@redhat.com>
    Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
    Cc: linux-edac <linux-edac@vger.kernel.org>
    Link: http://lkml.kernel.org/r/72937355dd92318d2630979666063f8a2853495b.1461864507.git.tony.luck@intel.com
    Signed-off-by: Borislav Petkov <bp@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 7ad693ee6769cdcf3d9fb3f1dd83b885a615b1ae
Author: Javier Martinez Canillas <javier@osg.samsung.com>
Date:   Sat Apr 16 21:14:52 2016 -0400

    i2c: exynos5: Fix possible ABBA deadlock by keeping I2C clock prepared
    
    commit 10ff4c5239a137abfc896ec73ef3d15a0f86a16a upstream.
    
    The exynos5 I2C controller driver always prepares and enables a clock
    before using it and then disables unprepares it when the clock is not
    used anymore.
    
    But this can cause a possible ABBA deadlock in some scenarios since a
    driver that uses regmap to access its I2C registers, will first grab
    the regmap lock and then the I2C xfer function will grab the prepare
    lock when preparing the I2C clock. But since the clock driver also
    uses regmap for I2C accesses, preparing a clock will first grab the
    prepare lock and then the regmap lock when using the regmap API.
    
    An example of this happens on the Exynos5422 Odroid XU4 board where a
    s2mps11 PMIC is used and both the s2mps11 regulators and clk drivers
    share the same I2C regmap.
    
    The possible deadlock is reported by the kernel lockdep:
    
      Possible unsafe locking scenario:
    
            CPU0                    CPU1
            ----                    ----
       lock(sec_core:428:(regmap)->lock);
                                    lock(prepare_lock);
                                    lock(sec_core:428:(regmap)->lock);
       lock(prepare_lock);
    
      *** DEADLOCK ***
    
    Fix it by leaving the code prepared on probe and use {en,dis}able in
    the I2C transfer function.
    
    This patch is similar to commit 34e81ad5f0b6 ("i2c: s3c2410: fix ABBA
    deadlock by keeping clock prepared") that fixes the same bug in other
    driver for an I2C controller found in Samsung SoCs.
    
    Reported-by: Anand Moon <linux.amoon@gmail.com>
    Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
    Reviewed-by: Anand Moon <linux.amoon@gmail.com>
    Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
    Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 43bd2c6120632bb8c391ad2eef9b19ae900e4139
Author: Michael Ellerman <mpe@ellerman.id.au>
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 & rxdma to dma_addr_t.
    
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
    Fixes: ea8daa7b9784
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e7ae4de700959f0483f9cacaeed2ab8cb8f82195
Author: Keerthy <j-keerthy@ti.com>
Date:   Thu Apr 14 10:29:16 2016 +0530

    pinctrl: single: Fix pcs_parse_bits_in_pinctrl_entry to use __ffs than ffs
    
    commit 56b367c0cd67d4c3006738e7dc9dda9273fd2bfe upstream.
    
    pcs_parse_bits_in_pinctrl_entry uses ffs which gives bit indices
    ranging from 1 to MAX. This leads to a corner case where we try to request
    the pin number = MAX and fails.
    
    bit_pos value is being calculted using ffs. pin_num_from_lsb uses
    bit_pos value. pins array is populated with:
    
    pin + pin_num_from_lsb.
    
    The above is 1 more than usual bit indices as bit_pos uses ffs to compute
    first set bit. Hence the last of the pins array is populated with the MAX
    value and not MAX - 1 which causes error when we call pin_request.
    
    mask_pos is rightly calculated as ((pcs->fmask) << (bit_pos - 1))
    Consequently val_pos and submask are correct.
    
    Hence use __ffs which gives (ffs(x) - 1) as the first bit set.
    
    fixes: 4e7e8017a8 ("pinctrl: pinctrl-single: enhance to configure multiple pins of different modules")
    Signed-off-by: Keerthy <j-keerthy@ti.com>
    Acked-by: Tony Lindgren <tony@atomide.com>
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f090502c9f10046d293508f022ed00796a541b37
Author: Vladis Dronov <vdronov@redhat.com>
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 <ralf@spenneberg.net>
    Signed-off-by: Vladis Dronov <vdronov@redhat.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 9b59ea7e026692145136a71f86df0ec2b3c15154
Author: Dmitry Ivanov <dmitrijs.ivanovs@ubnt.com>
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")
    Signed-off-by: Dmitry Ivanov <dima@ubnt.com>
    [rewrite commit message]
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit fb8d8468d0da56f6b5eea1bae31492ca5253e3b3
Author: Herbert Xu <herbert@gondor.apana.org.au>
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 <patrick.meyer@vasgard.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 8742a4b68122548d0534e34969dc8ad5fed5312d
Author: Tom Lendacky <thomas.lendacky@amd.com>
Date:   Wed Apr 13 10:52:25 2016 -0500

    crypto: ccp - Prevent information leakage on export
    
    commit f709b45ec461b548c41a00044dba1f1b572783bf upstream.
    
    Prevent information from leaking to userspace by doing a memset to 0 of
    the export state structure before setting the structure values and copying
    it. This prevents un-initialized padding areas from being copied into the
    export area.
    
    Reported-by: Ben Hutchings <ben@decadent.org.uk>
    Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 0824da19fbad3ffcf53be9a20a2cf40af4c06a25
Author: John Keeping <john@metanate.com>
Date:   Wed Nov 18 11:17:25 2015 +0000

    drm/qxl: fix cursor position with non-zero hotspot
    
    commit d59a1f71ff1aeda4b4630df92d3ad4e3b1dfc885 upstream.
    
    The SPICE protocol considers the position of a cursor to be the location
    of its active pixel on the display, so the cursor is drawn with its
    top-left corner at "(x - hot_spot_x, y - hot_spot_y)" but the DRM cursor
    position gives the location where the top-left corner should be drawn,
    with the hotspot being a hint for drivers that need it.
    
    This fixes the location of the window resize cursors when using Fluxbox
    with the QXL DRM driver and both the QXL and modesetting X drivers.
    
    Signed-off-by: John Keeping <john@metanate.com>
    Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Link: http://patchwork.freedesktop.org/patch/msgid/1447845445-2116-1-git-send-email-john@metanate.com
    Signed-off-by: Jani Nikula <jani.nikula@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 74add767099f654f0f9ffe4b3529af6d0ed36cdd
Author: Davidlohr Bueso <dave@stgolabs.net>
Date:   Wed Apr 20 20:09:24 2016 -0700

    futex: Acknowledge a new waiter in counter before plist
    
    commit fe1bce9e2107ba3a8faffe572483b6974201a0e6 upstream.
    
    Otherwise an incoming waker on the dest hash bucket can miss
    the waiter adding itself to the plist during the lockless
    check optimization (small window but still the correct way
    of doing this); similarly to the decrement counterpart.
    
    Suggested-by: Peter Zijlstra <peterz@infradead.org>
    Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
    Cc: Davidlohr Bueso <dave@stgolabs.net>
    Cc: bigeasy@linutronix.de
    Cc: dvhart@infradead.org
    Link: http://lkml.kernel.org/r/1461208164-29150-1-git-send-email-dave@stgolabs.net
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit c216658f5fda233ae3c27f8fbfe3b2498ebe75ab
Author: Andy Lutomirski <luto@kernel.org>
Date:   Wed Mar 16 14:14:21 2016 -0700

    x86/iopl/64: Properly context-switch IOPL on Xen PV
    
    commit b7a584598aea7ca73140cb87b40319944dd3393f upstream.
    
    On Xen PV, regs->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 <JBeulich@suse.com>
    Signed-off-by: Andy Lutomirski <luto@kernel.org>
    Cc: Andrew Cooper <andrew.cooper3@citrix.com>
    Cc: Andy Lutomirski <luto@amacapital.net>
    Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Brian Gerst <brgerst@gmail.com>
    Cc: David Vrabel <david.vrabel@citrix.com>
    Cc: Denys Vlasenko <dvlasenk@redhat.com>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Jan Beulich <JBeulich@suse.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Link: http://lkml.kernel.org/r/693c3bd7aeb4d3c27c92c622b7d0f554a458173c.1458162709.git.luto@kernel.org
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    [ kamal: backport to 3.19-stable: no X86_FEATURE_XENPV so just call
      xen_pv_domain() directly ]
    Acked-by: Andy Lutomirski <luto@kernel.org>
    Signed-off-by: Kamal Mostafa <kamal@canonical.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e972203d810f7e51c0669fa837780aee4f9f67b1
Author: Rui Salvaterra <rsalvaterra@gmail.com>
Date:   Sat Apr 9 22:05:34 2016 +0100

    lib: lz4: fixed zram with lz4 on big endian machines
    
    commit 3e26a691fe3fe1e02a76e5bab0c143ace4b137b4 upstream.
    
    Based on Sergey's test patch [1], this fixes zram with lz4 compression
    on big endian cpus.
    
    Note that the 64-bit preprocessor test is not a cleanup, it's part of
    the fix, since those identifiers are bogus (for example, __ppc64__
    isn't defined anywhere else in the kernel, which means we'd fall into
    the 32-bit definitions on ppc64).
    
    Tested on ppc64 with no regression on x86_64.
    
    [1] http://marc.info/?l=linux-kernel&m=145994470805853&w=4
    
    Suggested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
    Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
    Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 4df77f7c53c6c4a424019560cb94615d743dda9e
Author: Robert Dobrowolski <robert.dobrowolski@linux.intel.com>
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.
    
    Signed-off-by: Robert Dobrowolski <robert.dobrowolski@linux.intel.com>
    Acked-by: Alan Stern <stern@rowland.harvard.edu>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 82522628d9a8db178b9e94da908c19364cc62c45
Author: Lu Baolu <baolu.lu@linux.intel.com>
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 <lpc.li@hisilicon.com>
    Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
    Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 523ef4db4dc8f2bdbe10262a7931d01a0c02d560
Author: Jerome Marchand <jmarchan@redhat.com>
Date:   Wed Apr 6 14:06:48 2016 +0100

    assoc_array: don't call compare_object() on a node
    
    commit 8d4a2ec1e0b41b0cf9a0c5cd4511da7f8e4f3de2 upstream.
    
    Changes since V1: fixed the description and added KASan warning.
    
    In assoc_array_insert_into_terminal_node(), we call the
    compare_object() method on all non-empty slots, even when they're
    not leaves, passing a pointer to an unexpected structure to
    compare_object(). Currently it causes an out-of-bound read access
    in keyring_compare_object detected by KASan (see below). The issue
    is easily reproduced with keyutils testsuite.
    Only call compare_object() when the slot is a leave.
    
    KASan warning:
    ==================================================================
    BUG: KASAN: slab-out-of-bounds in keyring_compare_object+0x213/0x240 at addr ffff880060a6f838
    Read of size 8 by task keyctl/1655
    =============================================================================
    BUG kmalloc-192 (Not tainted): kasan: bad access detected
    -----------------------------------------------------------------------------
    
    Disabling lock debugging due to kernel taint
    INFO: Allocated in assoc_array_insert+0xfd0/0x3a60 age=69 cpu=1 pid=1647
    	___slab_alloc+0x563/0x5c0
    	__slab_alloc+0x51/0x90
    	kmem_cache_alloc_trace+0x263/0x300
    	assoc_array_insert+0xfd0/0x3a60
    	__key_link_begin+0xfc/0x270
    	key_create_or_update+0x459/0xaf0
    	SyS_add_key+0x1ba/0x350
    	entry_SYSCALL_64_fastpath+0x12/0x76
    INFO: Slab 0xffffea0001829b80 objects=16 used=8 fp=0xffff880060a6f550 flags=0x3fff8000004080
    INFO: Object 0xffff880060a6f740 @offset=5952 fp=0xffff880060a6e5d1
    
    Bytes b4 ffff880060a6f730: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    Object ffff880060a6f740: d1 e5 a6 60 00 88 ff ff 0e 00 00 00 00 00 00 00  ...`............
    Object ffff880060a6f750: 02 cf 8e 60 00 88 ff ff 02 c0 8e 60 00 88 ff ff  ...`.......`....
    Object ffff880060a6f760: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    Object ffff880060a6f770: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    Object ffff880060a6f780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    Object ffff880060a6f790: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    Object ffff880060a6f7a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    Object ffff880060a6f7b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    Object ffff880060a6f7c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    Object ffff880060a6f7d0: 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    Object ffff880060a6f7e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    Object ffff880060a6f7f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    CPU: 0 PID: 1655 Comm: keyctl Tainted: G    B           4.5.0-rc4-kasan+ #291
    Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
     0000000000000000 000000001b2800b4 ffff880060a179e0 ffffffff81b60491
     ffff88006c802900 ffff880060a6f740 ffff880060a17a10 ffffffff815e2969
     ffff88006c802900 ffffea0001829b80 ffff880060a6f740 ffff880060a6e650
    Call Trace:
     [<ffffffff81b60491>] dump_stack+0x85/0xc4
     [<ffffffff815e2969>] print_trailer+0xf9/0x150
     [<ffffffff815e9454>] object_err+0x34/0x40
     [<ffffffff815ebe50>] kasan_report_error+0x230/0x550
     [<ffffffff819949be>] ? keyring_get_key_chunk+0x13e/0x210
     [<ffffffff815ec62d>] __asan_report_load_n_noabort+0x5d/0x70
     [<ffffffff81994cc3>] ? keyring_compare_object+0x213/0x240
     [<ffffffff81994cc3>] keyring_compare_object+0x213/0x240
     [<ffffffff81bc238c>] assoc_array_insert+0x86c/0x3a60
     [<ffffffff81bc1b20>] ? assoc_array_cancel_edit+0x70/0x70
     [<ffffffff8199797d>] ? __key_link_begin+0x20d/0x270
     [<ffffffff8199786c>] __key_link_begin+0xfc/0x270
     [<ffffffff81993389>] key_create_or_update+0x459/0xaf0
     [<ffffffff8128ce0d>] ? trace_hardirqs_on+0xd/0x10
     [<ffffffff81992f30>] ? key_type_lookup+0xc0/0xc0
     [<ffffffff8199e19d>] ? lookup_user_key+0x13d/0xcd0
     [<ffffffff81534763>] ? memdup_user+0x53/0x80
     [<ffffffff819983ea>] SyS_add_key+0x1ba/0x350
     [<ffffffff81998230>] ? key_get_type_from_user.constprop.6+0xa0/0xa0
     [<ffffffff828bcf4e>] ? retint_user+0x18/0x23
     [<ffffffff8128cc7e>] ? trace_hardirqs_on_caller+0x3fe/0x580
     [<ffffffff81004017>] ? trace_hardirqs_on_thunk+0x17/0x19
     [<ffffffff828bc432>] entry_SYSCALL_64_fastpath+0x12/0x76
    Memory state around the buggy address:
     ffff880060a6f700: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00
     ffff880060a6f780: 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc
    >ffff880060a6f800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                            ^
     ffff880060a6f880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
     ffff880060a6f900: fc fc fc fc fc fc 00 00 00 00 00 00 00 00 00 00
    ==================================================================
    
    Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
    Signed-off-by: David Howells <dhowells@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit aeb83898d1f213ee05797490adf1db08b571f34d
Author: Lokesh Vutla <lokeshvutla@ti.com>
Date:   Sat Mar 26 23:08:55 2016 -0600

    ARM: OMAP2+: hwmod: Fix updating of sysconfig register
    
    commit 3ca4a238106dedc285193ee47f494a6584b6fd2f upstream.
    
    Commit 127500ccb766f ("ARM: OMAP2+: Only write the sysconfig on idle
    when necessary") talks about verification of sysconfig cache value before
    updating it, only during idle path. But the patch is adding the
    verification in the enable path. So, adding the check in a proper place
    as per the commit description.
    
    Not keeping this check during enable path as there is a chance of losing
    context and it is safe to do on idle as the context of the register will
    never be lost while the device is active.
    
    Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
    Acked-by: Tero Kristo <t-kristo@ti.com>
    Cc: Jon Hunter <jonathanh@nvidia.com>
    Fixes: commit 127500ccb766 "ARM: OMAP2+: Only write the sysconfig on idle when necessary"
    [paul@pwsan.com: appears to have been caused by my own mismerge of the
     originally posted patch]
    Signed-off-by: Paul Walmsley <paul@pwsan.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>