commit 735fbc72bee7f994b4dc42836f7add4b1b2fd8c4
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Thu Jul 31 14:51:43 2014 -0700

    Linux 3.14.15

commit 25a59eef98fa3bb7993ea5fe0e0ea2cd08aab02a
Author: Guenter Roeck <linux@roeck-us.net>
Date:   Tue Jun 17 15:51:02 2014 -0700

    platform_get_irq: Revert to platform_get_resource if of_irq_get fails
    
    commit aff008ad813c7cf3cfe7b532e7ba2c526c136f22 upstream.
    
    Commits 9ec36ca (of/irq: do irq resolution in platform_get_irq)
    and ad69674 (of/irq: do irq resolution in platform_get_irq_byname)
    change the semantics of platform_get_irq and platform_get_irq_byname
    to always rely on devicetree information if devicetree is enabled
    and if a devicetree node is attached to the device. The functions
    now return an error if the devicetree data does not include interrupt
    information, even if the information is available as platform resource
    data.
    
    This causes mfd client drivers to fail if the interrupt number is
    passed via platform resources. Therefore, if of_irq_get fails, try
    platform_get_resource as method of last resort. This restores the
    original functionality for drivers depending on platform resources
    to get irq information.
    
    Cc: Russell King <linux@arm.linux.org.uk>
    Cc: Tony Lindgren <tony@atomide.com>
    Cc: Grant Likely <grant.likely@linaro.org>
    Cc: Grygorii Strashko <grygorii.strashko@ti.com>
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    Acked-by: Rob Herring <robh@kernel.org>
    [ Guenter Roeck: backported to 3.15 ]
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>

commit 3f9e431955574505f0df2aa1e95686023a9d5977
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Tue Jun 10 14:06:25 2014 +0200

    nl80211: move set_qos_map command into split state
    
    commit 02df00eb0019e7d15a1fcddebe4d020226c1ccda upstream.
    
    The non-split wiphy state shouldn't be increased in size
    so move the new set_qos_map command into the split if
    statement.
    
    Fixes: fa9ffc745610 ("cfg80211: Add support for QoS mapping")
    Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 5d608f59360e7622c2640853d8b70b77242c1a93
Author: Michael Brown <mbrown@fensystems.co.uk>
Date:   Thu Jul 10 12:26:20 2014 +0100

    x86/efi: Include a .bss section within the PE/COFF headers
    
    commit c7fb93ec51d462ec3540a729ba446663c26a0505 upstream.
    
    The PE/COFF headers currently describe only the initialised-data
    portions of the image, and result in no space being allocated for the
    uninitialised-data portions.  Consequently, the EFI boot stub will end
    up overwriting unexpected areas of memory, with unpredictable results.
    
    Fix by including a .bss section in the PE/COFF headers (functionally
    equivalent to the init_size field in the bzImage header).
    
    Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
    Cc: Thomas Bächler <thomas@archlinux.org>
    Cc: Josh Boyer <jwboyer@fedoraproject.org>
    Signed-off-by: Matt Fleming <matt.fleming@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b7fd0d5939ff4b94881ab71ebebf790deef49ddd
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Sat Jul 26 14:52:01 2014 -0700

    Fix gcc-4.9.0 miscompilation of load_balance() in scheduler
    
    commit 2062afb4f804afef61cbe62a30cac9a46e58e067 upstream.
    
    Michel Dänzer and a couple of other people reported inexplicable random
    oopses in the scheduler, and the cause turns out to be gcc mis-compiling
    the load_balance() function when debugging is enabled.  The gcc bug
    apparently goes back to gcc-4.5, but slight optimization changes means
    that it now showed up as a problem in 4.9.0 and 4.9.1.
    
    The instruction scheduling problem causes gcc to schedule a spill
    operation to before the stack frame has been created, which in turn can
    corrupt the spilled value if an interrupt comes in.  There may be other
    effects of this bug too, but that's the code generation problem seen in
    Michel's case.
    
    This is fixed in current gcc HEAD, but the workaround as suggested by
    Markus Trippelsdorf is pretty simple: use -fno-var-tracking-assignments
    when compiling the kernel, which disables the gcc code that causes the
    problem.  This can result in slightly worse debug information for
    variable accesses, but that is infinitely preferable to actual code
    generation problems.
    
    Doing this unconditionally (not just for CONFIG_DEBUG_INFO) also allows
    non-debug builds to verify that the debug build would be identical: we
    can do
    
        export GCC_COMPARE_DEBUG=1
    
    to make gcc internally verify that the result of the build is
    independent of the "-g" flag (it will make the compiler build everything
    twice, toggling the debug flag, and compare the results).
    
    Without the "-fno-var-tracking-assignments" option, the build would fail
    (even with 4.8.3 that didn't show the actual stack frame bug) with a gcc
    compare failure.
    
    See also gcc bugzilla:
    
      https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61801
    
    Reported-by: Michel Dänzer <michel@daenzer.net>
    Suggested-by: Markus Trippelsdorf <markus@trippelsdorf.de>
    Cc: Jakub Jelinek <jakub@redhat.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 6d623a69245bab40c4fdc70b989e68cd9088ba78
Author: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Date:   Wed Jul 23 14:00:19 2014 -0700

    mm: hugetlb: fix copy_hugetlb_page_range()
    
    commit 0253d634e0803a8376a0d88efee0bf523d8673f9 upstream.
    
    Commit 4a705fef9862 ("hugetlb: fix copy_hugetlb_page_range() to handle
    migration/hwpoisoned entry") changed the order of
    huge_ptep_set_wrprotect() and huge_ptep_get(), which leads to breakage
    in some workloads like hugepage-backed heap allocation via libhugetlbfs.
    This patch fixes it.
    
    The test program for the problem is shown below:
    
      $ cat heap.c
      #include <unistd.h>
      #include <stdlib.h>
      #include <string.h>
    
      #define HPS 0x200000
    
      int main() {
      	int i;
      	char *p = malloc(HPS);
      	memset(p, '1', HPS);
      	for (i = 0; i < 5; i++) {
      		if (!fork()) {
      			memset(p, '2', HPS);
      			p = malloc(HPS);
      			memset(p, '3', HPS);
      			free(p);
      			return 0;
      		}
      	}
      	sleep(1);
      	free(p);
      	return 0;
      }
    
      $ export HUGETLB_MORECORE=yes ; export HUGETLB_NO_PREFAULT= ; hugectl --heap ./heap
    
    Fixes 4a705fef9862 ("hugetlb: fix copy_hugetlb_page_range() to handle
    migration/hwpoisoned entry"), so is applicable to -stable kernels which
    include it.
    
    Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
    Reported-by: Guillaume Morin <guillaume@morinfr.org>
    Suggested-by: Guillaume Morin <guillaume@morinfr.org>
    Acked-by: Hugh Dickins <hughd@google.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 a5da3b9eaa8cc2e1f9584fe828deeb6735487405
Author: Jerome Glisse <jglisse@redhat.com>
Date:   Thu Jul 24 16:34:17 2014 -0400

    drm/radeon: fix cut and paste issue for hawaii.
    
    commit 1b2c4869d8247f9e202fa8a73777c34adc62d409 upstream.
    
    This is a halfway fix for hawaii acceleration. More fixes to come
    but hopefully isolated to userspace.
    
    Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 96b9da39c0946eb04481f4f2ca47651015a4de1b
Author: Christian König <christian.koenig@amd.com>
Date:   Wed Jul 23 09:47:58 2014 +0200

    drm/radeon: fix irq ring buffer overflow handling
    
    commit e8c214d22e76dd0ead38f97f8d2dc09aac70d651 upstream.
    
    We must mask out the overflow bit as well, otherwise
    the wptr will never match the rptr again and the interrupt
    handler will loop forever.
    
    Signed-off-by: Christian König <christian.koenig@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 80705fca953d4f2983d5197401de4ce7af7699d3
Author: Sven Wegener <sven.wegener@stealer.net>
Date:   Tue Jul 22 10:26:06 2014 +0200

    x86_32, entry: Store badsys error code in %eax
    
    commit 8142b215501f8b291a108a202b3a053a265b03dd upstream.
    
    Commit 554086d ("x86_32, entry: Do syscall exit work on badsys
    (CVE-2014-4508)") introduced a regression in the x86_32 syscall entry
    code, resulting in syscall() not returning proper errors for undefined
    syscalls on CPUs supporting the sysenter feature.
    
    The following code:
    
    > int result = syscall(666);
    > printf("result=%d errno=%d error=%s\n", result, errno, strerror(errno));
    
    results in:
    
    > result=666 errno=0 error=Success
    
    Obviously, the syscall return value is the called syscall number, but it
    should have been an ENOSYS error. When run under ptrace it behaves
    correctly, which makes it hard to debug in the wild:
    
    > result=-1 errno=38 error=Function not implemented
    
    The %eax register is the return value register. For debugging via ptrace
    the syscall entry code stores the complete register context on the
    stack. The badsys handlers only store the ENOSYS error code in the
    ptrace register set and do not set %eax like a regular syscall handler
    would. The old resume_userspace call chain contains code that clobbers
    %eax and it restores %eax from the ptrace registers afterwards. The same
    goes for the ptrace-enabled call chain. When ptrace is not used, the
    syscall return value is the passed-in syscall number from the untouched
    %eax register.
    
    Use %eax as the return value register in syscall_badsys and
    sysenter_badsys, like a real syscall handler does, and have the caller
    push the value onto the stack for ptrace access.
    
    Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
    Link: http://lkml.kernel.org/r/alpine.LNX.2.11.1407221022380.31021@titan.int.lan.stealer.net
    Reviewed-and-tested-by: Andy Lutomirski <luto@amacapital.net>
    Signed-off-by: H. Peter Anvin <hpa@zytor.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 9b32e18d7ba2838991794893f10bf48805ef01ce
Author: Vasily Averin <vvs@parallels.com>
Date:   Mon Jul 21 12:30:23 2014 +0400

    fs: umount on symlink leaks mnt count
    
    commit 295dc39d941dc2ae53d5c170365af4c9d5c16212 upstream.
    
    Currently umount on symlink blocks following umount:
    
    /vz is separate mount
    
    # ls /vz/ -al | grep test
    drwxr-xr-x.  2 root root       4096 Jul 19 01:14 testdir
    lrwxrwxrwx.  1 root root         11 Jul 19 01:16 testlink -> /vz/testdir
    # umount -l /vz/testlink
    umount: /vz/testlink: not mounted (expected)
    
    # lsof /vz
    # umount /vz
    umount: /vz: device is busy. (unexpected)
    
    In this case mountpoint_last() gets an extra refcount on path->mnt
    
    Signed-off-by: Vasily Averin <vvs@openvz.org>
    Acked-by: Ian Kent <raven@themaw.net>
    Acked-by: Jeff Layton <jlayton@primarydata.com>
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 5b5897f0c11132a9b42ffbee8f93c71ab9504300
Author: Randy Dunlap <rdunlap@infradead.org>
Date:   Fri Jul 25 17:07:47 2014 -0700

    parport: fix menu breakage
    
    commit edffe1b626b39bd7121691dfdecb548431003bbb upstream.
    
    Do not split the PARPORT-related symbols with the new kconfig
    symbol ARCH_MIGHT_HAVE_PC_PARPORT. The split was causing incorrect
    display of these symbols -- they were not being displayed together
    as they should be.
    
    Fixes: d90c3eb31535 "Kconfig cleanup (PARPORT_PC dependencies)"
    
    Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
    Cc: Mark Salter <msalter@redhat.com>
    Cc: Ingo Molnar <mingo@redhat.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 8fb29faae0b352a1e92a113694d6c532dfc0b5bb
Author: Guenter Roeck <linux@roeck-us.net>
Date:   Fri Jul 18 07:31:18 2014 -0700

    hwmon: (smsc47m192) Fix temperature limit and vrm write operations
    
    commit 043572d5444116b9d9ad8ae763cf069e7accbc30 upstream.
    
    Temperature limit clamps are applied after converting the temperature
    from milli-degrees C to degrees C, so either the clamp limit needs
    to be specified in degrees C, not milli-degrees C, or clamping must
    happen before converting to degrees C. Use the latter method to avoid
    overflows.
    
    vrm is an u8, so the written value needs to be limited to [0, 255].
    
    Cc: Axel Lin <axel.lin@ingics.com>
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    Reviewed-by: Jean Delvare <jdelvare@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 0caab30825ef608a48724652dada543b1e36dc17
Author: John David Anglin <dave.anglin@bell.net>
Date:   Wed Jul 23 19:44:12 2014 -0400

    parisc: Remove SA_RESTORER define
    
    commit 20dbea494543aefaace874cc3ec93a39b94b1ec4 upstream.
    
    The sa_restorer field in struct sigaction is obsolete and no longer in
    the parisc implementation.  However, the core code assumes the field is
    present if SA_RESTORER is defined. So, the define needs to be removed.
    
    Signed-off-by: John David Anglin <dave.anglin@bell.net>
    Signed-off-by: Helge Deller <deller@gmx.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit f5eef077185dc9d38b2e5a9ceca4d5dfd5e39023
Author: Silesh C V <svellattu@mvista.com>
Date:   Wed Jul 23 13:59:59 2014 -0700

    coredump: fix the setting of PF_DUMPCORE
    
    commit aed8adb7688d5744cb484226820163af31d2499a upstream.
    
    Commit 079148b919d0 ("coredump: factor out the setting of PF_DUMPCORE")
    cleaned up the setting of PF_DUMPCORE by removing it from all the
    linux_binfmt->core_dump() and moving it to zap_threads().But this ended
    up clearing all the previously set flags.  This causes issues during
    core generation when tsk->flags is checked again (eg.  for PF_USED_MATH
    to dump floating point registers).  Fix this.
    
    Signed-off-by: Silesh C V <svellattu@mvista.com>
    Acked-by: Oleg Nesterov <oleg@redhat.com>
    Cc: Mandeep Singh Baines <msb@chromium.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 dfacab7c2274ea9d9177b13044f5e140ffa2e3ba
Author: Dmitry Torokhov <dtor@chromium.org>
Date:   Sat Jul 19 16:30:31 2014 -0700

    Input: fix defuzzing logic
    
    commit 50c5d36dab930b1f1b1e3348b8608aa8b9ee7610 upstream.
    
    We attempt to remove noise from coordinates reported by devices in
    input_handle_abs_event(), unfortunately, unless we were dropping the
    event altogether, we were ignoring the adjusted value and were passing
    on the original value instead.
    
    Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
    Reviewed-by: Benson Leung <bleung@chromium.org>
    Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
    Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e3c7f0857a83228503c8c9a0e17fcd86744fccbf
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Mon Jul 14 17:12:21 2014 -0700

    Input: synaptics - add min/max quirk for pnp-id LEN2002 (Edge E531)
    
    commit e76aed9da7189eeb41b9856552ce5721181e8e8d upstream.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1114768
    
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 98f43b46dc4b5d095db3c333556199bfe0041141
Author: Mikulas Patocka <mpatocka@redhat.com>
Date:   Tue Mar 4 17:13:47 2014 -0500

    slab_common: fix the check for duplicate slab names
    
    commit 694617474e33b8603fc76e090ed7d09376514b1a upstream.
    
    The patch 3e374919b314f20e2a04f641ebc1093d758f66a4 is supposed to fix the
    problem where kmem_cache_create incorrectly reports duplicate cache name
    and fails. The problem is described in the header of that patch.
    
    However, the patch doesn't really fix the problem because of these
    reasons:
    
    * the logic to test for debugging is reversed. It was intended to perform
      the check only if slub debugging is enabled (which implies that caches
      with the same parameters are not merged). Therefore, there should be
      #if !defined(CONFIG_SLUB) || defined(CONFIG_SLUB_DEBUG_ON)
      The current code has the condition reversed and performs the test if
      debugging is disabled.
    
    * slub debugging may be enabled or disabled based on kernel command line,
      CONFIG_SLUB_DEBUG_ON is just the default settings. Therefore the test
      based on definition of CONFIG_SLUB_DEBUG_ON is unreliable.
    
    This patch fixes the problem by removing the test
    "!defined(CONFIG_SLUB_DEBUG_ON)". Therefore, duplicate names are never
    checked if the SLUB allocator is used.
    
    Note to stable kernel maintainers: when backporint this patch, please
    backport also the patch 3e374919b314f20e2a04f641ebc1093d758f66a4.
    
    Acked-by: David Rientjes <rientjes@google.com>
    Acked-by: Christoph Lameter <cl@linux.com>
    Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
    Signed-off-by: Pekka Enberg <penberg@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b8dea936e3c13157355e424c496ad25f3f71cf64
Author: Tony Luck <tony.luck@intel.com>
Date:   Fri Jul 18 11:43:01 2014 -0700

    tracing: Fix wraparound problems in "uptime" trace clock
    
    commit 58d4e21e50ff3cc57910a8abc20d7e14375d2f61 upstream.
    
    The "uptime" trace clock added in:
    
        commit 8aacf017b065a805d27467843490c976835eb4a5
        tracing: Add "uptime" trace clock that uses jiffies
    
    has wraparound problems when the system has been up more
    than 1 hour 11 minutes and 34 seconds. It converts jiffies
    to nanoseconds using:
            (u64)jiffies_to_usecs(jiffy) * 1000ULL
    but since jiffies_to_usecs() only returns a 32-bit value, it
    truncates at 2^32 microseconds.  An additional problem on 32-bit
    systems is that the argument is "unsigned long", so fixing the
    return value only helps until 2^32 jiffies (49.7 days on a HZ=1000
    system).
    
    Avoid these problems by using jiffies_64 as our basis, and
    not converting to nanoseconds (we do convert to clock_t because
    user facing API must not be dependent on internal kernel
    HZ values).
    
    Link: http://lkml.kernel.org/p/99d63c5bfe9b320a3b428d773825a37095bf6a51.1405708254.git.tony.luck@intel.com
    
    Fixes: 8aacf017b065 "tracing: Add "uptime" trace clock that uses jiffies"
    Signed-off-by: Tony Luck <tony.luck@intel.com>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d98c246a64929965ebcd946344548ae6c00fa4aa
Author: Tejun Heo <tj@kernel.org>
Date:   Sat Jul 5 18:43:21 2014 -0400

    blkcg: don't call into policy draining if root_blkg is already gone
    
    commit 0b462c89e31f7eb6789713437eb551833ee16ff3 upstream.
    
    While a queue is being destroyed, all the blkgs are destroyed and its
    ->root_blkg pointer is set to NULL.  If someone else starts to drain
    while the queue is in this state, the following oops happens.
    
      NULL pointer dereference at 0000000000000028
      IP: [<ffffffff8144e944>] blk_throtl_drain+0x84/0x230
      PGD e4a1067 PUD b773067 PMD 0
      Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
      Modules linked in: cfq_iosched(-) [last unloaded: cfq_iosched]
      CPU: 1 PID: 537 Comm: bash Not tainted 3.16.0-rc3-work+ #2
      Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
      task: ffff88000e222250 ti: ffff88000efd4000 task.ti: ffff88000efd4000
      RIP: 0010:[<ffffffff8144e944>]  [<ffffffff8144e944>] blk_throtl_drain+0x84/0x230
      RSP: 0018:ffff88000efd7bf0  EFLAGS: 00010046
      RAX: 0000000000000000 RBX: ffff880015091450 RCX: 0000000000000001
      RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
      RBP: ffff88000efd7c10 R08: 0000000000000000 R09: 0000000000000001
      R10: ffff88000e222250 R11: 0000000000000000 R12: ffff880015091450
      R13: ffff880015092e00 R14: ffff880015091d70 R15: ffff88001508fc28
      FS:  00007f1332650740(0000) GS:ffff88001fa80000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      CR2: 0000000000000028 CR3: 0000000009446000 CR4: 00000000000006e0
      Stack:
       ffffffff8144e8f6 ffff880015091450 0000000000000000 ffff880015091d80
       ffff88000efd7c28 ffffffff8144ae2f ffff880015091450 ffff88000efd7c58
       ffffffff81427641 ffff880015091450 ffffffff82401f00 ffff880015091450
      Call Trace:
       [<ffffffff8144ae2f>] blkcg_drain_queue+0x1f/0x60
       [<ffffffff81427641>] __blk_drain_queue+0x71/0x180
       [<ffffffff81429b3e>] blk_queue_bypass_start+0x6e/0xb0
       [<ffffffff814498b8>] blkcg_deactivate_policy+0x38/0x120
       [<ffffffff8144ec44>] blk_throtl_exit+0x34/0x50
       [<ffffffff8144aea5>] blkcg_exit_queue+0x35/0x40
       [<ffffffff8142d476>] blk_release_queue+0x26/0xd0
       [<ffffffff81454968>] kobject_cleanup+0x38/0x70
       [<ffffffff81454848>] kobject_put+0x28/0x60
       [<ffffffff81427505>] blk_put_queue+0x15/0x20
       [<ffffffff817d07bb>] scsi_device_dev_release_usercontext+0x16b/0x1c0
       [<ffffffff810bc339>] execute_in_process_context+0x89/0xa0
       [<ffffffff817d064c>] scsi_device_dev_release+0x1c/0x20
       [<ffffffff817930e2>] device_release+0x32/0xa0
       [<ffffffff81454968>] kobject_cleanup+0x38/0x70
       [<ffffffff81454848>] kobject_put+0x28/0x60
       [<ffffffff817934d7>] put_device+0x17/0x20
       [<ffffffff817d11b9>] __scsi_remove_device+0xa9/0xe0
       [<ffffffff817d121b>] scsi_remove_device+0x2b/0x40
       [<ffffffff817d1257>] sdev_store_delete+0x27/0x30
       [<ffffffff81792ca8>] dev_attr_store+0x18/0x30
       [<ffffffff8126f75e>] sysfs_kf_write+0x3e/0x50
       [<ffffffff8126ea87>] kernfs_fop_write+0xe7/0x170
       [<ffffffff811f5e9f>] vfs_write+0xaf/0x1d0
       [<ffffffff811f69bd>] SyS_write+0x4d/0xc0
       [<ffffffff81d24692>] system_call_fastpath+0x16/0x1b
    
    776687bce42b ("block, blk-mq: draining can't be skipped even if
    bypass_depth was non-zero") made it easier to trigger this bug by
    making blk_queue_bypass_start() drain even when it loses the first
    bypass test to blk_cleanup_queue(); however, the bug has always been
    there even before the commit as blk_queue_bypass_start() could race
    against queue destruction, win the initial bypass test but perform the
    actual draining after blk_cleanup_queue() already destroyed all blkgs.
    
    Fix it by skippping calling into policy draining if all the blkgs are
    already gone.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Reported-by: Shirish Pargaonkar <spargaonkar@suse.com>
    Reported-by: Sasha Levin <sasha.levin@oracle.com>
    Reported-by: Jet Chen <jet.chen@intel.com>
    Tested-by: Shirish Pargaonkar <spargaonkar@suse.com>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit aa9622e3a3b8bee3c809d79b20c71128152deb92
Author: Romain Degez <romain.degez@gmail.com>
Date:   Fri Jul 11 18:08:13 2014 +0200

    ahci: add support for the Promise FastTrak TX8660 SATA HBA (ahci mode)
    
    commit b32bfc06aefab61acc872dec3222624e6cd867ed upstream.
    
    Add support of the Promise FastTrak TX8660 SATA HBA in ahci mode by
    registering the board in the ahci_pci_tbl[].
    
    Note: this HBA also provide a hardware RAID mode when activated in
    BIOS but specific drivers from the manufacturer are required in this
    case.
    
    Signed-off-by: Romain Degez <romain.degez@gmail.com>
    Tested-by: Romain Degez <romain.degez@gmail.com>
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 1967b156fd85702f52c5cffaaf7f8f03332ef49e
Author: Martin Schwidefsky <schwidefsky@de.ibm.com>
Date:   Mon Jun 23 15:29:40 2014 +0200

    s390/ptrace: fix PSW mask check
    
    commit dab6cf55f81a6e16b8147aed9a843e1691dcd318 upstream.
    
    The PSW mask check of the PTRACE_POKEUSR_AREA command is incorrect.
    The PSW_MASK_USER define contains the PSW_MASK_ASC bits, the ptrace
    interface accepts all combinations for the address-space-control
    bits. To protect the kernel space the PSW mask check in ptrace needs
    to reject the address-space-control bit combination for home space.
    
    Fixes CVE-2014-3534
    
    Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d073bb25909b610b3fd986fe87752120c4e6f04b
Author: Tejun Heo <tj@kernel.org>
Date:   Wed Jul 23 09:05:27 2014 -0400

    libata: introduce ata_host->n_tags to avoid oops on SAS controllers
    
    commit 1a112d10f03e83fb3a2fdc4c9165865dec8a3ca6 upstream.
    
    1871ee134b73 ("libata: support the ata host which implements a queue
    depth less than 32") directly used ata_port->scsi_host->can_queue from
    ata_qc_new() to determine the number of tags supported by the host;
    unfortunately, SAS controllers doing SATA don't initialize ->scsi_host
    leading to the following oops.
    
     BUG: unable to handle kernel NULL pointer dereference at 0000000000000058
     IP: [<ffffffff814e0618>] ata_qc_new_init+0x188/0x1b0
     PGD 0
     Oops: 0002 [#1] SMP
     Modules linked in: isci libsas scsi_transport_sas mgag200 drm_kms_helper ttm
     CPU: 1 PID: 518 Comm: udevd Not tainted 3.16.0-rc6+ #62
     Hardware name: Intel Corporation S2600CO/S2600CO, BIOS SE5C600.86B.02.02.0002.122320131210 12/23/2013
     task: ffff880c1a00b280 ti: ffff88061a000000 task.ti: ffff88061a000000
     RIP: 0010:[<ffffffff814e0618>]  [<ffffffff814e0618>] ata_qc_new_init+0x188/0x1b0
     RSP: 0018:ffff88061a003ae8  EFLAGS: 00010012
     RAX: 0000000000000001 RBX: ffff88000241ca80 RCX: 00000000000000fa
     RDX: 0000000000000020 RSI: 0000000000000020 RDI: ffff8806194aa298
     RBP: ffff88061a003ae8 R08: ffff8806194a8000 R09: 0000000000000000
     R10: 0000000000000000 R11: ffff88000241ca80 R12: ffff88061ad58200
     R13: ffff8806194aa298 R14: ffffffff814e67a0 R15: ffff8806194a8000
     FS:  00007f3ad7fe3840(0000) GS:ffff880627620000(0000) knlGS:0000000000000000
     CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
     CR2: 0000000000000058 CR3: 000000061a118000 CR4: 00000000001407e0
     Stack:
      ffff88061a003b20 ffffffff814e96e1 ffff88000241ca80 ffff88061ad58200
      ffff8800b6bf6000 ffff880c1c988000 ffff880619903850 ffff88061a003b68
      ffffffffa0056ce1 ffff88061a003b48 0000000013d6e6f8 ffff88000241ca80
     Call Trace:
      [<ffffffff814e96e1>] ata_sas_queuecmd+0xa1/0x430
      [<ffffffffa0056ce1>] sas_queuecommand+0x191/0x220 [libsas]
      [<ffffffff8149afee>] scsi_dispatch_cmd+0x10e/0x300 [<ffffffff814a3bc5>] scsi_request_fn+0x2f5/0x550
      [<ffffffff81317613>] __blk_run_queue+0x33/0x40
      [<ffffffff8131781a>] queue_unplugged+0x2a/0x90
      [<ffffffff8131ceb4>] blk_flush_plug_list+0x1b4/0x210
      [<ffffffff8131d274>] blk_finish_plug+0x14/0x50
      [<ffffffff8117eaa8>] __do_page_cache_readahead+0x198/0x1f0
      [<ffffffff8117ee21>] force_page_cache_readahead+0x31/0x50
      [<ffffffff8117ee7e>] page_cache_sync_readahead+0x3e/0x50
      [<ffffffff81172ac6>] generic_file_read_iter+0x496/0x5a0
      [<ffffffff81219897>] blkdev_read_iter+0x37/0x40
      [<ffffffff811e307e>] new_sync_read+0x7e/0xb0
      [<ffffffff811e3734>] vfs_read+0x94/0x170
      [<ffffffff811e43c6>] SyS_read+0x46/0xb0
      [<ffffffff811e33d1>] ? SyS_lseek+0x91/0xb0
      [<ffffffff8171ee29>] system_call_fastpath+0x16/0x1b
     Code: 00 00 00 88 50 29 83 7f 08 01 19 d2 83 e2 f0 83 ea 50 88 50 34 c6 81 1d 02 00 00 40 c6 81 17 02 00 00 00 5d c3 66 0f 1f 44 00 00 <89> 14 25 58 00 00 00
    
    Fix it by introducing ata_host->n_tags which is initialized to
    ATA_MAX_QUEUE - 1 in ata_host_init() for SAS controllers and set to
    scsi_host_template->can_queue in ata_host_register() for !SAS ones.
    As SAS hosts are never registered, this will give them the same
    ATA_MAX_QUEUE - 1 as before.  Note that we can't use
    scsi_host->can_queue directly for SAS hosts anyway as they can go
    higher than the libata maximum.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Reported-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
    Reported-by: Jesse Brandeburg <jesse.brandeburg@gmail.com>
    Reported-by: Peter Hurley <peter@hurleysoftware.com>
    Reported-by: Peter Zijlstra <peterz@infradead.org>
    Tested-by: Alexey Kardashevskiy <aik@ozlabs.ru>
    Fixes: 1871ee134b73 ("libata: support the ata host which implements a queue depth less than 32")
    Cc: Kevin Hao <haokexin@gmail.com>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 6f1a8fea7d5d68da6cf0a420b925503f2fcbc6c5
Author: Kevin Hao <haokexin@gmail.com>
Date:   Sat Jul 12 12:08:24 2014 +0800

    libata: support the ata host which implements a queue depth less than 32
    
    commit 1871ee134b73fb4cadab75752a7152ed2813c751 upstream.
    
    The sata on fsl mpc8315e is broken after the commit 8a4aeec8d2d6
    ("libata/ahci: accommodate tag ordered controllers"). The reason is
    that the ata controller on this SoC only implement a queue depth of
    16. When issuing the commands in tag order, all the commands in tag
    16 ~ 31 are mapped to tag 0 unconditionally and then causes the sata
    malfunction. It makes no senses to use a 32 queue in software while
    the hardware has less queue depth. So consider the queue depth
    implemented by the hardware when requesting a command tag.
    
    Fixes: 8a4aeec8d2d6 ("libata/ahci: accommodate tag ordered controllers")
    Signed-off-by: Kevin Hao <haokexin@gmail.com>
    Acked-by: Dan Williams <dan.j.williams@intel.com>
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 0b9f20dad0bc659261f88294192c1f1c7763fc2a
Author: Christoph Hellwig <hch@lst.de>
Date:   Tue Jul 8 12:25:28 2014 +0200

    block: don't assume last put of shared tags is for the host
    
    commit d45b3279a5a2252cafcd665bbf2db8c9b31ef783 upstream.
    
    There is no inherent reason why the last put of a tag structure must be
    the one for the Scsi_Host, as device model objects can be held for
    arbitrary periods.  Merge blk_free_tags and __blk_free_tags into a single
    funtion that just release a references and get rid of the BUG() when the
    host reference wasn't the last.
    
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 3b968e0cc905310a19bc0b8f0f77600abf1aed2d
Author: Mikulas Patocka <mpatocka@redhat.com>
Date:   Wed Jul 2 12:46:23 2014 -0400

    block: provide compat ioctl for BLKZEROOUT
    
    commit 3b3a1814d1703027f9867d0f5cbbfaf6c7482474 upstream.
    
    This patch provides the compat BLKZEROOUT ioctl. The argument is a pointer
    to two uint64_t values, so there is no need to translate it.
    
    Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
    Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 1e0f78a45f36d311deb20c6dba8b1520bd35d9d7
Author: Christoph Hellwig <hch@lst.de>
Date:   Wed Jun 18 11:07:03 2014 +0200

    nfs: only show Posix ACLs in listxattr if actually present
    
    commit 74adf83f5d7720925499b4938f930591f947b660 upstream.
    
    The big ACL switched nfs to use generic_listxattr, which calls all existing
    ->list handlers.  Add a custom .listxattr implementation that only lists
    the ACLs if they actually are present on the given inode.
    
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Reported-by: Philippe Troin <phil@fifi.org>
    Tested-by: Philippe Troin <phil@fifi.org>
    Fixes: 013cdf1088d7 (nfs: use generic posix ACL infrastructure ...)
    Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 2bd7b4309ac78fa12110c41b05bf5ab45930482a
Author: Antti Palosaari <crope@iki.fi>
Date:   Fri Jul 4 05:44:39 2014 -0300

    media: tda10071: force modulation to QPSK on DVB-S
    
    commit db4175ae2095634dbecd4c847da439f9c83e1b3b upstream.
    
    Only supported modulation for DVB-S is QPSK. Modulation parameter
    contains invalid value for DVB-S on some cases, which leads driver
    refusing tuning attempt. Due to that, hard code modulation to QPSK
    in case of DVB-S.
    
    Signed-off-by: Antti Palosaari <crope@iki.fi>
    Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 282cb9a23254d5f7a1b8556a179e338cfba414ae
Author: Hans Verkuil <hverkuil@xs4all.nl>
Date:   Mon Jun 16 09:08:29 2014 -0300

    media: hdpvr: fix two audio bugs
    
    commit 3445857b22eafb70a6ac258979e955b116bfd2c6 upstream.
    
    When the audio encoding is changed the driver calls hdpvr_set_audio
    with the current opt->audio_input value. However, that should have
    been opt->audio_input + 1. So changing the audio encoding inadvertently
    changes the input as well. This bug has always been there.
    
    The second bug was introduced in kernel 3.10 and that broke the
    default_audio_input module option handling: the audio encoding was
    never switched to AC3 if default_audio_input was set to 2 (SPDIF input).
    
    In addition, since starting with 3.10 the audio encoding is always set
    at the start the first bug now always happens when the driver is loaded.
    In the past this bug would only surface if the user would change the
    audio encoding after the driver was loaded.
    
    Also fixes a small trivial typo (bufffer -> buffer).
    
    Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
    Reported-by: Scott Doty <scott@corp.sonic.net>
    Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit a008ac8d68328ace08d6985bed9dfdd6d676be10
Author: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Date:   Sat Jun 14 08:37:09 2014 -0300

    media: media: v4l2-core: v4l2-dv-timings.c: Cleaning up code wrong value used in aspect ratio
    
    commit f71920efb1066d71d74811e1dbed658173adf9bf upstream.
    
    Wrong value used in same cases for the aspect ratio.
    
    Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
    Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
    Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
    Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit cbe6bbc8f50f8339c3fd3e14a7ec223cea3adc25
Author: Arnd Bergmann <arnd@arndb.de>
Date:   Wed Jun 11 11:49:31 2014 -0300

    media: staging: tighten omap4iss dependencies
    
    commit 4856fbd12d69965d3ab680c686222db93872728d upstream.
    
    The OMAP4 camera support depends on I2C and VIDEO_V4L2, both
    of which can be loadable modules. This causes build failures
    if we want the camera driver to be built-in.
    
    This can be solved by turning the option into "tristate",
    which unfortunately causes another problem, because the
    driver incorrectly calls a platform-internal interface
    for omap4_ctrl_pad_readl/omap4_ctrl_pad_writel.
    
    Instead, this patch just forbids the invalid configurations
    and ensures that the driver can only be built if all its
    dependencies are built-in.
    
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>