commit 7cdb8bda7211ef6c153cbeb0a9f003094a442df8
Author: Jiri Slaby <jslaby@suse.cz>
Date:   Wed Jan 28 13:28:06 2015 +0100

    Linux 3.12.37

commit 453d9a0b262839fa598dac2cec8cbf6175bbc5d5
Author: Al Viro <viro@zeniv.linux.org.uk>
Date:   Sun Oct 26 19:31:10 2014 -0400

    deal with deadlock in d_walk()
    
    commit ca5358ef75fc69fee5322a38a340f5739d997c10 upstream.
    
    ... by not hitting rename_retry for reasons other than rename having
    happened.  In other words, do _not_ restart when finding that
    between unlocking the child and locking the parent the former got
    into __dentry_kill().  Skip the killed siblings instead...
    
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    Acked-by: Miklos Szeredi <mszeredi@suse.cz>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 4b2f6663ebde6bed50209a05041b34c203116253
Author: Al Viro <viro@zeniv.linux.org.uk>
Date:   Sun Oct 26 19:19:16 2014 -0400

    move d_rcu from overlapping d_child to overlapping d_alias
    
    commit 946e51f2bf37f1656916eb75bd0742ba33983c28 upstream.
    
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    Acked-by: Miklos Szeredi <mszeredi@suse.cz>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 378d7e7d7c2e59a5800d8611c8caa65af4be674c
Author: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Date:   Thu Nov 27 22:25:45 2014 +0100

    usb: musb: Fix a few off-by-one lengths
    
    commit e87c3f80ad0490d26ffe04754b7d094463b40f30 upstream.
    
    !strncmp(buf, "force host", 9) is true if and only if buf starts with
    "force hos". This was obviously not what was intended. The same error
    exists for "force full-speed", "force high-speed" and "test
    packet". Using strstarts avoids the error-prone hardcoding of the
    prefix length.
    
    For consistency, also change the other occurences of the !strncmp
    idiom.
    
    Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
    Signed-off-by: Felipe Balbi <balbi@ti.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit fdcc2a15ec6d4c4d7ef5562e92b2b83323e24106
Author: Dan Carpenter <dan.carpenter@oracle.com>
Date:   Wed Nov 26 17:06:49 2014 +0300

    USB: adutux: NULL dereferences on disconnect
    
    commit fc625960edecfb57e62c2975d1f155155e28e6ba upstream.
    
    Both "dev->udev" and "interface->dev" are NULL.  These printks are not
    very interesting so I just deleted them.
    
    Fixes: 03270634e242 ('USB: Add ADU support for Ontrak ADU devices')
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 361efd1a32c21485081012543c7a62d935e6bff2
Author: NeilBrown <neilb@suse.de>
Date:   Wed Dec 3 16:07:58 2014 +1100

    md/raid5: fetch_block must fetch all the blocks handle_stripe_dirtying wants.
    
    commit 108cef3aa41669610e1836fe638812dd067d72de upstream.
    
    It is critical that fetch_block() and handle_stripe_dirtying()
    are consistent in their analysis of what needs to be loaded.
    Otherwise raid5 can wait forever for a block that won't be loaded.
    
    Currently when writing to a RAID5 that is resyncing, to a location
    beyond the resync offset, handle_stripe_dirtying chooses a
    reconstruct-write cycle, but fetch_block() assumes a
    read-modify-write, and a lockup can happen.
    
    So treat that case just like RAID6, just as we do in
    handle_stripe_dirtying.  RAID6 always does reconstruct-write.
    
    This bug was introduced when the behaviour of handle_stripe_dirtying
    was changed in 3.7, so the patch is suitable for any kernel since,
    though it will need careful merging for some versions.
    
    Cc: stable@vger.kernel.org (v3.7+)
    Fixes: a7854487cd7128a30a7f4f5259de9f67d5efb95f
    Reported-by: Henry Cai <henryplusplus@gmail.com>
    Signed-off-by: NeilBrown <neilb@suse.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit c367abe482eaef94fb094726c6b06b9435c68198
Author: Michal Hocko <mhocko@suse.cz>
Date:   Mon Dec 29 20:30:35 2014 +0100

    mm: get rid of radix tree gfp mask for pagecache_get_page
    
    commit 45f87de57f8fad59302fd263dd81ffa4843b5b24 upstream.
    
    Commit 2457aec63745 ("mm: non-atomically mark page accessed during page
    cache allocation where possible") has added a separate parameter for
    specifying gfp mask for radix tree allocations.
    
    Not only this is less than optimal from the API point of view because it
    is error prone, it is also buggy currently because
    grab_cache_page_write_begin is using GFP_KERNEL for radix tree and if
    fgp_flags doesn't contain FGP_NOFS (mostly controlled by fs by
    AOP_FLAG_NOFS flag) but the mapping_gfp_mask has __GFP_FS cleared then
    the radix tree allocation wouldn't obey the restriction and might
    recurse into filesystem and cause deadlocks.  This is the case for most
    filesystems unfortunately because only ext4 and gfs2 are using
    AOP_FLAG_NOFS.
    
    Let's simply remove radix_gfp_mask parameter because the allocation
    context is same for both page cache and for the radix tree.  Just make
    sure that the radix tree gets only the sane subset of the mask (e.g.  do
    not pass __GFP_WRITE).
    
    Long term it is more preferable to convert remaining users of
    AOP_FLAG_NOFS to use mapping_gfp_mask instead and simplify this
    interface even further.
    
    Reported-by: Dave Chinner <david@fromorbit.com>
    Signed-off-by: Michal Hocko <mhocko@suse.cz>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 9d4db12409f0e4a3865c6179d7ac30a51a986018
Author: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Date:   Mon Jan 19 23:07:09 2015 +0100

    mmc: sdhci: Don't signal the sdio irq if it's not setup
    
    [Not needed in newer kernels due to refactoring fixing this issue.]
    
    With 3.14.29 (and older kernels) some of my I.mx6 Sabrelite boards were
    crashing with the following oops:
    
      sdhci: Secure Digital Host Controller Interface driver
      sdhci: Copyright(c) Pierre Ossman
      sdhci-pltfm: SDHCI platform and OF driver helper
      sdhci-esdhc-imx 2198000.usdhc: could not get ultra high speed state, work on normal mode
      mmc0: no vqmmc regulator found
      mmc0: SDHCI controller on 2198000.usdhc [2198000.usdhc] using ADMA
      Unable to handle kernel NULL pointer dereference at virtual address 00000000
      pgd = c0004000
      [00000000] *pgd=00000000
      Internal error: Oops: 5 [#1] SMP ARM
      Modules linked in:
      CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.14.29 #1
      task: c08a7120 ti: c089c000 task.ti: c089c000
      PC is at wake_up_process+0x8/0x40
      LR is at sdhci_irq+0x748/0x9c4
    
    Full boot log can be found at:
      http://storage.kernelci.org/stable/v3.14.29/arm-multi_v7_defconfig/lab-collabora/boot-imx6q-sabrelite.html
    
    This happens if the sdhci interrupt status contains SDHCI_INT_CARD_INT,
    while the sdio irq was never setup.  This patch fixes that in a minimal
    way by checking if the sdio irq was setup.
    
    In more recent kernels this bug went away due to refactoring done by
    Russel King. So an alternative (potentially better?) fix for this patch
    is to cherrypick the following patches from a recent kernel:
    
    18258f7239a6 - genirq: Provide synchronize_hardirq()
    bf3b5ec66bd0 - mmc: sdio_irq: rework sdio irq handling
    41005003bcaf - mmc: sdhci: clean up interrupt handling
    781e989cf593 - mmc: sdhci: convert to new SDIO IRQ handling
    
    Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
    Cc: Russell King <linux@arm.linux.org.uk>
    Cc: Tyler Baker <tyler.baker@linaro.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 9e289c4b5117818d396f19c1bda0f986c31ddf20
Author: Mathias Krause <minipli@googlemail.com>
Date:   Sun Jan 11 18:17:42 2015 +0100

    crypto: add missing crypto module aliases
    
    commit 3e14dcf7cb80b34a1f38b55bc96f02d23fdaaaaf upstream.
    
    Commit 5d26a105b5a7 ("crypto: prefix module autoloading with "crypto-"")
    changed the automatic module loading when requesting crypto algorithms
    to prefix all module requests with "crypto-". This requires all crypto
    modules to have a crypto specific module alias even if their file name
    would otherwise match the requested crypto algorithm.
    
    Even though commit 5d26a105b5a7 added those aliases for a vast amount of
    modules, it was missing a few. Add the required MODULE_ALIAS_CRYPTO
    annotations to those files to make them get loaded automatically, again.
    This fixes, e.g., requesting 'ecb(blowfish-generic)', which used to work
    with kernels v3.18 and below.
    
    Also change MODULE_ALIAS() lines to MODULE_ALIAS_CRYPTO(). The former
    won't work for crypto modules any more.
    
    Fixes: 5d26a105b5a7 ("crypto: prefix module autoloading with "crypto-"")
    Cc: Kees Cook <keescook@chromium.org>
    Signed-off-by: Mathias Krause <minipli@googlemail.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit f753253c2c19423b0d6743ca9eae725549299245
Author: Kees Cook <keescook@chromium.org>
Date:   Mon Nov 24 16:32:38 2014 -0800

    crypto: include crypto- module prefix in template
    
    commit 4943ba16bbc2db05115707b3ff7b4874e9e3c560 upstream.
    
    This adds the module loading prefix "crypto-" to the template lookup
    as well.
    
    For example, attempting to load 'vfat(blowfish)' via AF_ALG now correctly
    includes the "crypto-" prefix at every level, correctly rejecting "vfat":
    
    	net-pf-38
    	algif-hash
    	crypto-vfat(blowfish)
    	crypto-vfat(blowfish)-all
    	crypto-vfat
    
    Reported-by: Mathias Krause <minipli@googlemail.com>
    Signed-off-by: Kees Cook <keescook@chromium.org>
    Acked-by: Mathias Krause <minipli@googlemail.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 7f655881c786824340b0bee70f9738e10d427494
Author: Kees Cook <keescook@chromium.org>
Date:   Thu Nov 20 17:05:53 2014 -0800

    crypto: prefix module autoloading with "crypto-"
    
    commit 5d26a105b5a73e5635eae0629b42fa0a90e07b7b upstream.
    
    This prefixes all crypto module loading with "crypto-" so we never run
    the risk of exposing module auto-loading to userspace via a crypto API,
    as demonstrated by Mathias Krause:
    
    https://lkml.org/lkml/2013/3/4/70
    
    Signed-off-by: Kees Cook <keescook@chromium.org>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit cadd029e2f3710a6f57160275b0a3ba69971fab3
Author: Lars Ellenberg <lars.ellenberg@linbit.com>
Date:   Mon Nov 10 17:21:13 2014 +0100

    drbd: merge_bvec_fn: properly remap bvm->bi_bdev
    
    commit 3b9d35d744bb5139f9fed57f38c019bb8c7d351c upstream.
    
    This was not noticed for many years. Affects operation if
    md raid is used a backing device for DRBD.
    
    CC: stable@kernel.org # v3.2+
    Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
    Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit f2da668ec5d70f00271297ce374d80d86c121e22
Author: Dan Carpenter <dan.carpenter@oracle.com>
Date:   Sat Dec 6 16:49:24 2014 +0300

    ipvs: uninitialized data with IP_VS_IPV6
    
    commit 3b05ac3824ed9648c0d9c02d51d9b54e4e7e874f upstream.
    
    The app_tcp_pkt_out() function expects "*diff" to be set and ends up
    using uninitialized data if CONFIG_IP_VS_IPV6 is turned on.
    
    The same issue is there in app_tcp_pkt_in().  Thanks to Julian Anastasov
    for noticing that.
    
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Acked-by: Julian Anastasov <ja@ssi.bg>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 1bb0aca1e0881dfd34a6f39fd44e1e995fc302a1
Author: Sasha Levin <sasha.levin@oracle.com>
Date:   Mon Dec 29 09:39:01 2014 -0500

    KEYS: close race between key lookup and freeing
    
    commit a3a8784454692dd72e5d5d34dcdab17b4420e74c upstream.
    
    When a key is being garbage collected, it's key->user would get put before
    the ->destroy() callback is called, where the key is removed from it's
    respective tracking structures.
    
    This leaves a key hanging in a semi-invalid state which leaves a window open
    for a different task to try an access key->user. An example is
    find_keyring_by_name() which would dereference key->user for a key that is
    in the process of being garbage collected (where key->user was freed but
    ->destroy() wasn't called yet - so it's still present in the linked list).
    
    This would cause either a panic, or corrupt memory.
    
    Fixes CVE-2014-9529.
    
    Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
    Signed-off-by: David Howells <dhowells@redhat.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit ad9f4ac8dfc8437f97ee35df7ecfbb62c8ebaee9
Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date:   Wed Jan 7 15:24:19 2015 +0200

    sata_dwc_460ex: fix resource leak on error path
    
    commit 4aaa71873ddb9faf4b0c4826579e2f6d18ff9ab4 upstream.
    
    DMA mapped IO should be unmapped on the error path in probe() and
    unconditionally on remove().
    
    Fixes: 62936009f35a ([libata] Add 460EX on-chip SATA driver, sata_dwc_460ex)
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit c625e1fc90bd87b2007d85c5745f0654aeb215b8
Author: Andy Lutomirski <luto@amacapital.net>
Date:   Mon Nov 24 17:39:06 2014 -0800

    x86/asm/traps: Disable tracing and kprobes in fixup_bad_iret and sync_regs
    
    commit 7ddc6a2199f1da405a2fb68c40db8899b1a8cd87 upstream.
    
    These functions can be executed on the int3 stack, so kprobes
    are dangerous. Tracing is probably a bad idea, too.
    
    Fixes: b645af2d5905 ("x86_64, traps: Rework bad_iret")
    Signed-off-by: Andy Lutomirski <luto@amacapital.net>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Link: http://lkml.kernel.org/r/50e33d26adca60816f3ba968875801652507d0c4.1416870125.git.luto@amacapital.net
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    [bwh: Backported to 3.10:
     - Use __kprobes instead of NOKPROBE_SYMBOL()
     - Adjust context]
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit b220db38cb01be84b290293e5ca850a9bcd54ff9
Author: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Date:   Thu Jan 22 22:58:49 2015 +0000

    x86/apic: Re-enable PCI_MSI support for non-SMP X86_32
    
    commit 38a1dfda8e77d7ba74c94d06d8bc41ba98a4bc8c upstream.
    
    Commit 0dbc6078c06bc0 ('x86, build, pci: Fix PCI_MSI build on !SMP')
    introduced the dependency that X86_UP_APIC is only available when
    PCI_MSI is false. This effectively prevents PCI_MSI support on 32bit
    UP systems because it disables both APIC and IO-APIC. But APIC support
    is architecturally required for PCI_MSI.
    
    The intention of the patch was to enforce APIC support when PCI_MSI is
    enabled, but failed to do so.
    
    Remove the !PCI_MSI dependency from X86_UP_APIC and enforce
    X86_UP_APIC when PCI_MSI support is enabled on 32bit UP systems.
    
    [ tglx: Massaged changelog ]
    
    Fixes 0dbc6078c06bc0 'x86, build, pci: Fix PCI_MSI build on !SMP'
    Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
    Suggested-by: Thomas Gleixner <tglx@linutronix.de>
    Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
    Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
    Link: http://lkml.kernel.org/r/1421967529-9037-1-git-send-email-pure.logic@nexus-software.ie
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit a9ca75eb878663a06eff03d990b6b88051c126cc
Author: Andy Lutomirski <luto@amacapital.net>
Date:   Thu Jan 22 11:27:59 2015 -0800

    x86, tls: Interpret an all-zero struct user_desc as "no segment"
    
    commit 3669ef9fa7d35f573ec9c0e0341b29251c2734a7 upstream.
    
    The Witcher 2 did something like this to allocate a TLS segment index:
    
            struct user_desc u_info;
            bzero(&u_info, sizeof(u_info));
            u_info.entry_number = (uint32_t)-1;
    
            syscall(SYS_set_thread_area, &u_info);
    
    Strictly speaking, this code was never correct.  It should have set
    read_exec_only and seg_not_present to 1 to indicate that it wanted
    to find a free slot without putting anything there, or it should
    have put something sensible in the TLS slot if it wanted to allocate
    a TLS entry for real.  The actual effect of this code was to
    allocate a bogus segment that could be used to exploit espfix.
    
    The set_thread_area hardening patches changed the behavior, causing
    set_thread_area to return -EINVAL and crashing the game.
    
    This changes set_thread_area to interpret this as a request to find
    a free slot and to leave it empty, which isn't *quite* what the game
    expects but should be close enough to keep it working.  In
    particular, using the code above to allocate two segments will
    allocate the same segment both times.
    
    According to FrostbittenKing on Github, this fixes The Witcher 2.
    
    If this somehow still causes problems, we could instead allocate
    a limit==0 32-bit data segment, but that seems rather ugly to me.
    
    Fixes: 41bdc78544b8 x86/tls: Validate TLS entries to protect espfix
    Signed-off-by: Andy Lutomirski <luto@amacapital.net>
    Cc: torvalds@linux-foundation.org
    Link: http://lkml.kernel.org/r/0cb251abe1ff0958b8e468a9a9a905b80ae3a746.1421954363.git.luto@amacapital.net
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 07820740a8f630dc4a00cc49cc8bca732e2c8446
Author: Andy Lutomirski <luto@amacapital.net>
Date:   Thu Jan 22 11:27:58 2015 -0800

    x86, tls, ldt: Stop checking lm in LDT_empty
    
    commit e30ab185c490e9a9381385529e0fd32f0a399495 upstream.
    
    32-bit programs don't have an lm bit in their ABI, so they can't
    reliably cause LDT_empty to return true without resorting to memset.
    They shouldn't need to do this.
    
    This should fix a longstanding, if minor, issue in all 64-bit kernels
    as well as a potential regression in the TLS hardening code.
    
    Fixes: 41bdc78544b8 x86/tls: Validate TLS entries to protect espfix
    Signed-off-by: Andy Lutomirski <luto@amacapital.net>
    Cc: torvalds@linux-foundation.org
    Link: http://lkml.kernel.org/r/72a059de55e86ad5e2935c80aa91880ddf19d07c.1421954363.git.luto@amacapital.net
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 301ca855ac7feea569284adcf3dfe1bd760fe5b7
Author: Kees Cook <keescook@chromium.org>
Date:   Thu Jan 15 16:51:46 2015 -0800

    x86, boot: Skip relocs when load address unchanged
    
    commit f285f4a21c3253887caceed493089ece17579d59 upstream.
    
    On 64-bit, relocation is not required unless the load address gets
    changed. Without this, relocations do unexpected things when the kernel
    is above 4G.
    
    Reported-by: Baoquan He <bhe@redhat.com>
    Signed-off-by: Kees Cook <keescook@chromium.org>
    Tested-by: Thomas D. <whissi@whissi.de>
    Cc: Vivek Goyal <vgoyal@redhat.com>
    Cc: Jan Beulich <JBeulich@suse.com>
    Cc: Junjie Mao <eternal.n08@gmail.com>
    Cc: Andi Kleen <ak@linux.intel.com>
    Link: http://lkml.kernel.org/r/20150116005146.GA4212@www.outflux.net
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 31f7649d1538ce063cf48af05704ab7b9a0c8fbf
Author: Alexandre Demers <alexandre.f.demers@gmail.com>
Date:   Tue Dec 9 01:27:50 2014 -0500

    x86/tsc: Change Fast TSC calibration failed from error to info
    
    commit 520452172e6b318f3a8bd9d4fe1e25066393de25 upstream.
    
    Many users see this message when booting without knowning that it is
    of no importance and that TSC calibration may have succeeded by
    another way.
    
    As explained by Paul Bolle in
    http://lkml.kernel.org/r/1348488259.1436.22.camel@x61.thuisdomein
    
      "Fast TSC calibration failed" should not be considered as an error
      since other calibration methods are being tried afterward. At most,
      those send a warning if they fail (not an error). So let's change
      the message from error to warning.
    
    [ tglx: Make if pr_info. It's really not important at all ]
    
    Fixes: c767a54ba065 x86/debug: Add KERN_<LEVEL> to bare printks, convert printks to pr_<level>
    Signed-off-by: Alexandre Demers <alexandre.f.demers@gmail.com>
    Link: http://lkml.kernel.org/r/1418106470-6906-1-git-send-email-alexandre.f.demers@gmail.com
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit c89368de860b51baaa6fee2bbdd816a85a1bfc04
Author: K. Y. Srinivasan <kys@microsoft.com>
Date:   Mon Jan 12 16:26:02 2015 -0800

    x86, hyperv: Mark the Hyper-V clocksource as being continuous
    
    commit 32c6590d126836a062b3140ed52d898507987017 upstream.
    
    The Hyper-V clocksource is continuous; mark it accordingly.
    
    Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
    Acked-by: jasowang@redhat.com
    Cc: gregkh@linuxfoundation.org
    Cc: devel@linuxdriverproject.org
    Cc: olaf@aepfle.de
    Cc: apw@canonical.com
    Link: http://lkml.kernel.org/r/1421108762-3331-1-git-send-email-kys@microsoft.com
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 121be0f4cf47b5bc4caa654de233ae83fdd6dd8d
Author: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Date:   Wed Oct 22 03:37:08 2014 +0200

    clocksource: exynos_mct: Fix bitmask regression for exynos4_mct_write
    
    commit 8c38d28ba8da98f7102c31d35359b4dbe9d1f329 upstream.
    
    EXYNOS4_MCT_L_MASK is defined as 0xffffff00, so applying this bitmask
    produces a number outside the range 0x00 to 0xff, which always results
    in execution of the default switch statement.
    
    Obviously this is wrong and git history shows that the bitmask inversion
    was incorrectly set during a refactoring of the MCT code.
    
    Fix this by putting the inversion at the correct position again.
    
    Acked-by: Kukjin Kim <kgene.kim@samsung.com>
    Reported-by: GP Orcullo <kinsamanka@gmail.com>
    Reviewed-by: Doug Anderson <dianders@chromium.org>
    Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
    Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit b9c03b60cf6631b21ce28b7a1ade8b9ca2f7f1f8
Author: Oliver Hartkopp <socketcan@hartkopp.net>
Date:   Mon Jan 5 18:40:15 2015 +0100

    can: dev: fix crtlmode_supported check
    
    commit 9b1087aa5e86448fe6ad40a58964e35f3ba423d5 upstream.
    
    When changing flags in the CAN drivers ctrlmode the provided new content has to
    be checked whether the bits are allowed to be changed. The bits that are to be
    changed are given as a bitfield in cm->mask. Therefore checking against
    cm->flags is wrong as the content can hold any kind of values.
    
    The iproute2 tool sets the bits in cm->mask and cm->flags depending on the
    detected command line options. To be robust against bogus user space
    applications additionally sanitize the provided flags with the provided mask.
    
    Cc: Wolfgang Grandegger <wg@grandegger.com>
    Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit e02941b00980cc2c42257cbcdb432750a8a6850b
Author: Andrew Lunn <andrew@lunn.ch>
Date:   Sun Jan 18 09:46:10 2015 -0600

    bus: mvebu-mbus: fix support of MBus window 13
    
    commit 38bdf45f4aa5cb6186d50a29e6cbbd9d486a1519 upstream.
    
    On Armada XP, 375 and 38x the MBus window 13 has the remap capability,
    like windows 0 to 7. However, the mvebu-mbus driver isn't currently
    taking into account this special case, which means that when window 13
    is actually used, the remap registers are left to 0, making the device
    using this MBus window unavailable.
    
    As a minimal fix for stable, don't use window 13. A full fix will
    follow later.
    
    Fixes: fddddb52a6c ("bus: introduce an Marvell EBU MBus driver")
    Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
    Signed-off-by: Andrew Lunn <andrew@lunn.ch>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 2308ce6419807d025a4ea486fa535aad79a4e01c
Author: Fabio Estevam <fabio.estevam@freescale.com>
Date:   Wed Jan 14 11:11:03 2015 -0200

    ARM: dts: imx25: Fix PWM "per" clocks
    
    commit 7ecd0bde5bfea524a843ad8fa8cb66ccbce68779 upstream.
    
    Currently PWM functionality is broken on mx25 due to the wrong assignment of the
    PWM "per" clock.
    
    According to Documentation/devicetree/bindings/clock/imx25-clock.txt:
    	pwm_ipg_per		52
    
    ,so update the pwm "per" to use 'pwm_ipg_per' instead of 'per10' clock.
    
    With this change PWM can work fine on mx25.
    
    Reported-by: Carlos Soto <csotoalonso@gmail.com>
    Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
    Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit f09c62a1c27dcc43a06e5ebb27ae67306146277b
Author: Sasha Levin <sasha.levin@oracle.com>
Date:   Wed Dec 3 19:25:05 2014 -0500

    time: adjtimex: Validate the ADJ_FREQUENCY values
    
    commit 5e5aeb4367b450a28f447f6d5ab57d8f2ab16a5f upstream.
    
    Verify that the frequency value from userspace is valid and makes sense.
    
    Unverified values can cause overflows later on.
    
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
    [jstultz: Fix up bug for negative values and drop redunent cap check]
    Signed-off-by: John Stultz <john.stultz@linaro.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 7d191a70e81163aabc6e6ad1ad578ca4c6cc6981
Author: Sasha Levin <sasha.levin@oracle.com>
Date:   Wed Dec 3 19:22:48 2014 -0500

    time: settimeofday: Validate the values of tv from user
    
    commit 6ada1fc0e1c4775de0e043e1bd3ae9d065491aa5 upstream.
    
    An unvalidated user input is multiplied by a constant, which can result in
    an undefined behaviour for large values. While this is validated later,
    we should avoid triggering undefined behaviour.
    
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
    [jstultz: include trivial milisecond->microsecond correction noticed
    by Andy]
    Signed-off-by: John Stultz <john.stultz@linaro.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 8dc75a54f3dc579f615840c4200b17b17665bce7
Author: Joe Thornber <ejt@redhat.com>
Date:   Fri Jan 23 10:16:16 2015 +0000

    dm cache: fix problematic dual use of a single migration count variable
    
    commit a59db67656021fa212e9b95a583f13c34eb67cd9 upstream.
    
    Introduce a new variable to count the number of allocated migration
    structures.  The existing variable cache->nr_migrations became
    overloaded.  It was used to:
    
     i) track of the number of migrations in flight for the purposes of
        quiescing during suspend.
    
     ii) to estimate the amount of background IO occuring.
    
    Recent discard changes meant that REQ_DISCARD bios are processed with
    a migration.  Discards are not background IO so nr_migrations was not
    incremented.  However this could cause quiescing to complete early.
    
    (i) is now handled with a new variable cache->nr_allocated_migrations.
    cache->nr_migrations has been renamed cache->nr_io_migrations.
    cleanup_migration() is now called free_io_migration(), since it
    decrements that variable.
    
    Also, remove the unused cache->next_migration variable that got replaced
    with with prealloc_structs a while ago.
    
    Signed-off-by: Joe Thornber <ejt@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@redhat.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit a3d35a1cfa10472d5c73df43badda7618407c4f6
Author: Joe Thornber <ejt@redhat.com>
Date:   Fri Jan 23 10:00:07 2015 +0000

    dm cache: share cache-metadata object across inactive and active DM tables
    
    commit 9b1cc9f251affdd27f29fe46d0989ba76c33faf6 upstream.
    
    If a DM table is reloaded with an inactive table when the device is not
    suspended (normal procedure for LVM2), then there will be two dm-bufio
    objects that can diverge.  This can lead to a situation where the
    inactive table uses bufio to read metadata at the same time the active
    table writes metadata -- resulting in the inactive table having stale
    metadata buffers once it is promoted to the active table slot.
    
    Fix this by using reference counting and a global list of cache metadata
    objects to ensure there is only one metadata object per metadata device.
    
    Signed-off-by: Joe Thornber <ejt@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@redhat.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit c47613fde69549c125f2b20663004ce118c8e3d7
Author: Brian King <brking@linux.vnet.ibm.com>
Date:   Thu Oct 30 17:27:10 2014 -0500

    ipr: wait for aborted command responses
    
    commit 6cdb08172bc89f0a39e1643c5e7eab362692fd1b upstream.
    
    Fixes a race condition in abort handling that was injected
    when multiple interrupt support was added. When only a single
    interrupt is present, the adapter guarantees it will send
    responses for aborted commands prior to the response for the
    abort command itself. With multiple interrupts, these responses
    generally come back on different interrupts, so we need to
    ensure the abort thread waits until the aborted command is
    complete so we don't perform a double completion. This race
    condition was being hit frequently in environments which
    were triggering command timeouts, which was resulting in
    a double completion causing a kernel oops.
    
    Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
    Reviewed-by: Wendy Xiong <wenxiong@linux.vnet.ibm.com>
    Tested-by: Wendy Xiong <wenxiong@linux.vnet.ibm.com>
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 346750ccd61ac59d3c70267f007ea901e62a8a99
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Mon Jan 12 17:15:12 2015 -0500

    drm/radeon: add si dpm quirk list
    
    commit 5615f890bc6babdc2998dec62f3552326d06eb7b upstream.
    
    This adds a quirks list to fix stability problems with
    certain SI boards.
    
    bug:
    https://bugs.freedesktop.org/show_bug.cgi?id=76490
    
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 6c662fcbaa588732ba73d7740e32c72300bb5c83
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Jan 2 09:47:10 2015 +0000

    drm/i915: Fix mutex->owner inspection race under DEBUG_MUTEXES
    
    commit 226e5ae9e5f9108beb0bde4ac69f68fe6210fed9 upstream.
    
    If CONFIG_DEBUG_MUTEXES is set, the mutex->owner field is only cleared
    if the mutex debugging is enabled which introduces a race in our
    mutex_is_locked_by() - i.e. we may inspect the old owner value before it
    is acquired by the new task.
    
    This is the root cause of this error:
    
    # diff --git a/kernel/locking/mutex-debug.c b/kernel/locking/mutex-debug.c
    # index 5cf6731..3ef3736 100644
    # --- a/kernel/locking/mutex-debug.c
    # +++ b/kernel/locking/mutex-debug.c
    # @@ -80,13 +80,13 @@ void debug_mutex_unlock(struct mutex *lock)
    # 			DEBUG_LOCKS_WARN_ON(lock->owner != current);
    #
    # 		DEBUG_LOCKS_WARN_ON(!lock->wait_list.prev && !lock->wait_list.next);
    # -		mutex_clear_owner(lock);
    # 	}
    #
    # 	/*
    # 	 * __mutex_slowpath_needs_to_unlock() is explicitly 0 for debug
    # 	 * mutexes so that we can do it here after we've verified state.
    # 	 */
    # +	mutex_clear_owner(lock);
    # 	atomic_set(&lock->count, 1);
    #  }
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87955
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: Jani Nikula <jani.nikula@intel.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 8103139fc19557877f1b43c8fb80052d375e4301
Author: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Date:   Sun Jan 18 00:36:15 2015 +0100

    scripts/recordmcount.pl: There is no -m32 gcc option on Super-H anymore
    
    commit 1caf6aaaa47471831d77c75f094d4e00ad1ec808 upstream.
    
    Compiling SH with gcc-4.8 fails due to the -m32 option not being
    supported.
    
    From http://buildd.debian-ports.org/status/fetch.php?pkg=linux&arch=sh4&ver=3.16.7-ckt4-1&stamp=1421425783
    
          CC      init/main.o
        gcc-4.8: error: unrecognized command line option '-m32'
        ld: cannot find init/.tmp_mc_main.o: No such file or directory
        objcopy: 'init/.tmp_mx_main.o': No such file
        rm: cannot remove 'init/.tmp_mx_main.o': No such file or directory
        rm: cannot remove 'init/.tmp_mc_main.o': No such file or directory
    
    Link: http://lkml.kernel.org/r/1421537778-29001-1-git-send-email-kernel@mkarcher.dialup.fu-berlin.de
    Link: http://lkml.kernel.org/r/54BCBDD4.10102@physik.fu-berlin.de
    
    Cc: Matt Fleming <matt@console-pimps.org>
    Reported-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
    Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 56d9acd61b5ace68dd68f5a3556d39a21e3d30f4
Author: Jason Lee Cragg <jcragg@gmail.com>
Date:   Sat Jan 17 12:28:29 2015 -0500

    ALSA: usb-audio: Add mic volume fix quirk for Logitech Webcam C210
    
    commit 6455931186bff407493135e74c5f32efd30860e2 upstream.
    
    Signed-off-by: Jason Lee Cragg <jcragg@gmail.com>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 17582cdff53ab86c27294f9f8f175638184ceada
Author: David Jeffery <djeffery@redhat.com>
Date:   Mon Jan 19 13:03:25 2015 -0600

    libata: prevent HSM state change race between ISR and PIO
    
    commit ce7514526742c0898b837d4395f515b79dfb5a12 upstream.
    
    It is possible for ata_sff_flush_pio_task() to set ap->hsm_task_state to
    HSM_ST_IDLE in between the time __ata_sff_port_intr() checks for HSM_ST_IDLE
    and before it calls ata_sff_hsm_move() causing ata_sff_hsm_move() to BUG().
    
    This problem is hard to reproduce making this patch hard to verify, but this
    fix will prevent the race.
    
    I have not been able to reproduce the problem, but here is a crash dump from
    a 2.6.32 kernel.
    
    On examining the ata port's state, its hsm_task_state field has a value of HSM_ST_IDLE:
    
    crash> struct ata_port.hsm_task_state ffff881c1121c000
      hsm_task_state = 0
    
    Normally, this should not be possible as ata_sff_hsm_move() was called from ata_sff_host_intr(),
    which checks hsm_task_state and won't call ata_sff_hsm_move() if it has a HSM_ST_IDLE value.
    
    PID: 11053  TASK: ffff8816e846cae0  CPU: 0   COMMAND: "sshd"
     #0 [ffff88008ba03960] machine_kexec at ffffffff81038f3b
     #1 [ffff88008ba039c0] crash_kexec at ffffffff810c5d92
     #2 [ffff88008ba03a90] oops_end at ffffffff8152b510
     #3 [ffff88008ba03ac0] die at ffffffff81010e0b
     #4 [ffff88008ba03af0] do_trap at ffffffff8152ad74
     #5 [ffff88008ba03b50] do_invalid_op at ffffffff8100cf95
     #6 [ffff88008ba03bf0] invalid_op at ffffffff8100bf9b
        [exception RIP: ata_sff_hsm_move+317]
        RIP: ffffffff813a77ad  RSP: ffff88008ba03ca0  RFLAGS: 00010097
        RAX: 0000000000000000  RBX: ffff881c1121dc60  RCX: 0000000000000000
        RDX: ffff881c1121dd10  RSI: ffff881c1121dc60  RDI: ffff881c1121c000
        RBP: ffff88008ba03d00   R8: 0000000000000000   R9: 000000000000002e
        R10: 000000000001003f  R11: 000000000000009b  R12: ffff881c1121c000
        R13: 0000000000000000  R14: 0000000000000050  R15: ffff881c1121dd78
        ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
     #7 [ffff88008ba03d08] ata_sff_host_intr at ffffffff813a7fbd
     #8 [ffff88008ba03d38] ata_sff_interrupt at ffffffff813a821e
     #9 [ffff88008ba03d78] handle_IRQ_event at ffffffff810e6ec0

commit 36b8f27a491d339ad4684c7560a398bcf6eda0d8
Author: Jim Lin <jilin@nvidia.com>
Date:   Thu Jan 8 20:25:05 2015 +0800

    pinctrl: Fix two deadlocks
    
    commit db93facfb0ef542aa5d8079e47580b3e669a4d82 upstream.
    
    This patch is to fix two deadlock cases.
    Deadlock 1:
    CPU #1
     pinctrl_register-> pinctrl_get ->
     create_pinctrl
     (Holding lock pinctrl_maps_mutex)
     -> get_pinctrl_dev_from_devname
     (Trying to acquire lock pinctrldev_list_mutex)
    CPU #0
     pinctrl_unregister
     (Holding lock pinctrldev_list_mutex)
     -> pinctrl_put ->> pinctrl_free ->
     pinctrl_dt_free_maps -> pinctrl_unregister_map
     (Trying to acquire lock pinctrl_maps_mutex)
    
    Simply to say
    CPU#1 is holding lock A and trying to acquire lock B,
    CPU#0 is holding lock B and trying to acquire lock A.
    
    Deadlock 2:
    CPU #3
     pinctrl_register-> pinctrl_get ->
     create_pinctrl
     (Holding lock pinctrl_maps_mutex)
     -> get_pinctrl_dev_from_devname
     (Trying to acquire lock pinctrldev_list_mutex)
    CPU #2
     pinctrl_unregister
     (Holding lock pctldev->mutex)
     -> pinctrl_put ->> pinctrl_free ->
     pinctrl_dt_free_maps -> pinctrl_unregister_map
     (Trying to acquire lock pinctrl_maps_mutex)
    CPU #0
     tegra_gpio_request
     (Holding lock pinctrldev_list_mutex)
     -> pinctrl_get_device_gpio_range
     (Trying to acquire lock pctldev->mutex)
    
    Simply to say
    CPU#3 is holding lock A and trying to acquire lock D,
    CPU#2 is holding lock B and trying to acquire lock A,
    CPU#0 is holding lock D and trying to acquire lock B.
    
    Signed-off-by: Jim Lin <jilin@nvidia.com>
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit c96807abeade37994e1105bbea59e79c3d699114
Author: Johan Hovold <johan@kernel.org>
Date:   Tue Jan 13 13:00:05 2015 +0100

    gpio: sysfs: fix gpio device-attribute leak
    
    commit 0915e6feb38de8d3601819992a5bd050201a56fa upstream.
    
    The gpio device attributes were never destroyed when the gpio was
    unexported (or on export failures).
    
    Use device_create_with_groups() to create the default device attributes
    of the gpio class device. Note that this also fixes the
    attribute-creation race with userspace for these attributes.
    
    Remove contingent attributes in export error path and on unexport.
    
    Fixes: d8f388d8dc8d ("gpio: sysfs interface")
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 0145d4dd46a3ccd2be6438439201762c7a89d0fb
Author: Johan Hovold <johan@kernel.org>
Date:   Tue Jan 13 13:00:04 2015 +0100

    gpio: sysfs: fix gpio-chip device-attribute leak
    
    commit 121b6a79955a3a3fd7bbb9b8cb88d5b9dad6283d upstream.
    
    The gpio-chip device attributes were never destroyed when the device was
    removed.
    
    Fix by using device_create_with_groups() to create the device attributes
    of the chip class device.
    
    Note that this also fixes the attribute-creation race with userspace.
    
    Fixes: d8f388d8dc8d ("gpio: sysfs interface")
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 1b6365b32854cf94aee0e4531e347b419dfc4885
Author: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Date:   Tue Sep 3 16:26:49 2013 +0300

    crypto: sha256_ssse3 - use correct module alias for sha224
    
    commit 7d444909a25ed4a9dbc546bf9528c8d2e3bf3752 upstream.
    
    Commit a710f761f (crypto: sha256_ssse3 - add sha224 support) attempted to add
    MODULE_ALIAS for SHA-224, but it ended up being "sha384", probably because
    mix-up with previous commit 340991e30 (crypto: sha512_ssse3 - add sha384
    support). Patch corrects module alias to "sha224".
    
    Reported-by: Pierre-Mayeul Badaire <pierre-mayeul.badaire@m4x.org>
    Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit d0a8ea21073b520c39ab577ed663baeff20a0fb4
Author: Kent Overstreet <kmo@daterainc.com>
Date:   Mon May 19 08:57:55 2014 -0700

    bcache: Make sure to pass GFP_WAIT to mempool_alloc()
    
    commit bcf090e0040e30f8409e6a535a01e6473afb096f upstream.
    
    this was very wrong - mempool_alloc() only guarantees success with GFP_WAIT.
    bcache uses GFP_NOWAIT in various other places where we have a fallback,
    circuits must've gotten crossed when writing this code or something.
    
    Signed-off-by: Kent Overstreet <kmo@daterainc.com>
    Cc: Gabriel de Perthuis <g2p.code@gmail.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit e9f9083556e7e829c7aa66646ef041ab26e6a471
Author: Sagi Grimberg <sagig@mellanox.com>
Date:   Tue Dec 2 16:57:29 2014 +0200

    iser-target: Fix implicit termination of connections
    
    commit b02efbfc9a051b41e71fe8f94ddf967260e024a6 upstream.
    
    In situations such as bond failover, The new session establishment
    implicitly invokes the termination of the old connection.
    
    So, we don't want to wait for the old connection wait_conn to completely
    terminate before we accept the new connection and post a login response.
    
    The solution is to deffer the comp_wait completion and the conn_put to
    a work so wait_conn will effectively be non-blocking (flush errors are
    assumed to come very fast).
    
    We allocate isert_release_wq with WQ_UNBOUND and WQ_UNBOUND_MAX_ACTIVE
    to spread the concurrency of release works.
    
    Reported-by: Slava Shwartsman <valyushash@gmail.com>
    Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
    Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 625b1a08d2bc02bdd0154ec9c811f0e63b2e2a71
Author: Sagi Grimberg <sagig@mellanox.com>
Date:   Tue Dec 2 16:57:27 2014 +0200

    iser-target: Handle ADDR_CHANGE event for listener cm_id
    
    commit ca6c1d82d12d8013fb75ce015900d62b9754623c upstream.
    
    The np listener cm_id will also get ADDR_CHANGE event
    upcall (in case it is bound to a specific IP). Handle
    it correctly by creating a new cm_id and implicitly
    destroy the old one.
    
    Since this is the second event a listener np cm_id may
    encounter, we move the np cm_id event handling to a
    routine.
    
    Squashed:
    
    iser-target: Move cma_id setup to a function
    
    Reported-by: Slava Shwartsman <valyushash@gmail.com>
    Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
    Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 057c1b286775eb193e04c4da9dde74e6f1852ec3
Author: Sagi Grimberg <sagig@mellanox.com>
Date:   Tue Dec 2 16:57:26 2014 +0200

    iser-target: Fix connected_handler + teardown flow race
    
    commit 19e2090fb246ca21b3e569ead51a6a7a1748eadd upstream.
    
    Take isert_conn pointer from cm_id->qp->qp_context. This
    will allow us to know that the cm_id context is always
    the network portal. This will make the cm_id event check
    (connection or network portal) more reliable.
    
    In order to avoid a NULL dereference in cma_id->qp->qp_context
    we destroy the qp after we destroy the cm_id (and make the
    dereference safe). session stablishment/teardown sequences
    can happen in parallel, we should take into account that
    connected_handler might race with connection teardown flow.
    
    Also, protect isert_conn->conn_device->active_qps decrement
    within the error patch during QP creation failure and the
    normal teardown path in isert_connect_release().
    
    Squashed:
    
    iser-target: Decrement completion context active_qps in error flow
    
    Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
    Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit a64969e4418b1c13286b50bf912b5dab584aac1f
Author: Sagi Grimberg <sagig@mellanox.com>
Date:   Tue Dec 2 16:57:21 2014 +0200

    iser-target: Parallelize CM connection establishment
    
    commit 2371e5da8cfe91443339b54444dec6254fdd6dfc upstream.
    
    There is no point in accepting a new CM request only
    when we are completely done with the last iscsi login.
    Instead we accept immediately, this will also cause the
    CM connection to reach connected state and the initiator
    is allowed to send the first login. We mark that we got
    the initial login and let iscsi layer pick it up when it
    gets there.
    
    This reduces the parallel login sequence by a factor of
    more then 4 (and more for multi-login) and also prevents
    the initiator (who does all logins in parallel) from
    giving up on login timeout expiration.
    
    In order to support multiple login requests sequence (CHAP)
    we call isert_rx_login_req from isert_rx_completion insead
    of letting isert_get_login_rx call it.
    
    Squashed:
    
    iser-target: Use kref_get_unless_zero in connected_handler
    iser-target: Acquire conn_mutex when changing connection state
    iser-target: Reject connect request in failure path
    
    Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
    Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 3ebffafc28ea4ff4599429f02bdf1f1dfbb50c67
Author: Sagi Grimberg <sagig@mellanox.com>
Date:   Tue Dec 2 16:57:20 2014 +0200

    iser-target: Fix flush + disconnect completion handling
    
    commit 128e9cc84566a84146baea2335b3824288eed817 upstream.
    
    ISER_CONN_UP state is not sufficient to know if
    we should wait for completion of flush errors and
    disconnected_handler event.
    
    Instead, split it to 2 states:
    - ISER_CONN_UP: Got to CM connected phase, This state
    indicates that we need to wait for a CM disconnect
    event before going to teardown.
    
    - ISER_CONN_FULL_FEATURE: Got to full feature phase
    after we posted login response, This state indicates
    that we posted recv buffers and we need to wait for
    flush completions before going to teardown.
    
    Also avoid deffering disconnected handler to a work,
    and handle it within disconnected handler.
    More work here is needed to handle DEVICE_REMOVAL event
    correctly (cleanup all resources).
    
    Squashed:
    
    iser-target: Don't deffer disconnected handler to a work
    
    Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
    Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 9362d6bc8aada3c172054ae12a53ecc9df17d680
Author: Sagi Grimberg <sagig@mellanox.com>
Date:   Tue Dec 2 16:57:17 2014 +0200

    iscsi,iser-target: Initiate termination only once
    
    commit 954f23722b5753305be490330cf2680b7a25f4a3 upstream.
    
    Since commit 0fc4ea701fcf ("Target/iser: Don't put isert_conn inside
    disconnected handler") we put the conn kref in isert_wait_conn, so we
    need .wait_conn to be invoked also in the error path.
    
    Introduce call to isert_conn_terminate (called under lock)
    which transitions the connection state to TERMINATING and calls
    rdma_disconnect. If the state is already teminating, just bail
    out back (temination started).
    
    Also, make sure to destroy the connection when getting a connect
    error event if didn't get to connected (state UP). Same for the
    handling of REJECTED and UNREACHABLE cma events.
    
    Squashed:
    
    iscsi-target: Add call to wait_conn in establishment error flow
    
    Reported-by: Slava Shwartsman <valyushash@gmail.com>
    Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
    Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 785845986d23629bd0b2286b00101ba01c40fce0
Author: Nicholas Bellinger <nab@linux-iscsi.org>
Date:   Sun Dec 21 10:42:08 2014 -0800

    vhost-scsi: Add missing virtio-scsi -> TCM attribute conversion
    
    commit 46243860806bdc2756f3ce8ac86b4d7c616bcd6c upstream.
    
    While looking at hch's recent conversion to drop the MSG_*_TAG
    definitions, I noticed a long standing bug in vhost-scsi where
    the VIRTIO_SCSI_S_* attribute definitions where incorrectly
    being passed directly into target_submit_cmd_map_sgls().
    
    This patch adds the missing virtio-scsi to TCM/SAM task attribute
    conversion.
    
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Michael S. Tsirkin <mst@redhat.com>
    Cc: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit b745a867f00067b81579ec373f71224401eeebc2
Author: Trond Myklebust <trond.myklebust@primarydata.com>
Date:   Fri Jan 2 15:05:25 2015 -0500

    LOCKD: Fix a race when initialising nlmsvc_timeout
    
    commit 06bed7d18c2c07b3e3eeadf4bd357f6e806618cc upstream.
    
    This commit fixes a race whereby nlmclnt_init() first starts the lockd
    daemon, and then calls nlm_bind_host() with the expectation that
    nlmsvc_timeout has already been initialised. Unfortunately, there is no
    no synchronisation between lockd() and lockd_up() to guarantee that this
    is the case.
    
    Fix is to move the initialisation of nlmsvc_timeout into lockd_create_svc
    
    Fixes: 9a1b6bf818e74 ("LOCKD: Don't call utsname()->nodename...")
    Cc: Bruce Fields <bfields@fieldses.org>
    Cc: stable@vger.kernel.org # 3.10.x
    Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit f465346bc77a7c444f6c83b789fae23df454322f
Author: Daniel Borkmann <dborkman@redhat.com>
Date:   Sat Jan 3 13:11:10 2015 +0100

    x86, um: actually mark system call tables readonly
    
    commit b485342bd79af363c77ef1a421c4a0aef2de9812 upstream.
    
    Commit a074335a370e ("x86, um: Mark system call tables readonly") was
    supposed to mark the sys_call_table in UML as RO by adding the const,
    but it doesn't have the desired effect as it's nevertheless being placed
    into the data section since __cacheline_aligned enforces sys_call_table
    being placed into .data..cacheline_aligned instead. We need to use
    the ____cacheline_aligned version instead to fix this issue.
    
    Before:
    
    $ nm -v arch/x86/um/sys_call_table_64.o | grep -1 "sys_call_table"
                     U sys_writev
    0000000000000000 D sys_call_table
    0000000000000000 D syscall_table_size
    
    After:
    
    $ nm -v arch/x86/um/sys_call_table_64.o | grep -1 "sys_call_table"
                     U sys_writev
    0000000000000000 R sys_call_table
    0000000000000000 D syscall_table_size
    
    Fixes: a074335a370e ("x86, um: Mark system call tables readonly")
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
    Signed-off-by: Richard Weinberger <richard@nod.at>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit ad63ddb0b121132417f91578791e88306396a41b
Author: Richard Weinberger <richard@nod.at>
Date:   Wed Dec 10 13:53:51 2014 +0100

    um: Skip futex_atomic_cmpxchg_inatomic() test
    
    commit f911d731054ab3d82ee72a16b889e17ca3a2332a upstream.
    
    futex_atomic_cmpxchg_inatomic() does not work on UML because
    it triggers a copy_from_user() in kernel context.
    On UML copy_from_user() can only be used if the kernel was called
    by a real user space process such that UML can use ptrace()
    to fetch the value.
    
    Reported-by: Miklos Szeredi <miklos@szeredi.hu>
    Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org>
    Signed-off-by: Richard Weinberger <richard@nod.at>
    Tested-by: Daniel Walter <d.walter@0x90.at>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 0a5c9ec92cef9186f352f665931053236c1f25ac
Author: Dan Carpenter <dan.carpenter@oracle.com>
Date:   Fri Dec 12 16:58:05 2014 -0800

    decompress_bunzip2: off by one in get_next_block()
    
    commit b5c8afe5be51078a979d86ae5ae78c4ac948063d upstream.
    
    "origPtr" is used as an offset into the bd->dbuf[] array.  That array is
    allocated in start_bunzip() and has "bd->dbufSize" number of elements so
    the test here should be >= instead of >.
    
    Later we check "origPtr" again before using it as an offset so I don't
    know if this bug can be triggered in real life.
    
    Fixes: bc22c17e12c1 ('bzip2/lzma: library support for gzip, bzip2 and lzma decompression')
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Cc: Alain Knaff <alain@knaff.lu>
    Cc: Yinghai Lu <yinghai@kernel.org>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 599e98f86f1385b05f5b8d3562ad1317df482004
Author: Geert Uytterhoeven <geert+renesas@glider.be>
Date:   Tue Jan 6 14:39:10 2015 +0100

    ARM: shmobile: sh73a0 legacy: Set .control_parent for all irqpin instances
    
    commit b0ddb319db3d7a1943445f0de0a45c07a7f3457a upstream.
    
    The sh73a0 INTC can't mask interrupts properly most likely due to a
    hardware bug. Set the .control_parent flag to delegate masking to the
    parent interrupt controller, like was already done for irqpin1.
    
    Without this, accessing the three-axis digital accelerometer ADXL345
    on kzm9g through /dev/input/event1 causes an interrupt storm, which
    requires a power-cycle to recover from.
    
    This was inspired by a patch for arch/arm/boot/dts/sh73a0.dtsi from
    Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>.
    
    Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
    Fixes: 341eb5465f67437a ("ARM: shmobile: INTC External IRQ pin driver on sh73a0")
    Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 3ae863e17a0d44abf77479a886a5b50c9895029d
Author: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
Date:   Mon Jan 5 15:45:45 2015 -0800

    ARM: omap5/dra7xx: Fix frequency typos
    
    commit 572b24e6d85d98cdc552f07e9fb9870d9460d81b upstream.
    
    The switch statement of the possible list of SYSCLK1 frequencies is
    missing a 0 in 4 out of the 7 frequencies.
    
    Fixes: fa6d79d27614 ("ARM: OMAP: Add initialisation for the real-time counter")
    Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca>
    Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
    Acked-by: Nishanth Menon <nm@ti.com>
    Signed-off-by: Tony Lindgren <tony@atomide.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit b167a029818c776c514b340a1f09e1471d86c621
Author: Gary Bisson <bisson.gary@gmail.com>
Date:   Wed Dec 3 15:03:51 2014 -0800

    ARM: clk-imx6q: fix video divider for rev T0 1.0
    
    commit 81ef447950bf0955aca46f4a7617d8ce435cf0ce upstream.
    
    The post dividers do not work on i.MX6Q rev T0 1.0 so they must be fixed
    to 1. As the table index was wrong, a divider a of 4 could still be
    requested which implied the clock not to be set properly. This is the
    root cause of the HDMI not working at high resolution on rev T0 1.0 of
    the SoC.
    
    Signed-off-by: Gary Bisson <bisson.gary@gmail.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 9ba7695308aede878aa99e96c5c697afeafafcfb
Author: Dmitry Voytik <voytikd@gmail.com>
Date:   Thu Nov 6 22:46:20 2014 +0400

    ARM: imx6q: drop unnecessary semicolon
    
    commit d2a10a1727b3948019128e83162f22c65859f1fd upstream.
    
    Drop unnecessary semicolon after closing curly bracket.
    
    Signed-off-by: Dmitry Voytik <voytikd@gmail.com>
    Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 36f62c2db7c4e344e9816f8c205fb0d02d6e961e
Author: Fabio Estevam <fabio.estevam@freescale.com>
Date:   Fri Dec 5 16:16:07 2014 -0200

    ARM: dts: imx25: Fix the SPI1 clocks
    
    commit 7a87e9cbc3a2f0ff0955815335e08c9862359130 upstream.
    
    From Documentation/devicetree/bindings/clock/imx25-clock.txt:
    
    	cspi1_ipg		78
    	cspi2_ipg		79
    	cspi3_ipg		80
    
    , so fix the SPI1 clocks accordingly to avoid a kernel hang when trying to
    access SPI1.
    
    Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
    Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 3bd705486c1f8169c052835be2a54102d725210f
Author: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date:   Thu Jan 8 14:53:23 2015 -0800

    Input: I8042 - add Acer Aspire 7738 to the nomux list
    
    commit 9333caeaeae4f831054e0e127a6ed3948b604d3e upstream.
    
    When KBC is in active multiplexing mode the touchpad on this laptop does
    not work.
    
    Reported-by: Bilal Koc <koc.bilo@googlemail.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 78fa0d5560b6ffb6f67a8cdc2e88804e1c3c2ea1
Author: Srihari Vijayaraghavan <linux.bug.reporting@gmail.com>
Date:   Wed Jan 7 16:25:53 2015 -0800

    Input: i8042 - reset keyboard to fix Elantech touchpad detection
    
    commit 148e9a711e034e06310a8c36b64957934ebe30f2 upstream.
    
    On some laptops, keyboard needs to be reset in order to successfully detect
    touchpad (e.g., some Gigabyte laptop models with Elantech touchpads).
    Without resettin keyboard touchpad pretends to be completely dead.
    
    Based on the original patch by Mateusz Jończyk this version has been
    expanded to include DMI based detection & application of the fix
    automatically on the affected models of laptops. This has been confirmed to
    fix problem by three users already on three different models of laptops.
    
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=81331
    Signed-off-by: Srihari Vijayaraghavan <linux.bug.reporting@gmail.com>
    Acked-by: Mateusz Jończyk <mat.jonczyk@o2.pl>
    Tested-by: Srihari Vijayaraghavan <linux.bug.reporting@gmail.com>
    Tested by: Zakariya Dehlawi <zdehlawi@gmail.com>
    Tested-by: Guillaum Bouchard <guillaum.bouchard@gmail.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 014ff2c59685cb8045247dea39a10e93855d4293
Author: Ahmed S. Darwish <ahmed.darwish@valeo.com>
Date:   Mon Jan 5 12:57:13 2015 -0500

    can: kvaser_usb: Don't send a RESET_CHIP for non-existing channels
    
    commit 5e7e6e0c9b47a45576c38b4a72d67927a5e049f7 upstream.
    
    Recent Leaf firmware versions (>= 3.1.557) do not allow to send
    commands for non-existing channels.  If a command is sent for a
    non-existing channel, the firmware crashes.
    
    Reported-by: Christopher Storah <Christopher.Storah@invetech.com.au>
    Signed-off-by: Olivier Sobrie <olivier@sobrie.be>
    Signed-off-by: Ahmed S. Darwish <ahmed.darwish@valeo.com>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 3a74797d57cb89da1940a2bbb989d14fc40713e3
Author: Ahmed S. Darwish <ahmed.darwish@valeo.com>
Date:   Mon Jan 5 12:52:06 2015 -0500

    can: kvaser_usb: Reset all URB tx contexts upon channel close
    
    commit 889b77f7fd2bcc922493d73a4c51d8a851505815 upstream.
    
    Flooding the Kvaser CAN to USB dongle with multiple reads and
    writes in very high frequency (*), closing the CAN channel while
    all the transmissions are on (#), opening the device again (@),
    then sending a small number of packets would make the driver
    enter an almost infinite loop of:
    
    [....]
    [15959.853988] kvaser_usb 4-3:1.0 can0: cannot find free context
    [15959.853990] kvaser_usb 4-3:1.0 can0: cannot find free context
    [15959.853991] kvaser_usb 4-3:1.0 can0: cannot find free context
    [15959.853993] kvaser_usb 4-3:1.0 can0: cannot find free context
    [15959.853994] kvaser_usb 4-3:1.0 can0: cannot find free context
    [15959.853995] kvaser_usb 4-3:1.0 can0: cannot find free context
    [....]
    
    _dragging the whole system down_ in the process due to the
    excessive logging output.
    
    Initially, this has caused random panics in the kernel due to a
    buggy error recovery path.  That got fixed in an earlier commit.(%)
    This patch aims at solving the root cause. -->
    
    16 tx URBs and contexts are allocated per CAN channel per USB
    device. Such URBs are protected by:
    
    a) A simple atomic counter, up to a value of MAX_TX_URBS (16)
    b) A flag in each URB context, stating if it's free
    c) The fact that ndo_start_xmit calls are themselves protected
       by the networking layers higher above
    
    After grabbing one of the tx URBs, if the driver noticed that all
    of them are now taken, it stops the netif transmission queue.
    Such queue is worken up again only if an acknowedgment was received
    from the firmware on one of our earlier-sent frames.
    
    Meanwhile, upon channel close (#), the driver sends a CMD_STOP_CHIP
    to the firmware, effectively closing all further communication.  In
    the high traffic case, the atomic counter remains at MAX_TX_URBS,
    and all the URB contexts remain marked as active.  While opening
    the channel again (@), it cannot send any further frames since no
    more free tx URB contexts are available.
    
    Reset all tx URB contexts upon CAN channel close.
    
    (*) 50 parallel instances of `cangen0 -g 0 -ix`
    (#) `ifconfig can0 down`
    (@) `ifconfig can0 up`
    (%) "can: kvaser_usb: Don't free packets when tight on URBs"
    
    Signed-off-by: Ahmed S. Darwish <ahmed.darwish@valeo.com>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit fa5b1bd95f55911436a48d21f9823a1bd026890d
Author: Ahmed S. Darwish <ahmed.darwish@valeo.com>
Date:   Mon Jan 5 12:49:10 2015 -0500

    can: kvaser_usb: Don't free packets when tight on URBs
    
    commit b442723fcec445fb0ae1104888dd22cd285e0a91 upstream.
    
    Flooding the Kvaser CAN to USB dongle with multiple reads and
    writes in high frequency caused seemingly-random panics in the
    kernel.
    
    On further inspection, it seems the driver erroneously freed the
    to-be-transmitted packet upon getting tight on URBs and returning
    NETDEV_TX_BUSY, leading to invalid memory writes and double frees
    at a later point in time.
    
    Note:
    
    Finding no more URBs/transmit-contexts and returning NETDEV_TX_BUSY
    is a driver bug in and out of itself: it means that our start/stop
    queue flow control is broken.
    
    This patch only fixes the (buggy) error handling code; the root
    cause shall be fixed in a later commit.
    
    Acked-by: Olivier Sobrie <olivier@sobrie.be>
    Signed-off-by: Ahmed S. Darwish <ahmed.darwish@valeo.com>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 3505b249a4750ba69b0224a5aba6978d321dead4
Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date:   Thu Dec 11 18:14:18 2014 +0100

    usb: musb: stuff leak of struct usb_hcd
    
    commit 68693b8ea4e284c46bff919ac62bd9ccdfdbb6ba upstream.
    
    since the split of host+gadget mode in commit 74c2e9360058 ("usb: musb:
    factor out hcd initalization") we leak the usb_hcd struct. We call now
    musb_host_cleanup() which does basically usb_remove_hcd() and also sets
    the hcd variable to NULL. Doing so makes the finall call to
    musb_host_free() basically a nop and the usb_hcd remains around for ever
    without anowner.
    This patch drops that NULL assignment for that reason.
    
    Fixes: 74c2e9360058 ("usb: musb: factor out hcd initalization")
    Cc: Daniel Mack <zonque@gmail.com>
    Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    Signed-off-by: Felipe Balbi <balbi@ti.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 879e2c48f34bd5c41b7ea5902035dbce40931aaa
Author: Alan Stern <stern@rowland.harvard.edu>
Date:   Thu Dec 4 10:21:56 2014 -0500

    USB: EHCI: fix initialization bug in iso_stream_schedule()
    
    commit 6d89252a998a695ecb0348fc2d717dc33d90cae9 upstream.
    
    Commit c3ee9b76aa93 (EHCI: improved logic for isochronous scheduling)
    introduced the idea of using ehci->last_iso_frame as the origin (or
    base) for the circular calculations involved in modifying the
    isochronous schedule.  However, the new code it added used
    ehci->last_iso_frame before the value was properly initialized.  This
    patch rectifies the mistake by moving the initialization lines earlier
    in iso_stream_schedule().
    
    This fixes Bugzilla #72891.
    
    Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
    Fixes: c3ee9b76aa93
    Reported-by: Joe Bryant <tenminjoe@yahoo.com>
    Tested-by: Joe Bryant <tenminjoe@yahoo.com>
    Tested-by: Martin Long <martin@longhome.co.uk>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 8f3084c44b70ee9e8f5b6bd4816a129bc2646f21
Author: Johan Hovold <johan@kernel.org>
Date:   Mon Jan 5 16:04:13 2015 +0100

    USB: console: fix potential use after free
    
    commit 32a4bf2e81ec378e5925d4e069e0677a6c86a6ad upstream.
    
    Use tty kref to release the fake tty in usb_console_setup to avoid use
    after free if the underlying serial driver has acquired a reference.
    
    Note that using the tty destructor release_one_tty requires some more
    state to be initialised.
    
    Fixes: 4a90f09b20f4 ("tty: usb-serial krefs")
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 56dfc960370c6b48c69394fa088935a79c7ab3e4
Author: Johan Hovold <johan@kernel.org>
Date:   Mon Jan 5 16:04:12 2015 +0100

    USB: console: fix uninitialised ldisc semaphore
    
    commit d269d4434c72ed0da3a9b1230c30da82c4918c63 upstream.
    
    The USB console currently allocates a temporary fake tty which is used
    to pass terminal settings to the underlying serial driver.
    
    The tty struct is not fully initialised, something which can lead to a
    lockdep warning (or worse) if a serial driver tries to acquire a
    line-discipline reference:
    
    	usbserial: USB Serial support registered for pl2303
    	pl2303 1-2.1:1.0: pl2303 converter detected
    	usb 1-2.1: pl2303 converter now attached to ttyUSB0
    	INFO: trying to register non-static key.
    	the code is fine but needs lockdep annotation.
    	turning off the locking correctness validator.
    	CPU: 0 PID: 68 Comm: udevd Tainted: G        W      3.18.0-rc5 #10
    	[<c0016f04>] (unwind_backtrace) from [<c0013978>] (show_stack+0x20/0x24)
    	[<c0013978>] (show_stack) from [<c0449794>] (dump_stack+0x24/0x28)
    	[<c0449794>] (dump_stack) from [<c006f730>] (__lock_acquire+0x1e50/0x2004)
    	[<c006f730>] (__lock_acquire) from [<c0070128>] (lock_acquire+0xe4/0x18c)
    	[<c0070128>] (lock_acquire) from [<c027c6f8>] (ldsem_down_read_trylock+0x78/0x90)
    	[<c027c6f8>] (ldsem_down_read_trylock) from [<c027a1cc>] (tty_ldisc_ref+0x24/0x58)
    	[<c027a1cc>] (tty_ldisc_ref) from [<c0340760>] (usb_serial_handle_dcd_change+0x48/0xe8)
    	[<c0340760>] (usb_serial_handle_dcd_change) from [<bf000484>] (pl2303_read_int_callback+0x210/0x220 [pl2303])
    	[<bf000484>] (pl2303_read_int_callback [pl2303]) from [<c031624c>] (__usb_hcd_giveback_urb+0x80/0x140)
    	[<c031624c>] (__usb_hcd_giveback_urb) from [<c0316fc0>] (usb_giveback_urb_bh+0x98/0xd4)
    	[<c0316fc0>] (usb_giveback_urb_bh) from [<c0042e44>] (tasklet_hi_action+0x9c/0x108)
    	[<c0042e44>] (tasklet_hi_action) from [<c0042380>] (__do_softirq+0x148/0x42c)
    	[<c0042380>] (__do_softirq) from [<c00429cc>] (irq_exit+0xd8/0x114)
    	[<c00429cc>] (irq_exit) from [<c007ae58>] (__handle_domain_irq+0x84/0xdc)
    	[<c007ae58>] (__handle_domain_irq) from [<c000879c>] (omap_intc_handle_irq+0xd8/0xe0)
    	[<c000879c>] (omap_intc_handle_irq) from [<c0014544>] (__irq_svc+0x44/0x7c)
    	Exception stack(0xdf4e7f08 to 0xdf4e7f50)
    	7f00:                   debc0b80 df4e7f5c 00000000 00000000 debc0b80 be8da96c
    	7f20: 00000000 00000128 c000fc84 df4e6000 00000000 df4e7f94 00000004 df4e7f50
    	7f40: c038ebc0 c038d74c 600f0013 ffffffff
    	[<c0014544>] (__irq_svc) from [<c038d74c>] (___sys_sendmsg.part.29+0x0/0x2e0)
    	[<c038d74c>] (___sys_sendmsg.part.29) from [<c038ec08>] (SyS_sendmsg+0x18/0x1c)
    	[<c038ec08>] (SyS_sendmsg) from [<c000fa00>] (ret_fast_syscall+0x0/0x48)
    	console [ttyUSB0] enabled
    
    Fixes: 36697529b5bb ("tty: Replace ldisc locking with ldisc_sem")
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 59a9543fa081caa845b6e6d93a274fa28ade1d38
Author: Johan Hovold <johan@kernel.org>
Date:   Mon Dec 22 18:39:39 2014 +0100

    USB: keyspan: fix null-deref at probe
    
    commit b5122236bba8d7ef62153da5b55cc65d0944c61e upstream.
    
    Fix null-pointer dereference during probe if the interface-status
    completion handler is called before the individual ports have been set
    up.
    
    Fixes: f79b2d0fe81e ("USB: keyspan: fix NULL-pointer dereferences and
    memory leaks")
    Reported-by: Richard <richjunk@pacbell.net>
    Tested-by: Richard <richjunk@pacbell.net>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 689b76995d49bb808958a054f55c1f2648571a84
Author: David Peterson <david.peterson@cel.com>
Date:   Tue Jan 6 15:00:52 2015 +0000

    USB: cp210x: add IDs for CEL USB sticks and MeshWorks devices
    
    commit 1ae78a4870989a354028cb17dabf819b595e70e3 upstream.
    
    Added virtual com port VID/PID entries for CEL USB sticks and MeshWorks
    devices.
    
    Signed-off-by: David Peterson <david.peterson@cel.com>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 828cc823090d376be166b7f88674de31bf4a30b6
Author: Preston Fick <pffick@gmail.com>
Date:   Sat Dec 27 01:32:41 2014 -0600

    USB: cp210x: fix ID for production CEL MeshConnect USB Stick
    
    commit 90441b4dbe90ba0c38111ea89fa093a8c9627801 upstream.
    
    Fixing typo for MeshConnect IDs. The original PID (0x8875) is not in
    production and is not needed. Instead it has been changed to the
    official production PID (0x8857).
    
    Signed-off-by: Preston Fick <pffick@gmail.com>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 51a63126581d4f0527ec2d3157d03b889ea0a991
Author: Amit Virdi <amit.virdi@st.com>
Date:   Tue Jan 13 14:27:21 2015 +0530

    usb: dwc3: gadget: Stop TRB preparation after limit is reached
    
    commit 39e60635a01520e8c8ed3946a28c2b98e6a46f79 upstream.
    
    DWC3 gadget sets up a pool of 32 TRBs for each EP during initialization. This
    means, the max TRBs that can be submitted for an EP is fixed to 32. Since the
    request queue for an EP is a linked list, any number of requests can be queued
    to it by the gadget layer.  However, the dwc3 driver must not submit TRBs more
    than the pool it has created for. This limit wasn't respected when SG was used
    resulting in submitting more than the max TRBs, eventually leading to
    non-transfer of the TRBs submitted over the max limit.
    
    Root cause:
    When SG is used, there are two loops iterating to prepare TRBs:
     - Outer loop over the request_list
     - Inner loop over the SG list
    The code was missing break to get out of the outer loop.
    
    Fixes: eeb720fb21d6 (usb: dwc3: gadget: add support for SG lists)
    Signed-off-by: Amit Virdi <amit.virdi@st.com>
    Signed-off-by: Felipe Balbi <balbi@ti.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 71ea1da778a37f26d3d697e222d97cf0227cb700
Author: Amit Virdi <amit.virdi@st.com>
Date:   Tue Jan 13 14:27:20 2015 +0530

    usb: dwc3: gadget: Fix TRB preparation during SG
    
    commit ec512fb8e5611fed1df2895f90317ce6797d6b32 upstream.
    
    When scatter gather (SG) is used, multiple TRBs are prepared from one DWC3
    request (dwc3_request). So while preparing TRBs, the 'last' flag should be set
    only when it is the last TRB being prepared from the last dwc3_request entry.
    
    The current implementation uses list_is_last to check if the dwc3_request is the
    last entry from the request_list. However, list_is_last returns false for the
    last entry too. This is because, while preparing the first TRB from a request,
    the function dwc3_prepare_one_trb modifies the request's next and prev pointers
    while moving the URB to req_queued. Hence, list_is_last always returns false no
    matter what.
    
    The correct way is not to access the modified pointers of dwc3_request but to
    use list_empty macro instead.
    
    Fixes: e5ba5ec833aa (usb: dwc3: gadget: fix scatter gather implementation)
    Signed-off-by: Amit Virdi <amit.virdi@st.com>
    Signed-off-by: Felipe Balbi <balbi@ti.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 629bafb6b8994c98af240a849fd0d6a4eaa9300d
Author: Arseny Solokha <asolokha@kb.kras.ru>
Date:   Sat Dec 6 09:54:06 2014 +0700

    OHCI: add a quirk for ULi M5237 blocking on reset
    
    commit 56abcab833fafcfaeb2f5b25e0364c1dec45f53e upstream.
    
    Commit 8dccddbc2368 ("OHCI: final fix for NVIDIA problems (I hope)")
    introduced into 3.1.9 broke boot on e.g. Freescale P2020DS development
    board. The code path that was previously specific to NVIDIA controllers
    had then become taken for all chips.
    
    However, the M5237 installed on the board wedges solid when accessing
    its base+OHCI_FMINTERVAL register, making it impossible to boot any
    kernel newer than 3.1.8 on this particular and apparently other similar
    machines.
    
    Don't readl() and writel() base+OHCI_FMINTERVAL on PCI ID 10b9:5237.
    
    The patch is suitable for the -next tree as well as all maintained
    kernels up to 3.2 inclusive.
    
    Signed-off-by: Arseny Solokha <asolokha@kb.kras.ru>
    Acked-by: Alan Stern <stern@rowland.harvard.edu>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 972bdcaff2111ac9e698f29efc8b4ed2bd102474
Author: Johan Hovold <johan@kernel.org>
Date:   Mon Jan 12 17:12:24 2015 +0100

    gpio: fix memory and reference leaks in gpiochip_add error path
    
    commit 5539b3c938d64a60cb1fc442ac3ce9263d52de0c upstream.
    
    Memory allocated and references taken by of_gpiochip_add and
    acpi_gpiochip_add were never released on errors in gpiochip_add (e.g.
    failure to find free gpio range).
    
    Fixes: 391c970c0dd1 ("of/gpio: add default of_xlate function if device
    has a node pointer")
    Fixes: 664e3e5ac64c ("gpio / ACPI: register to ACPI events
    automatically")
    
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 72464765733575dc89c509f16caabc2af47fda79
Author: Hans Holmberg <hans.holmberg@intel.com>
Date:   Fri Jan 9 09:40:43 2015 +0100

    gpiolib: of: Correct error handling in of_get_named_gpiod_flags
    
    commit 7b8792bbdffdff3abda704f89c6a45ea97afdc62 upstream.
    
    of_get_named_gpiod_flags fails with -EPROBE_DEFER in cases
    where the gpio chip is available and the GPIO translation fails.
    
    This causes drivers to be re-probed erroneusly, and hides the
    real problem(i.e. the GPIO number being out of range).
    
    Signed-off-by: Hans Holmberg <hans.holmberg@intel.com>
    Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit d43170104637ad8499f686064d08c49176fe1243
Author: Trond Myklebust <trond.myklebust@primarydata.com>
Date:   Fri Jan 2 16:25:08 2015 -0500

    NFSv4.1: Fix client id trunking on Linux
    
    commit 1fc0703af3143914a389bfa081c7acb09502ed5d upstream.
    
    Currently, our trunking code will check for session trunking, but will
    fail to detect client id trunking. This is a problem, because it means
    that the client will fail to recognise that the two connections represent
    shared state, even if they do not permit a shared session.
    By removing the check for the server minor id, and only checking the
    major id, we will end up doing the right thing in both cases: we close
    down the new nfs_client and fall back to using the existing one.
    
    Fixes: 05f4c350ee02e ("NFS: Discover NFSv4 server trunking when mounting")
    Cc: Chuck Lever <chuck.lever@oracle.com>
    Tested-by: Chuck Lever <chuck.lever@oracle.com>
    Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 98621891a08259f781e8d939527d9b6cff2aa2c1
Author: Steven Rostedt (Red Hat) <rostedt@goodmis.org>
Date:   Mon Jan 12 12:12:03 2015 -0500

    ftrace/jprobes/x86: Fix conflict between jprobes and function graph tracing
    
    commit 237d28db036e411f22c03cfd5b0f6dc2aa9bf3bc upstream.
    
    If the function graph tracer traces a jprobe callback, the system will
    crash. This can easily be demonstrated by compiling the jprobe
    sample module that is in the kernel tree, loading it and running the
    function graph tracer.
    
     # modprobe jprobe_example.ko
     # echo function_graph > /sys/kernel/debug/tracing/current_tracer
     # ls
    
    The first two commands end up in a nice crash after the first fork.
    (do_fork has a jprobe attached to it, so "ls" just triggers that fork)
    
    The problem is caused by the jprobe_return() that all jprobe callbacks
    must end with. The way jprobes works is that the function a jprobe
    is attached to has a breakpoint placed at the start of it (or it uses
    ftrace if fentry is supported). The breakpoint handler (or ftrace callback)
    will copy the stack frame and change the ip address to return to the
    jprobe handler instead of the function. The jprobe handler must end
    with jprobe_return() which swaps the stack and does an int3 (breakpoint).
    This breakpoint handler will then put back the saved stack frame,
    simulate the instruction at the beginning of the function it added
    a breakpoint to, and then continue on.
    
    For function tracing to work, it hijakes the return address from the
    stack frame, and replaces it with a hook function that will trace
    the end of the call. This hook function will restore the return
    address of the function call.
    
    If the function tracer traces the jprobe handler, the hook function
    for that handler will not be called, and its saved return address
    will be used for the next function. This will result in a kernel crash.
    
    To solve this, pause function tracing before the jprobe handler is called
    and unpause it before it returns back to the function it probed.
    
    Some other updates:
    
    Used a variable "saved_sp" to hold kcb->jprobe_saved_sp. This makes the
    code look a bit cleaner and easier to understand (various tries to fix
    this bug required this change).
    
    Note, if fentry is being used, jprobes will change the ip address before
    the function graph tracer runs and it will not be able to trace the
    function that the jprobe is probing.
    
    Link: http://lkml.kernel.org/r/20150114154329.552437962@goodmis.org
    
    Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 487873cff553e57b6c199b646c4d1561f2db8604
Author: Mugunthan V N <mugunthanvnm@ti.com>
Date:   Tue Jan 13 17:35:49 2015 +0530

    drivers: net: cpsw: fix multicast flush in dual emac mode
    
    commit 25906052d953d3fbdb7e19480b9de5e6bb949f3f upstream.
    
    Since ALE table is a common resource for both the interfaces in Dual EMAC
    mode and while bringing up the second interface in cpsw_ndo_set_rx_mode()
    all the multicast entries added by the first interface is flushed out and
    only second interface multicast addresses are added. Fixing this by
    flushing multicast addresses based on dual EMAC port vlans which will not
    affect the other emac port multicast addresses.
    
    Fixes: d9ba8f9 (driver: net: ethernet: cpsw: dual emac interface implementation)
    Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit da5c0ae9a3434ad6d27c8010116ef05195862355
Author: Wei Yang <weiyang@linux.vnet.ibm.com>
Date:   Wed Jan 7 10:29:11 2015 -0700

    vfio-pci: Fix the check on pci device type in vfio_pci_probe()
    
    commit 7c2e211f3c95b91912a92a8c6736343690042e2e upstream.
    
    Current vfio-pci just supports normal pci device, so vfio_pci_probe() will
    return if the pci device is not a normal device. While current code makes a
    mistake. PCI_HEADER_TYPE is the offset in configuration space of the device
    type, but we use this value to mask the type value.
    
    This patch fixs this by do the check directly on the pci_dev->hdr_type.
    
    Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
    Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 5a075f4ad9eb2ad70c6f941aba1474fba56f9b3f
Author: Takashi Iwai <tiwai@suse.de>
Date:   Fri Oct 24 05:10:20 2014 -0300

    uvcvideo: Fix destruction order in uvc_delete()
    
    commit 2228d80dd05a4fc5a410fde847677b8fb3eb23d7 upstream.
    
    We've got a bug report at disconnecting a Webcam, where the kernel
    spews warnings like below:
      WARNING: CPU: 0 PID: 8385 at ../fs/sysfs/group.c:219 sysfs_remove_group+0x87/0x90()
      sysfs group c0b2350c not found for kobject 'event3'
      CPU: 0 PID: 8385 Comm: queue2:src Not tainted 3.16.2-1.gdcee397-default #1
      Hardware name: ASUSTeK Computer INC. A7N8X-E/A7N8X-E, BIOS ASUS A7N8X-E Deluxe ACPI BIOS Rev 1013  11/12/2004
        c08d0705 ddc75cbc c0718c5b ddc75ccc c024b654 c08c6d44 ddc75ce8 000020c1
        c08d0705 000000db c03d1ec7 c03d1ec7 00000009 00000000 c0b2350c d62c9064
        ddc75cd4 c024b6a3 00000009 ddc75ccc c08c6d44 ddc75ce8 ddc75cfc c03d1ec7
      Call Trace:
        [<c0205ba6>] try_stack_unwind+0x156/0x170
        [<c02046f3>] dump_trace+0x53/0x180
        [<c0205c06>] show_trace_log_lvl+0x46/0x50
        [<c0204871>] show_stack_log_lvl+0x51/0xe0
        [<c0205c67>] show_stack+0x27/0x50
        [<c0718c5b>] dump_stack+0x3e/0x4e
        [<c024b654>] warn_slowpath_common+0x84/0xa0
        [<c024b6a3>] warn_slowpath_fmt+0x33/0x40
        [<c03d1ec7>] sysfs_remove_group+0x87/0x90
        [<c05a2c54>] device_del+0x34/0x180
        [<c05e3989>] evdev_disconnect+0x19/0x50
        [<c05e06fa>] __input_unregister_device+0x9a/0x140
        [<c05e0845>] input_unregister_device+0x45/0x80
        [<f854b1d6>] uvc_delete+0x26/0x110 [uvcvideo]
        [<f84d66f8>] v4l2_device_release+0x98/0xc0 [videodev]
        [<c05a25bb>] device_release+0x2b/0x90
        [<c04ad8bf>] kobject_cleanup+0x6f/0x1a0
        [<f84d5453>] v4l2_release+0x43/0x70 [videodev]
        [<c0372f31>] __fput+0xb1/0x1b0
        [<c02650c1>] task_work_run+0x91/0xb0
        [<c024d845>] do_exit+0x265/0x910
        [<c024df64>] do_group_exit+0x34/0xa0
        [<c025a76f>] get_signal_to_deliver+0x17f/0x590
        [<c0201b6a>] do_signal+0x3a/0x960
        [<c02024f7>] do_notify_resume+0x67/0x90
        [<c071ebb5>] work_notifysig+0x30/0x3b
        [<b7739e60>] 0xb7739e5f
       ---[ end trace b1e56095a485b631 ]---
    
    The cause is that uvc_status_cleanup() is called after usb_put_*() in
    uvc_delete().  usb_put_*() removes the sysfs parent and eventually
    removes the children recursively, so the later device_del() can't find
    its sysfs.  The fix is simply rearrange the call orders in
    uvc_delete() so that the child is removed before the parent.
    
    Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=897736
    Reported-and-tested-by: Martin Pluskal <mpluskal@suse.com>
    
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit b6f8e9abd99f7f03d53944a0ff5f7d0f389f4eaf
Author: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Date:   Thu Oct 30 07:53:05 2014 -0300

    sound: Update au0828 quirks table
    
    commit 678fa12fb8e75c6dc1e781a02e3ddbbba7e1a904 upstream.
    
    The au0828 quirks table is currently not in sync with the au0828
    media driver.
    
    Syncronize it and put them on the same order as found at au0828
    driver, as all the au0828 devices with analog TV need the
    same quirks.
    
    Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit a4687a6d640023f43ae5cac7e664681e43271838
Author: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Date:   Thu Oct 30 07:53:04 2014 -0300

    sound: simplify au0828 quirk table
    
    commit 5d1f00a20d2d56ed480e64e938a2391353ee565b upstream.
    
    Add a macro to simplify au0828 quirk table. That makes easier
    to check it against the USB IDs at drivers/media/usb/au0828/au0828-cards.c.
    
    Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 6b77d12ba98e4e0217131f0029ad298487338626
Author: Sakari Ailus <sakari.ailus@linux.intel.com>
Date:   Tue Sep 16 15:57:07 2014 -0300

    smiapp: Take mutex during PLL update in sensor initialisation
    
    commit f85698cd296f08218a7750f321e94607da128600 upstream.
    
    The mutex does not serialise anything in this case but avoids a lockdep
    warning from the control framework.
    
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit ed1b779dd3e9844244b2a05426b11c3a7d273b03
Author: Frank Schaefer <fschaefer.oss@googlemail.com>
Date:   Mon Sep 29 15:17:35 2014 -0300

    af9005: fix kernel panic on init if compiled without IR
    
    commit 2279948735609d0d17d7384e776b674619f792ef upstream.
    
    This patches fixes an ancient bug in the dvb_usb_af9005 driver, which
    has been reported at least in the following threads:
    https://lkml.org/lkml/2009/2/4/350
    https://lkml.org/lkml/2014/9/18/558
    
    If the driver is compiled in without any IR support (neither
    DVB_USB_AF9005_REMOTE nor custom symbols), the symbol_request calls in
    af9005_usb_module_init() return pointers != NULL although the IR
    symbols are not available.
    
    This leads to the following oops:
    ...
    [    8.529751] usbcore: registered new interface driver dvb_usb_af9005
    [    8.531584] BUG: unable to handle kernel paging request at 02e00000
    [    8.533385] IP: [<7d9d67c6>] af9005_usb_module_init+0x6b/0x9d
    [    8.535613] *pde = 00000000
    [    8.536416] Oops: 0000 [#1] PREEMPT PREEMPT DEBUG_PAGEALLOCDEBUG_PAGEALLOC
    [    8.537863] CPU: 0 PID: 1 Comm: swapper Not tainted 3.15.0-rc6-00151-ga5c075c #1
    [    8.539827] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014
    [    8.541519] task: 89c9a670 ti: 89c9c000 task.ti: 89c9c000
    [    8.541519] EIP: 0060:[<7d9d67c6>] EFLAGS: 00010206 CPU: 0
    [    8.541519] EIP is at af9005_usb_module_init+0x6b/0x9d
    [    8.541519] EAX: 02e00000 EBX: 00000000 ECX: 00000006 EDX: 00000000
    [    8.541519] ESI: 00000000 EDI: 7da33ec8 EBP: 89c9df30 ESP: 89c9df2c
    [    8.541519]  DS: 007b ES: 007b FS: 0000 GS: 00e0 SS: 0068
    [    8.541519] CR0: 8005003b CR2: 02e00000 CR3: 05a54000 CR4: 00000690
    [    8.541519] Stack:
    [    8.541519]  7d9d675b 89c9df90 7d992a49 7d7d5914 89c9df4c 7be3a800 7d08c58c 8a4c3968
    [    8.541519]  89c9df80 7be3a966 00000192 00000006 00000006 7d7d3ff4 8a4c397a 00000200
    [    8.541519]  7d6b1280 8a4c3979 00000006 000009a6 7da32db8 b13eec81 00000006 000009a6
    [    8.541519] Call Trace:
    [    8.541519]  [<7d9d675b>] ? ttusb2_driver_init+0x16/0x16
    [    8.541519]  [<7d992a49>] do_one_initcall+0x77/0x106
    [    8.541519]  [<7be3a800>] ? parameqn+0x2/0x35
    [    8.541519]  [<7be3a966>] ? parse_args+0x113/0x25c
    [    8.541519]  [<7d992bc2>] kernel_init_freeable+0xea/0x167
    [    8.541519]  [<7cf01070>] kernel_init+0x8/0xb8
    [    8.541519]  [<7cf27ec0>] ret_from_kernel_thread+0x20/0x30
    [    8.541519]  [<7cf01068>] ? rest_init+0x10c/0x10c
    [    8.541519] Code: 08 c2 c7 05 44 ed f9 7d 00 00 e0 02 c7 05 40 ed f9 7d 00 00 e0 02 c7 05 3c ed f9 7d 00 00 e0 02 75 1f b8 00 00 e0 02 85 c0 74 16 <a1> 00 00 e0 02 c7 05 54 84 8e 7d 00 00 e0 02 a3 58 84 8e 7d eb
    [    8.541519] EIP: [<7d9d67c6>] af9005_usb_module_init+0x6b/0x9d SS:ESP 0068:89c9df2c
    [    8.541519] CR2: 0000000002e00000
    [    8.541519] ---[ end trace 768b6faf51370fc7 ]---
    
    The prefered fix would be to convert the whole IR code to use the kernel IR
    infrastructure (which wasn't available at the time this driver had been created).
    
    Until anyone who still has this old hardware steps up an does the conversion,
    fix it by not calling the symbol_request calls if the driver is compiled in
    without the default IR symbols (CONFIG_DVB_USB_AF9005_REMOTE).
    Due to the IR related pointers beeing NULL by default, IR support will then be disabled.
    
    The downside of this solution is, that it will no longer be possible to
    compile custom IR symbols (not using CONFIG_DVB_USB_AF9005_REMOTE) in.
    
    Please note that this patch has NOT been tested with all possible cases.
    I don't have the hardware and could only verify that it fixes the reported
    bug.
    
    Reported-by: Fengguag Wu <fengguang.wu@intel.com>
    Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
    Acked-by: Luca Olivetti <luca@ventoso.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 01e5703eec1d85c05186dbad1170a1ffe4e23649
Author: Sakari Ailus <sakari.ailus@linux.intel.com>
Date:   Tue Apr 1 10:22:46 2014 -0300

    smiapp-pll: Correct clock debug prints
    
    commit bc47150ab93988714d1fab7bc82fe5f505a107ad upstream.
    
    The PLL flags were not used correctly.
    
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 8871196bc148ee2e2e731a541666acdcf21609e4
Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
Date:   Thu Dec 18 13:40:06 2014 +0200

    video/logo: prevent use of logos after they have been freed
    
    commit 92b004d1aa9f367c372511ca0330f58216b25703 upstream.
    
    If the probe of an fb driver has been deferred due to missing
    dependencies, and the probe is later ran when a module is loaded, the
    fbdev framework will try to find a logo to use.
    
    However, the logos are __initdata, and have already been freed. This
    causes sometimes page faults, if the logo memory is not mapped,
    sometimes other random crashes as the logo data is invalid, and
    sometimes nothing, if the fbdev decides to reject the logo (e.g. the
    random value depicting the logo's height is too big).
    
    This patch adds a late_initcall function to mark the logos as freed. In
    reality the logos are freed later, and fbdev probe may be ran between
    this late_initcall and the freeing of the logos. In that case we will
    miss drawing the logo, even if it would be possible.
    
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 8e2aaf56683302f62e6e5bd5dc793deaca0076c2
Author: Felipe Balbi <balbi@ti.com>
Date:   Fri Jan 2 16:15:59 2015 -0600

    net: ethernet: cpsw: fix hangs with interrupts
    
    commit 7ce67a38f799d1fb332f672b117efbadedaa5352 upstream.
    
    The CPSW IP implements pulse-signaled interrupts. Due to
    that we must write a correct, pre-defined value to the
    CPDMA_MACEOIVECTOR register so the controller generates
    a pulse on the correct IRQ line to signal the End Of
    Interrupt.
    
    The way the driver is written today, all four IRQ lines
    are requested using the same IRQ handler and, because of
    that, we could fall into situations where a TX IRQ fires
    but we tell the controller that we ended an RX IRQ (or
    vice-versa). This situation triggers an IRQ storm on the
    reserved IRQ 127 of INTC which will in turn call ack_bad_irq()
    which will, then, print a ton of:
    
    	unexpected IRQ trap at vector 00
    
    In order to fix the problem, we are moving all calls to
    cpdma_ctlr_eoi() inside the IRQ handler and making sure
    we *always* write the correct value to the CPDMA_MACEOIVECTOR
    register. Note that the algorithm assumes that IRQ numbers and
    value-to-be-written-to-EOI are proportional, meaning that a
    write of value 0 would trigger an EOI pulse for the RX_THRESHOLD
    Interrupt and that's the IRQ number sitting in the 0-th index
    of our irqs_table array.
    
    This, however, is safe at least for current implementations of
    CPSW so we will refrain from making the check smarter (and, as
    a side-effect, slower) until we actually have a platform where
    IRQ lines are swapped.
    
    This patch has been tested for several days with AM335x- and
    AM437x-based platforms. AM57x was left out because there are
    still pending patches to enable ethernet in mainline for that
    platform. A read of the TRM confirms the statement on previous
    paragraph.
    
    Reported-by: Yegor Yefremov <yegorslists@googlemail.com>
    Fixes: 510a1e7 (drivers: net: davinci_cpdma: acknowledge interrupt properly)
    Signed-off-by: Felipe Balbi <balbi@ti.com>
    Acked-by: Tony Lindgren <tony@atomide.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 2d4e63b5162415966a072d1a629ebdfe3bb18541
Author: Long Li <longli@microsoft.com>
Date:   Fri Dec 5 19:38:18 2014 -0800

    storvsc: ring buffer failures may result in I/O freeze
    
    commit e86fb5e8ab95f10ec5f2e9430119d5d35020c951 upstream.
    
    When ring buffer returns an error indicating retry, storvsc may not
    return a proper error code to SCSI when bounce buffer is not used.
    This has introduced I/O freeze on RAID running atop storvsc devices.
    This patch fixes it by always returning a proper error code.
    
    Signed-off-by: Long Li <longli@microsoft.com>
    Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 735beedafa629b508b26db5f735644a99e4f7cbd
Author: Daniel Mack <zonque@gmail.com>
Date:   Tue Jan 14 14:37:56 2014 +0100

    ALSA: snd-usb: re-order some quirk entries
    
    commit 358b7dfa1c32dfb77ff3261d244991a7c7c6d2cb upstream.
    
    No code change, just a cosmetic cleanup to keep entries ordered by the
    device ID within a block of unique vendor IDs.
    
    Signed-off-by: Daniel Mack <zonque@gmail.com>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit f27db99b3c5b8bb0b4216130da6178cc4221f00b
Author: Eduard Gilmutdinov <edgilmutdinov@gmail.com>
Date:   Fri Dec 20 14:06:58 2013 +0600

    ALSA: usb-audio: Add support for Focusrite Saffire 6 USB
    
    commit 11e424e88bd493b5d55d73d96c82bd889002ef30 upstream.
    
    Signed-off-by: Eduard Gilmutdinov <edgilmutdinov@gmail.com>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 0dc051e586000710b98014be998ac2e1a7fde76b
Author: Jesper Dangaard Brouer <brouer@redhat.com>
Date:   Mon Jan 26 12:08:45 2015 +0100

    ipvs: correct usage/allocation of seqadj ext in ipvs
    
    [ upstream commit b25adce1606427fd88da08f5203714cada7f6a98 ]
    
    The IPVS FTP helper ip_vs_ftp could trigger an OOPS in nf_ct_seqadj_set,
    after commit 41d73ec053d2 (netfilter: nf_conntrack: make sequence number
    adjustments usuable without NAT).
    
    This is because, the seqadj ext is now allocated dynamically, and the
    IPVS code didn't handle this situation.  Fix this in the IPVS nfct
    code by invoking the alloc function nfct_seqadj_ext_add().
    
    Cc: <stable@vger.kernel.org> # 3.12.x
    Fixes: 41d73ec053d2 (netfilter: nf_conntrack: make sequence number adjustments usuable without NAT)
    Suggested-by: Julian Anastasov <ja@ssi.bg>
    Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
    Acked-by: Julian Anastasov <ja@ssi.bg>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit fd4e00fa8f869c3f71d5b704f0dc6532c923ebe5
Author: Martin K. Petersen <martin.petersen@oracle.com>
Date:   Wed Dec 3 21:18:10 2014 -0500

    scsi: blacklist RSOC for Microsoft iSCSI target devices
    
    commit 198a956a11b15b564ac06d1411881e215b587408 upstream.
    
    The Microsoft iSCSI target does not support REPORT SUPPORTED OPERATION
    CODES. Blacklist these devices so we don't attempt to send the command.
    
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Tested-by: Mike Christie <michaelc@cs.wisc.edu>
    Reported-by: jazz@deti74.ru
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 95bc632b0923745238d250febe3cc02bb3839f1c
Author: Sreekanth Reddy <sreekanth.reddy@avagotech.com>
Date:   Tue Dec 2 20:58:47 2014 +0530

    Revert "[SCSI] mpt3sas: Remove phys on topology change"
    
    commit 2311ce4d9c91ed63a46e18f0378f3e406e7e888e upstream.
    
    This reverts commit 963ba22b90a955363644cd397b20226928eab976
    ("mpt3sas: Remove phys on topology change")
    
    Reverting the previous mpt3sas drives patch changes,
    since we will observe below issue
    
    Issue:
    Drives connected Enclosure/Expander will unregister with
    SCSI Transport Layer, if any one remove and add expander
    cable with in DMD (Device Missing Delay) time period or
    even any one power-off and power-on the Enclosure with in
    the DMD period.
    
    Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
    Reviewed-by: Tomas Henzl <thenzl@redhat.com>
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit ba77da8bb79a6f887e05dff47cf98017f2ba302b
Author: Sreekanth Reddy <sreekanth.reddy@avagotech.com>
Date:   Tue Dec 2 20:58:46 2014 +0530

    Revert "[SCSI] mpt2sas: Remove phys on topology change."
    
    commit 81a89c2d891b78695aa7e4cc0d5a7427785ae078 upstream.
    
    This reverts commit 3520f9c779bed098ca76dd3fb6377264301d57ed
    ("mpt2sas: Remove phys on topology change")
    
    Reverting the previous mpt2sas drives patch changes,
    since we will observe below issue
    
    Issue:
    Drives connected Enclosure/Expander will unregister with
    SCSI Transport Layer, if any one remove and add expander
    cable with in DMD (Device Missing Delay) time period or
    even any one power-off and power-on the Enclosure with in
    the DMD period.
    
    Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
    Reviewed-by: Tomas Henzl <thenzl@redhat.com>
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 32f04f1f001a1ee45bc071323bb04f600a8dbb84
Author: Nicholas Bellinger <nab@linux-iscsi.org>
Date:   Thu Nov 20 20:50:07 2014 -0800

    iscsi-target: Fail connection on short sendmsg writes
    
    commit 6bf6ca7515c1df06f5c03737537f5e0eb191e29e upstream.
    
    This patch changes iscsit_do_tx_data() to fail on short writes
    when kernel_sendmsg() returns a value different than requested
    transfer length, returning -EPIPE and thus causing a connection
    reset to occur.
    
    This avoids a potential bug in the original code where a short
    write would result in kernel_sendmsg() being called again with
    the original iovec base + length.
    
    In practice this has not been an issue because iscsit_do_tx_data()
    is only used for transferring 48 byte headers + 4 byte digests,
    along with seldom used control payloads from NOPIN + TEXT_RSP +
    REJECT with less than 32k of data.
    
    So following Al's audit of iovec consumers, go ahead and fail
    the connection on short writes for now, and remove the bogus
    logic ahead of his proper upstream fix.
    
    Reported-by: Al Viro <viro@zeniv.linux.org.uk>
    Cc: David S. Miller <davem@davemloft.net>
    Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit b3bc17d5bf7eb79e2c84ed93cfc5972239f61dfb
Author: Thomas Gleixner <tglx@linutronix.de>
Date:   Thu Dec 11 23:01:41 2014 +0100

    genirq: Prevent proc race against freeing of irq descriptors
    
    commit c291ee622165cb2c8d4e7af63fffd499354a23be upstream.
    
    Since the rework of the sparse interrupt code to actually free the
    unused interrupt descriptors there exists a race between the /proc
    interfaces to the irq subsystem and the code which frees the interrupt
    descriptor.
    
    CPU0				CPU1
    				show_interrupts()
    				  desc = irq_to_desc(X);
    free_desc(desc)
      remove_from_radix_tree();
      kfree(desc);
    				  raw_spinlock_irq(&desc->lock);
    
    /proc/interrupts is the only interface which can actively corrupt
    kernel memory via the lock access. /proc/stat can only read from freed
    memory. Extremly hard to trigger, but possible.
    
    The interfaces in /proc/irq/N/ are not affected by this because the
    removal of the proc file is serialized in procfs against concurrent
    readers/writers. The removal happens before the descriptor is freed.
    
    For architectures which have CONFIG_SPARSE_IRQ=n this is a non issue
    as the descriptor is never freed. It's merely cleared out with the irq
    descriptor lock held. So any concurrent proc access will either see
    the old correct value or the cleared out ones.
    
    Protect the lookup and access to the irq descriptor in
    show_interrupts() with the sparse_irq_lock.
    
    Provide kstat_irqs_usr() which is protecting the lookup and access
    with sparse_irq_lock and switch /proc/stat to use it.
    
    Document the existing kstat_irqs interfaces so it's clear that the
    caller needs to take care about protection. The users of these
    interfaces are either not affected due to SPARSE_IRQ=n or already
    protected against removal.
    
    Fixes: 1f5a5b87f78f "genirq: Implement a sane sparse_irq allocator"
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 1ff5b9fb934888276864a6cd98c98d0b07741f78
Author: Thomas Gleixner <tglx@linutronix.de>
Date:   Thu Dec 18 11:51:01 2014 +0100

    tick/powerclamp: Remove tick_nohz_idle abuse
    
    commit a5fd9733a30d18d7ac23f17080e7e07bb3205b69 upstream.
    
    commit 4dbd27711cd9 "tick: export nohz tick idle symbols for module
    use" was merged via the thermal tree without an explicit ack from the
    relevant maintainers.
    
    The exports are abused by the intel powerclamp driver which implements
    a fake idle state from a sched FIFO task. This causes all kinds of
    wreckage in the NOHZ core code which rightfully assumes that
    tick_nohz_idle_enter/exit() are only called from the idle task itself.
    
    Recent changes in the NOHZ core lead to a failure of the powerclamp
    driver and now people try to hack completely broken and backwards
    workarounds into the NOHZ core code. This is completely unacceptable
    and just papers over the real problem. There are way more subtle
    issues lurking around the corner.
    
    The real solution is to fix the powerclamp driver by rewriting it with
    a sane concept, but that's beyond the scope of this.
    
    So the only solution for now is to remove the calls into the core NOHZ
    code from the powerclamp trainwreck along with the exports.
    
    Fixes: d6d71ee4a14a "PM: Introduce Intel PowerClamp Driver"
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: Preeti U Murthy <preeti@linux.vnet.ibm.com>
    Cc: Viresh Kumar <viresh.kumar@linaro.org>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Fengguang Wu <fengguang.wu@intel.com>
    Cc: Frederic Weisbecker <frederic@kernel.org>
    Cc: Pan Jacob jun <jacob.jun.pan@intel.com>
    Cc: LKP <lkp@01.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Zhang Rui <rui.zhang@intel.com>
    Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1412181110110.17382@nanos
    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 666f1afd7184fc0ac3a02bc4a3cd4d1f752d4cb0
Author: Dominique Leuenberger <dimstar@opensuse.org>
Date:   Thu Nov 13 20:57:37 2014 +0100

    hp_accel: Add support for HP ZBook 15
    
    commit 6583659e0f92e38079a8dd081e0a1181a0f37747 upstream.
    
    HP ZBook 15 laptop needs a non-standard mapping (x_inverted).
    
    BugLink: http://bugzilla.opensuse.org/show_bug.cgi?id=905329
    Signed-off-by: Dominique Leuenberger <dimstar@opensuse.org>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Darren Hart <dvhart@linux.intel.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit dd16b23e0c1353078e7303c4f0ceaaa30079b6c0
Author: Arik Nemtsov <arik@wizery.com>
Date:   Thu Dec 4 12:22:16 2014 +0200

    cfg80211: avoid mem leak on driver hint set
    
    commit 34f05f543f02350e920bddb7660ffdd4697aaf60 upstream.
    
    In the already-set and intersect case of a driver-hint, the previous
    wiphy regdomain was not freed before being reset with a copy of the
    cfg80211 regdomain.
    
    [js: backport to 3.12]
    
    Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
    Acked-by: Luis R. Rodriguez <mcgrof@suse.com>
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit dbe21f1df1b98409b2c8e3a7265625726e1a8a00
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Dec 16 08:44:32 2014 +0000

    drm/i915: Force the CS stall for invalidate flushes
    
    commit add284a3a2481e759d6bec35f6444c32c8ddc383 upstream.
    
    In order to act as a full command barrier by itself, we need to tell the
    pipecontrol to actually stall the command streamer while the flush runs.
    We require the full command barrier before operations like
    MI_SET_CONTEXT, which currently rely on a prior invalidate flush.
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=83677
    Cc: Simon Farnsworth <simon@farnz.org.uk>
    Cc: Daniel Vetter <daniel@ffwll.ch>
    Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Signed-off-by: Jani Nikula <jani.nikula@intel.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 41d3d4b130a2a3e709d19245cbf345f1b6abf02d
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Dec 16 08:44:31 2014 +0000

    drm/i915: Invalidate media caches on gen7
    
    commit 148b83d0815a3778c8949e6a97cb798cbaa0efb3 upstream.
    
    In the gen7 pipe control there is an extra bit to flush the media
    caches, so let's set it during cache invalidation flushes.
    
    v2: Rename to MEDIA_STATE_CLEAR to be more inline with spec.
    
    Cc: Simon Farnsworth <simon@farnz.org.uk>
    Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Signed-off-by: Jani Nikula <jani.nikula@intel.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit c5fb31ccb41fa355e3cb996b045e5bd3e0b36c28
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Fri Apr 11 15:55:17 2014 +0200

    drm/i915: Don't complain about stolen conflicts on gen3
    
    commit 0b6d24c01932db99fc95304235e751e7f7625c41 upstream.
    
    Apparently stuff works that way on those machines.
    
    I agree with Chris' concern that this is a bit risky but imo worth a
    shot in -next just for fun. Afaics all these machines have the pci
    resources allocated like that by the BIOS, so I suspect that it's all
    ok.
    
    This regression goes back to
    
    commit eaba1b8f3379b5d100bd146b9a41d28348bdfd09
    Author: Chris Wilson <chris@chris-wilson.co.uk>
    Date:   Thu Jul 4 12:28:35 2013 +0100
    
        drm/i915: Verify that our stolen memory doesn't conflict
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76983
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71031
    Tested-by: lu hua <huax.lu@intel.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
    Tested-by: Paul Menzel <paulepanter@users.sourceforge.net>
    Signed-off-by: Jani Nikula <jani.nikula@intel.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit a866f33e6f27555c3dd799bd9fb5800c2c586883
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Wed Dec 10 09:42:10 2014 -0500

    drm/radeon: properly filter DP1.2 4k modes on non-DP1.2 hw
    
    commit 410cce2a6b82299b46ff316c6384e789ce275ecb upstream.
    
    The check was already in place in the dp mode_valid check, but
    radeon_dp_get_dp_link_clock() never returned the high clock
    mode_valid was checking for because that function clipped the
    clock based on the hw capabilities.  Add an explicit check
    in the mode_valid function.
    
    bug:
    https://bugs.freedesktop.org/show_bug.cgi?id=87172
    
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit c02ca53c957e1731bdd9afa75cdbf2a84c5d8519
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Wed Dec 3 00:03:49 2014 -0500

    drm/radeon: check the right ring in radeon_evict_flags()
    
    commit 5e5c21cac1001089007260c48b0c89ebaace0e71 upstream.
    
    Check the that ring we are using for copies is functional
    rather than the GFX ring.  On newer asics we use the DMA
    ring for bo moves.
    
    Reviewed-by: Christian König <christian.koenig@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 5d531ee5e76b84da1c114dddd9077d1e3a2d1ff7
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Mon Nov 17 15:08:17 2014 -0500

    drm/radeon: work around a hw bug in MGCG on CIK
    
    commit 4bb62c95a7e781a238b2ab374f34b1bf91e01ddc upstream.
    
    Always need to set bit 0 of RLC_CGTT_MGCG_OVERRIDE
    to avoid unreliable doorbell updates in some cases.
    
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 2ae5f6c0b469c5eb92716f583b8d10f76f68a0b8
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Fri Nov 7 11:05:04 2014 -0500

    drm/radeon: fix typo in CI dpm disable
    
    commit 129acb7c0b682512e89c4f65c33593d50f2f49a9 upstream.
    
    Need to disable DS, not enable it when disabling dpm.
    
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit fa13c23e556c71b97d1b4e8bf0d050c0881ecce3
Author: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Date:   Thu Nov 13 22:43:23 2014 +0900

    drm/ttm: Avoid memory allocation from shrinker functions.
    
    commit 881fdaa5e4cb0d68e52acab0ad4e1820e2bfffa4 upstream.
    
    Andrew Morton wrote:
    > On Wed, 12 Nov 2014 13:08:55 +0900 Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> wrote:
    >
    > > Andrew Morton wrote:
    > > > Poor ttm guys - this is a bit of a trap we set for them.
    > >
    > > Commit a91576d7916f6cce ("drm/ttm: Pass GFP flags in order to avoid deadlock.")
    > > changed to use sc->gfp_mask rather than GFP_KERNEL.
    > >
    > > -       pages_to_free = kmalloc(npages_to_free * sizeof(struct page *),
    > > -                       GFP_KERNEL);
    > > +       pages_to_free = kmalloc(npages_to_free * sizeof(struct page *), gfp);
    > >
    > > But this bug is caused by sc->gfp_mask containing some flags which are not
    > > in GFP_KERNEL, right? Then, I think
    > >
    > > -       pages_to_free = kmalloc(npages_to_free * sizeof(struct page *), gfp);
    > > +       pages_to_free = kmalloc(npages_to_free * sizeof(struct page *), gfp & GFP_KERNEL);
    > >
    > > would hide this bug.
    > >
    > > But I think we should use GFP_ATOMIC (or drop __GFP_WAIT flag)
    >
    > Well no - ttm_page_pool_free() should stop calling kmalloc altogether.
    > Just do
    >
    > 	struct page *pages_to_free[16];
    >
    > and rework the code to free 16 pages at a time.  Easy.
    
    Well, ttm code wants to process 512 pages at a time for performance.
    Memory footprint increased by 512 * sizeof(struct page *) buffer is
    only 4096 bytes. What about using static buffer like below?
    ----------
    >From d3cb5393c9c8099d6b37e769f78c31af1541fe8c Mon Sep 17 00:00:00 2001
    From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
    Date: Thu, 13 Nov 2014 22:21:54 +0900
    Subject: drm/ttm: Avoid memory allocation from shrinker functions.
    
    Commit a91576d7916f6cce ("drm/ttm: Pass GFP flags in order to avoid
    deadlock.") caused BUG_ON() due to sc->gfp_mask containing flags
    which are not in GFP_KERNEL.
    
      https://bugzilla.kernel.org/show_bug.cgi?id=87891
    
    Changing from sc->gfp_mask to (sc->gfp_mask & GFP_KERNEL) would
    avoid the BUG_ON(), but avoiding memory allocation from shrinker
    function is better and reliable fix.
    
    Shrinker function is already serialized by global lock, and
    clean up function is called after shrinker function is unregistered.
    Thus, we can use static buffer when called from shrinker function
    and clean up function.
    
    Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit fc350ec820fa6851839f38d8a7de310ef7f5146f
Author: Thomas Hellstrom <thellstrom@vmware.com>
Date:   Tue Dec 2 03:36:57 2014 -0800

    drm/vmwgfx: Fix fence event code
    
    commit 89669e7a7f96be3ee8d9a22a071d7c0d3b4428fc upstream.
    
    The commit "vmwgfx: Rework fence event action" introduced a number of bugs
    that are fixed with this commit:
    
    a) A forgotten return stateemnt.
    b) An if statement with identical branches.
    
    Reported-by: Rob Clark <robdclark@gmail.com>
    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
    Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
    Reviewed-by: Sinclair Yeh <syeh@vmware.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit b743bb06c114ab8964e2f2313163b7ab10468743
Author: Akash Goel <akash.goel@intel.com>
Date:   Mon Jan 13 16:25:21 2014 +0530

    drm/i915: Resolving the memory region conflict for Stolen area
    
    commit 3617dc9675f0184b7bb210cfa34f3cac928d8055 upstream.
    
    There is a conflict seen when requesting the kernel to reserve
    the physical space used for the stolen area. This is because
    some BIOS are wrapping the stolen area in the root PCI bus, but have
    an off-by-one error. As a workaround we retry the reservation with an
    offset of 1 instead of 0.
    
    v2: updated commit message & the comment in source file (Daniel)
    
    Signed-off-by: Akash Goel <akash.goel@intel.com>
    Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
    Tested-by: Arjan van de Ven <arjan@linux.intel.com>
    Signed-off-by: Jani Nikula <jani.nikula@intel.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit b3959c772ebaf1efedb44085c5bc43129704274b
Author: Konstantin Khlebnikov <koct9i@gmail.com>
Date:   Sun Nov 9 13:53:37 2014 +0400

    ACPI / osl: speedup grace period in acpi_os_map_cleanup
    
    commit 74b51ee152b6d99e61ba329799a039453fb9438f upstream.
    
    ACPI maintains cache of ioremap regions to speed up operations and
    access to them from irq context where ioremap() calls aren't allowed.
    This code abuses synchronize_rcu() on unmap path for synchronization
    with fast-path in acpi_os_read/write_memory which uses this cache.
    
    Since v3.10 CPUs are allowed to enter idle state even if they have RCU
    callbacks queued, see commit c0f4dfd4f90f1667d234d21f15153ea09a2eaa66
    ("rcu: Make RCU_FAST_NO_HZ take advantage of numbered callbacks").
    That change caused problems with nvidia proprietary driver which calls
    acpi_os_map/unmap_generic_address several times during initialization.
    Each unmap calls synchronize_rcu and adds significant delay. Totally
    initialization is slowed for a couple of seconds and that is enough to
    trigger timeout in hardware, gpu decides to "fell off the bus". Widely
    spread workaround is reducing "rcu_idle_gp_delay" from 4 to 1 jiffy.
    
    This patch replaces synchronize_rcu() with synchronize_rcu_expedited()
    which is much faster.
    
    Link: https://devtalk.nvidia.com/default/topic/567297/linux/linux-3-10-driver-crash/
    Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com>
    Reported-and-tested-by: Alexander Monakov <amonakov@gmail.com>
    Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 4d871c60d93292ab4a3b22192430de0c574e82e9
Author: Dan Carpenter <dan.carpenter@oracle.com>
Date:   Mon Nov 10 17:11:21 2014 +0100

    netfilter: ipset: small potential read beyond the end of buffer
    
    commit 2196937e12b1b4ba139806d132647e1651d655df upstream.
    
    We could be reading 8 bytes into a 4 byte buffer here.  It seems
    harmless but adding a check is the right thing to do and it silences a
    static checker warning.
    
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Acked-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit e5924c9528cbe4baa4b13230addac2a7b52f4fe6
Author: Jay Vosburgh <jay.vosburgh@canonical.com>
Date:   Fri Dec 19 15:32:00 2014 -0800

    net/core: Handle csum for CHECKSUM_COMPLETE VXLAN forwarding
    
    [ Upstream commit 2c26d34bbcc0b3f30385d5587aa232289e2eed8e ]
    
    When using VXLAN tunnels and a sky2 device, I have experienced
    checksum failures of the following type:
    
    [ 4297.761899] eth0: hw csum failure
    [...]
    [ 4297.765223] Call Trace:
    [ 4297.765224]  <IRQ>  [<ffffffff8172f026>] dump_stack+0x46/0x58
    [ 4297.765235]  [<ffffffff8162ba52>] netdev_rx_csum_fault+0x42/0x50
    [ 4297.765238]  [<ffffffff8161c1a0>] ? skb_push+0x40/0x40
    [ 4297.765240]  [<ffffffff8162325c>] __skb_checksum_complete+0xbc/0xd0
    [ 4297.765243]  [<ffffffff8168c602>] tcp_v4_rcv+0x2e2/0x950
    [ 4297.765246]  [<ffffffff81666ca0>] ? ip_rcv_finish+0x360/0x360
    
    	These are reliably reproduced in a network topology of:
    
    container:eth0 == host(OVS VXLAN on VLAN) == bond0 == eth0 (sky2) -> switch
    
    	When VXLAN encapsulated traffic is received from a similarly
    configured peer, the above warning is generated in the receive
    processing of the encapsulated packet.  Note that the warning is
    associated with the container eth0.
    
            The skbs from sky2 have ip_summed set to CHECKSUM_COMPLETE, and
    because the packet is an encapsulated Ethernet frame, the checksum
    generated by the hardware includes the inner protocol and Ethernet
    headers.
    
    	The receive code is careful to update the skb->csum, except in
    __dev_forward_skb, as called by dev_forward_skb.  __dev_forward_skb
    calls eth_type_trans, which in turn calls skb_pull_inline(skb, ETH_HLEN)
    to skip over the Ethernet header, but does not update skb->csum when
    doing so.
    
    	This patch resolves the problem by adding a call to
    skb_postpull_rcsum to update the skb->csum after the call to
    eth_type_trans.
    
    Signed-off-by: Jay Vosburgh <jay.vosburgh@canonical.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 73c0b6653e7853838fe6cfc5ce90c4be266090f0
Author: Govindarajulu Varadarajan <_govind@gmx.com>
Date:   Thu Dec 18 15:58:42 2014 +0530

    enic: fix rx skb checksum
    
    [ Upstream commit 17e96834fd35997ca7cdfbf15413bcd5a36ad448 ]
    
    Hardware always provides compliment of IP pseudo checksum. Stack expects
    whole packet checksum without pseudo checksum if CHECKSUM_COMPLETE is set.
    
    This causes checksum error in nf & ovs.
    
    kernel: qg-19546f09-f2: hw csum failure
    kernel: CPU: 9 PID: 0 Comm: swapper/9 Tainted: GF          O--------------   3.10.0-123.8.1.el7.x86_64 #1
    kernel: Hardware name: Cisco Systems Inc UCSB-B200-M3/UCSB-B200-M3, BIOS B200M3.2.2.3.0.080820141339 08/08/2014
    kernel: ffff881218f40000 df68243feb35e3a8 ffff881237a43ab8 ffffffff815e237b
    kernel: ffff881237a43ad0 ffffffff814cd4ca ffff8829ec71eb00 ffff881237a43af0
    kernel: ffffffff814c6232 0000000000000286 ffff8829ec71eb00 ffff881237a43b00
    kernel: Call Trace:
    kernel: <IRQ>  [<ffffffff815e237b>] dump_stack+0x19/0x1b
    kernel: [<ffffffff814cd4ca>] netdev_rx_csum_fault+0x3a/0x40
    kernel: [<ffffffff814c6232>] __skb_checksum_complete_head+0x62/0x70
    kernel: [<ffffffff814c6251>] __skb_checksum_complete+0x11/0x20
    kernel: [<ffffffff8155a20c>] nf_ip_checksum+0xcc/0x100
    kernel: [<ffffffffa049edc7>] icmp_error+0x1f7/0x35c [nf_conntrack_ipv4]
    kernel: [<ffffffff814cf419>] ? netif_rx+0xb9/0x1d0
    kernel: [<ffffffffa040eb7b>] ? internal_dev_recv+0xdb/0x130 [openvswitch]
    kernel: [<ffffffffa04c8330>] nf_conntrack_in+0xf0/0xa80 [nf_conntrack]
    kernel: [<ffffffff81509380>] ? inet_del_offload+0x40/0x40
    kernel: [<ffffffffa049e302>] ipv4_conntrack_in+0x22/0x30 [nf_conntrack_ipv4]
    kernel: [<ffffffff815005ca>] nf_iterate+0xaa/0xc0
    kernel: [<ffffffff81509380>] ? inet_del_offload+0x40/0x40
    kernel: [<ffffffff81500664>] nf_hook_slow+0x84/0x140
    kernel: [<ffffffff81509380>] ? inet_del_offload+0x40/0x40
    kernel: [<ffffffff81509dd4>] ip_rcv+0x344/0x380
    
    Hardware verifies IP & tcp/udp header checksum but does not provide payload
    checksum, use CHECKSUM_UNNECESSARY. Set it only if its valid IP tcp/udp packet.
    
    Cc: Jiri Benc <jbenc@redhat.com>
    Cc: Stefan Assmann <sassmann@redhat.com>
    Reported-by: Sunil Choudhary <schoudha@redhat.com>
    Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
    Reviewed-by: Jiri Benc <jbenc@redhat.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit c18e1d2c062cf9909d10740f231c786bf7fab029
Author: Jiri Pirko <jiri@resnulli.us>
Date:   Wed Jan 14 18:15:30 2015 +0100

    team: avoid possible underflow of count_pending value for notify_peers and mcast_rejoin
    
    [ Upstream commit b0d11b42785b70e19bc6a3122eead3f7969a7589 ]
    
    This patch is fixing a race condition that may cause setting
    count_pending to -1, which results in unwanted big bulk of arp messages
    (in case of "notify peers").
    
    Consider following scenario:
    
    count_pending == 2
       CPU0                                           CPU1
    					team_notify_peers_work
    					  atomic_dec_and_test (dec count_pending to 1)
    					  schedule_delayed_work
     team_notify_peers
       atomic_add (adding 1 to count_pending)
    					team_notify_peers_work
    					  atomic_dec_and_test (dec count_pending to 1)
    					  schedule_delayed_work
    					team_notify_peers_work
    					  atomic_dec_and_test (dec count_pending to 0)
       schedule_delayed_work
    					team_notify_peers_work
    					  atomic_dec_and_test (dec count_pending to -1)
    
    Fix this race by using atomic_dec_if_positive - that will prevent
    count_pending running under 0.
    
    Fixes: fc423ff00df3a1955441 ("team: add peer notification")
    Fixes: 492b200efdd20b8fcfd  ("team: add support for sending multicast rejoins")
    Signed-off-by: Jiri Pirko <jiri@resnulli.us>
    Signed-off-by: Jiri Benc <jbenc@redhat.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit cbac92132ff61018792166045ce2c362cd7f48e0
Author: Eric Dumazet <edumazet@google.com>
Date:   Sun Jan 11 10:32:18 2015 -0800

    alx: fix alx_poll()
    
    [ Upstream commit 7a05dc64e2e4c611d89007b125b20c0d2a4d31a5 ]
    
    Commit d75b1ade567f ("net: less interrupt masking in NAPI") uncovered
    wrong alx_poll() behavior.
    
    A NAPI poll() handler is supposed to return exactly the budget when/if
    napi_complete() has not been called.
    
    It is also supposed to return number of frames that were received, so
    that netdev_budget can have a meaning.
    
    Also, in case of TX pressure, we still have to dequeue received
    packets : alx_clean_rx_irq() has to be called even if
    alx_clean_tx_irq(alx) returns false, otherwise device is half duplex.
    
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Fixes: d75b1ade567f ("net: less interrupt masking in NAPI")
    Reported-by: Oded Gabbay <oded.gabbay@amd.com>
    Bisected-by: Oded Gabbay <oded.gabbay@amd.com>
    Tested-by: Oded Gabbay <oded.gabbay@amd.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit dc5e8861c1ab671c1fd3908d63a03fe5f2f4fb11
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date:   Thu Jan 1 00:39:23 2015 +1100

    tcp: Do not apply TSO segment limit to non-TSO packets
    
    [ Upstream commit 843925f33fcc293d80acf2c5c8a78adf3344d49b ]
    
    Thomas Jarosch reported IPsec TCP stalls when a PMTU event occurs.
    
    In fact the problem was completely unrelated to IPsec.  The bug is
    also reproducible if you just disable TSO/GSO.
    
    The problem is that when the MSS goes down, existing queued packet
    on the TX queue that have not been transmitted yet all look like
    TSO packets and get treated as such.
    
    This then triggers a bug where tcp_mss_split_point tells us to
    generate a zero-sized packet on the TX queue.  Once that happens
    we're screwed because the zero-sized packet can never be removed
    by ACKs.
    
    Fixes: 1485348d242 ("tcp: Apply device TSO segment limit earlier")
    Reported-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    
    Cheers,
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 00c47292b1cdf7e721dccc5659879732eca6451a
Author: Thomas Graf <tgraf@suug.ch>
Date:   Tue Dec 23 01:13:18 2014 +0100

    net: Reset secmark when scrubbing packet
    
    [ Upstream commit b8fb4e0648a2ab3734140342002f68fb0c7d1602 ]
    
    skb_scrub_packet() is called when a packet switches between a context
    such as between underlay and overlay, between namespaces, or between
    L3 subnets.
    
    While we already scrub the packet mark, connection tracking entry,
    and cached destination, the security mark/context is left intact.
    
    It seems wrong to inherit the security context of a packet when going
    from overlay to underlay or across forwarding paths.
    
    Signed-off-by: Thomas Graf <tgraf@suug.ch>
    Acked-by: Flavio Leitner <fbl@sysclose.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 6e1a8eb4ed3f954059ffae5563710275bc63d4fa
Author: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Date:   Mon Dec 22 19:04:14 2014 +0900

    net: Fix stacked vlan offload features computation
    
    [ Upstream commit 796f2da81bead71ffc91ef70912cd8d1827bf756 ]
    
    When vlan tags are stacked, it is very likely that the outer tag is stored
    in skb->vlan_tci and skb->protocol shows the inner tag's vlan_proto.
    Currently netif_skb_features() first looks at skb->protocol even if there
    is the outer tag in vlan_tci, thus it incorrectly retrieves the protocol
    encapsulated by the inner vlan instead of the inner vlan protocol.
    This allows GSO packets to be passed to HW and they end up being
    corrupted.
    
    Fixes: 58e998c6d239 ("offloading: Force software GSO for multiple vlan tags.")
    Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit e6f7e1dc44d6cbc3ca844b8d1f6c0bab6672f77a
Author: Prashant Sreedharan <prashant@broadcom.com>
Date:   Sat Dec 20 12:16:17 2014 -0800

    tg3: tg3_disable_ints using uninitialized mailbox value to disable interrupts
    
    [ Upstream commit 05b0aa579397b734f127af58e401a30784a1e315 ]
    
    During driver load in tg3_init_one, if the driver detects DMA activity before
    intializing the chip tg3_halt is called. As part of tg3_halt interrupts are
    disabled using routine tg3_disable_ints. This routine was using mailbox value
    which was not initialized (default value is 0). As a result driver was writing
    0x00000001 to pci config space register 0, which is the vendor id / device id.
    
    This driver bug was exposed because of the commit a7877b17a667 (PCI: Check only
    the Vendor ID to identify Configuration Request Retry). Also this issue is only
    seen in older generation chipsets like 5722 because config space write to offset
    0 from driver is possible. The newer generation chips ignore writes to offset 0.
    Also without commit a7877b17a667, for these older chips when a GRC reset is
    issued the Bootcode would reprogram the vendor id/device id, which is the reason
    this bug was masked earlier.
    
    Fixed by initializing the interrupt mailbox registers before calling tg3_halt.
    
    Please queue for -stable.
    
    Reported-by: Nils Holland <nholland@tisys.org>
    Reported-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
    Signed-off-by: Prashant Sreedharan <prashant@broadcom.com>
    Signed-off-by: Michael Chan <mchan@broadcom.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit ef260858f4bdef913410e825b1f9590a0b9db213
Author: stephen hemminger <stephen@networkplumber.org>
Date:   Sat Dec 20 12:15:49 2014 -0800

    in6: fix conflict with glibc
    
    [ Upstream commit 6d08acd2d32e3e877579315dc3202d7a5f336d98 ]
    
    Resolve conflicts between glibc definition of IPV6 socket options
    and those defined in Linux headers. Looks like earlier efforts to
    solve this did not cover all the definitions.
    
    It resolves warnings during iproute2 build.
    Please consider for stable as well.
    
    Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
    Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit d7ab02d6e980a50530a2f92056b653de1c114285
Author: Thomas Graf <tgraf@suug.ch>
Date:   Thu Dec 18 10:30:26 2014 +0000

    netlink: Don't reorder loads/stores before marking mmap netlink frame as available
    
    [ Upstream commit a18e6a186f53af06937a2c268c72443336f4ab56 ]
    
    Each mmap Netlink frame contains a status field which indicates
    whether the frame is unused, reserved, contains data or needs to
    be skipped. Both loads and stores may not be reordeded and must
    complete before the status field is changed and another CPU might
    pick up the frame for use. Use an smp_mb() to cover needs of both
    types of callers to netlink_set_status(), callers which have been
    reading data frame from the frame, and callers which have been
    filling or releasing and thus writing to the frame.
    
    - Example code path requiring a smp_rmb():
      memcpy(skb->data, (void *)hdr + NL_MMAP_HDRLEN, hdr->nm_len);
      netlink_set_status(hdr, NL_MMAP_STATUS_UNUSED);
    
    - Example code path requiring a smp_wmb():
      hdr->nm_uid	= from_kuid(sk_user_ns(sk), NETLINK_CB(skb).creds.uid);
      hdr->nm_gid	= from_kgid(sk_user_ns(sk), NETLINK_CB(skb).creds.gid);
      netlink_frame_flush_dcache(hdr);
      netlink_set_status(hdr, NL_MMAP_STATUS_VALID);
    
    Fixes: f9c228 ("netlink: implement memory mapped recvmsg()")
    Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
    Signed-off-by: Thomas Graf <tgraf@suug.ch>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 837f719b175ab57b3cd39d3a36ce7d7d38687be0
Author: David Miller <davem@davemloft.net>
Date:   Tue Dec 16 17:58:17 2014 -0500

    netlink: Always copy on mmap TX.
    
    [ Upstream commit 4682a0358639b29cf69437ed909c6221f8c89847 ]
    
    Checking the file f_count and the nlk->mapped count is not completely
    sufficient to prevent the mmap'd area contents from changing from
    under us during netlink mmap sendmsg() operations.
    
    Be careful to sample the header's length field only once, because this
    could change from under us as well.
    
    Fixes: 5fd96123ee19 ("netlink: implement memory mapped sendmsg()")
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Acked-by: Daniel Borkmann <dborkman@redhat.com>
    Acked-by: Thomas Graf <tgraf@suug.ch>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 3e89bd360a7c6be943ee771481edc6dfef22f68d
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Sun Jan 11 11:33:57 2015 -0800

    mm: Don't count the stack guard page towards RLIMIT_STACK
    
    commit 690eac53daff34169a4d74fc7bfbd388c4896abb upstream.
    
    Commit fee7e49d4514 ("mm: propagate error from stack expansion even for
    guard page") made sure that we return the error properly for stack
    growth conditions.  It also theorized that counting the guard page
    towards the stack limit might break something, but also said "Let's see
    if anybody notices".
    
    Somebody did notice.  Apparently android-x86 sets the stack limit very
    close to the limit indeed, and including the guard page in the rlimit
    check causes the android 'zygote' process problems.
    
    So this adds the (fairly trivial) code to make the stack rlimit check be
    against the actual real stack size, rather than the size of the vma that
    includes the guard page.
    
    Reported-and-tested-by: Chih-Wei Huang <cwhuang@android-x86.org>
    Cc: Jay Foad <jay.foad@gmail.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 88d43e17473b56a9d86686766be810546807f2f4
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Tue Jan 6 13:00:05 2015 -0800

    mm: propagate error from stack expansion even for guard page
    
    commit fee7e49d45149fba60156f5b59014f764d3e3728 upstream.
    
    Jay Foad reports that the address sanitizer test (asan) sometimes gets
    confused by a stack pointer that ends up being outside the stack vma
    that is reported by /proc/maps.
    
    This happens due to an interaction between RLIMIT_STACK and the guard
    page: when we do the guard page check, we ignore the potential error
    from the stack expansion, which effectively results in a missing guard
    page, since the expected stack expansion won't have been done.
    
    And since /proc/maps explicitly ignores the guard page (commit
    d7824370e263: "mm: fix up some user-visible effects of the stack guard
    page"), the stack pointer ends up being outside the reported stack area.
    
    This is the minimal patch: it just propagates the error.  It also
    effectively makes the guard page part of the stack limit, which in turn
    measn that the actual real stack is one page less than the stack limit.
    
    Let's see if anybody notices.  We could teach acct_stack_growth() to
    allow an extra page for a grow-up/grow-down stack in the rlimit test,
    but I don't want to add more complexity if it isn't needed.
    
    Reported-and-tested-by: Jay Foad <jay.foad@gmail.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 72af0d9afe2fcf9ed7c72526367c32dd2c753b58
Author: Vlastimil Babka <vbabka@suse.cz>
Date:   Thu Jan 8 14:32:40 2015 -0800

    mm, vmscan: prevent kswapd livelock due to pfmemalloc-throttled process being killed
    
    commit 9e5e3661727eaf960d3480213f8e87c8d67b6956 upstream.
    
    Charles Shirron and Paul Cassella from Cray Inc have reported kswapd
    stuck in a busy loop with nothing left to balance, but
    kswapd_try_to_sleep() failing to sleep.  Their analysis found the cause
    to be a combination of several factors:
    
    1. A process is waiting in throttle_direct_reclaim() on pgdat->pfmemalloc_wait
    
    2. The process has been killed (by OOM in this case), but has not yet been
       scheduled to remove itself from the waitqueue and die.
    
    3. kswapd checks for throttled processes in prepare_kswapd_sleep():
    
            if (waitqueue_active(&pgdat->pfmemalloc_wait)) {
                    wake_up(&pgdat->pfmemalloc_wait);
    		return false; // kswapd will not go to sleep
    	}
    
       However, for a process that was already killed, wake_up() does not remove
       the process from the waitqueue, since try_to_wake_up() checks its state
       first and returns false when the process is no longer waiting.
    
    4. kswapd is running on the same CPU as the only CPU that the process is
       allowed to run on (through cpus_allowed, or possibly single-cpu system).
    
    5. CONFIG_PREEMPT_NONE=y kernel is used. If there's nothing to balance, kswapd
       encounters no voluntary preemption points and repeatedly fails
       prepare_kswapd_sleep(), blocking the process from running and removing
       itself from the waitqueue, which would let kswapd sleep.
    
    So, the source of the problem is that we prevent kswapd from going to
    sleep until there are processes waiting on the pfmemalloc_wait queue,
    and a process waiting on a queue is guaranteed to be removed from the
    queue only when it gets scheduled.  This was done to make sure that no
    process is left sleeping on pfmemalloc_wait when kswapd itself goes to
    sleep.
    
    However, it isn't necessary to postpone kswapd sleep until the
    pfmemalloc_wait queue actually empties.  To prevent processes from being
    left sleeping, it's actually enough to guarantee that all processes
    waiting on pfmemalloc_wait queue have been woken up by the time we put
    kswapd to sleep.
    
    This patch therefore fixes this issue by substituting 'wake_up' with
    'wake_up_all' and removing 'return false' in the code snippet from
    prepare_kswapd_sleep() above.  Note that if any process puts itself in
    the queue after this waitqueue_active() check, or after the wake up
    itself, it means that the process will also wake up kswapd - and since
    we are under prepare_to_wait(), the wake up won't be missed.  Also we
    update the comment prepare_kswapd_sleep() to hopefully more clearly
    describe the races it is preventing.
    
    Fixes: 5515061d22f0 ("mm: throttle direct reclaimers if PF_MEMALLOC reserves are low and swap is backed by network storage")
    Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
    Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
    Cc: Mel Gorman <mgorman@suse.de>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Acked-by: Michal Hocko <mhocko@suse.cz>
    Acked-by: Rik van Riel <riel@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 0cd8eb43d8c4bb0e544a5c519682b30dc8c831ad
Author: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Date:   Mon Jan 5 10:50:15 2015 +0100

    mmc: sdhci: Fix sleep in atomic after inserting SD card
    
    commit 2836766a9d0bd02c66073f8dd44796e6cc23848d upstream.
    
    Sleep in atomic context happened on Trats2 board after inserting or
    removing SD card because mmc_gpio_get_cd() was called under spin lock.
    
    Fix this by moving card detection earlier, before acquiring spin lock.
    The mmc_gpio_get_cd() call does not have to be protected by spin lock
    because it does not access any sdhci internal data.
    The sdhci_do_get_cd() call access host flags (SDHCI_DEVICE_DEAD). After
    moving it out side of spin lock it could theoretically race with driver
    removal but still there is no actual protection against manual card
    eject.
    
    Dmesg after inserting SD card:
    [   41.663414] BUG: sleeping function called from invalid context at drivers/gpio/gpiolib.c:1511
    [   41.670469] in_atomic(): 1, irqs_disabled(): 128, pid: 30, name: kworker/u8:1
    [   41.677580] INFO: lockdep is turned off.
    [   41.681486] irq event stamp: 61972
    [   41.684872] hardirqs last  enabled at (61971): [<c0490ee0>] _raw_spin_unlock_irq+0x24/0x5c
    [   41.693118] hardirqs last disabled at (61972): [<c04907ac>] _raw_spin_lock_irq+0x18/0x54
    [   41.701190] softirqs last  enabled at (61648): [<c0026fd4>] __do_softirq+0x234/0x2c8
    [   41.708914] softirqs last disabled at (61631): [<c00273a0>] irq_exit+0xd0/0x114
    [   41.716206] Preemption disabled at:[<  (null)>]   (null)
    [   41.721500]
    [   41.722985] CPU: 3 PID: 30 Comm: kworker/u8:1 Tainted: G        W      3.18.0-rc5-next-20141121 #883
    [   41.732111] Workqueue: kmmcd mmc_rescan
    [   41.735945] [<c0014d2c>] (unwind_backtrace) from [<c0011c80>] (show_stack+0x10/0x14)
    [   41.743661] [<c0011c80>] (show_stack) from [<c0489d14>] (dump_stack+0x70/0xbc)
    [   41.750867] [<c0489d14>] (dump_stack) from [<c0228b74>] (gpiod_get_raw_value_cansleep+0x18/0x30)
    [   41.759628] [<c0228b74>] (gpiod_get_raw_value_cansleep) from [<c03646e8>] (mmc_gpio_get_cd+0x38/0x58)
    [   41.768821] [<c03646e8>] (mmc_gpio_get_cd) from [<c036d378>] (sdhci_request+0x50/0x1a4)
    [   41.776808] [<c036d378>] (sdhci_request) from [<c0357934>] (mmc_start_request+0x138/0x268)
    [   41.785051] [<c0357934>] (mmc_start_request) from [<c0357cc8>] (mmc_wait_for_req+0x58/0x1a0)
    [   41.793469] [<c0357cc8>] (mmc_wait_for_req) from [<c0357e68>] (mmc_wait_for_cmd+0x58/0x78)
    [   41.801714] [<c0357e68>] (mmc_wait_for_cmd) from [<c0361c00>] (mmc_io_rw_direct_host+0x98/0x124)
    [   41.810480] [<c0361c00>] (mmc_io_rw_direct_host) from [<c03620f8>] (sdio_reset+0x2c/0x64)
    [   41.818641] [<c03620f8>] (sdio_reset) from [<c035a3d8>] (mmc_rescan+0x254/0x2e4)
    [   41.826028] [<c035a3d8>] (mmc_rescan) from [<c003a0e0>] (process_one_work+0x180/0x3f4)
    [   41.833920] [<c003a0e0>] (process_one_work) from [<c003a3bc>] (worker_thread+0x34/0x4b0)
    [   41.841991] [<c003a3bc>] (worker_thread) from [<c003fed8>] (kthread+0xe4/0x104)
    [   41.849285] [<c003fed8>] (kthread) from [<c000f268>] (ret_from_fork+0x14/0x2c)
    [   42.038276] mmc0: new high speed SDHC card at address 1234
    
    Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
    Fixes: 94144a465dd0 ("mmc: sdhci: add get_cd() implementation")
    Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 44189ec1996bf5c5dd402d21eb420f4e83e7dfb6
Author: Stefan Roese <sr@denx.de>
Date:   Fri Jan 31 13:44:59 2014 +0100

    spi: fsl: Fix problem with multi message transfers
    
    commit 4302a59629f7a0bd70fd1605d2b558597517372a upstream.
    
    When used via spidev with more than one messages to tranfer via
    SPI_IOC_MESSAGE the current implementation would return with
    -EINVAL, since bits_per_word and speed_hz are set in all
    transfer structs. And in the 2nd loop status will stay at
    -EINVAL as its not overwritten again via fsl_spi_setup_transfer().
    
    This patch changes this behavious by first checking if one of
    the messages uses different settings. If this is the case
    the function will return with -EINVAL. If not, the messages
    are transferred correctly.
    
    Signed-off-by: Stefan Roese <sr@denx.de>
    Signed-off-by: Mark Brown <broonie@linaro.org>
    Cc: Esben Haabendal <esbenhaabendal@gmail.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 0f069ee162db50519dbd032d4a2c41960419d6c7
Author: Jiri Olsa <jolsa@kernel.org>
Date:   Wed Nov 26 16:39:31 2014 +0100

    perf session: Do not fail on processing out of order event
    
    commit f61ff6c06dc8f32c7036013ad802c899ec590607 upstream.
    
    Linus reported perf report command being interrupted due to processing
    of 'out of order' event, with following error:
    
      Timestamp below last timeslice flush
      0x5733a8 [0x28]: failed to process type: 3
    
    I could reproduce the issue and in my case it was caused by one CPU
    (mmap) being behind during record and userspace mmap reader seeing the
    data after other CPUs data were already stored.
    
    This is expected under some circumstances because we need to limit the
    number of events that we queue for reordering when we receive a
    PERF_RECORD_FINISHED_ROUND or when we force flush due to memory
    pressure.
    
    Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Jiri Olsa <jolsa@kernel.org>
    Acked-by: Ingo Molnar <mingo@kernel.org>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Matt Fleming <matt.fleming@intel.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Stephane Eranian <eranian@google.com>
    Link: http://lkml.kernel.org/r/1417016371-30249-1-git-send-email-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    [zhangzhiqiang: backport to 3.10:
     - adjust context
     - commit f61ff6c06d struct events_stats was defined in tools/perf/util/event.h
       while 3.10 stable defined in tools/perf/util/hist.h.
     - 3.10 stable there is no pr_oe_time() which used for debug.
     - After the above adjustments, becomes same to the original patch:
       https://github.com/torvalds/linux/commit/f61ff6c06dc8f32c7036013ad802c899ec590607
    ]
    Signed-off-by: Zhiqiang Zhang <zhangzhiqiang.zhang@huawei.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit a1f8e24798f9d7cdca5bbf438be1a501bb53fa00
Author: Jiri Olsa <jolsa@kernel.org>
Date:   Wed Dec 10 21:23:51 2014 +0100

    perf: Fix events installation during moving group
    
    commit 9fc81d87420d0d3fd62d5e5529972c0ad9eab9cc upstream.
    
    We allow PMU driver to change the cpu on which the event
    should be installed to. This happened in patch:
    
      e2d37cd213dc ("perf: Allow the PMU driver to choose the CPU on which to install events")
    
    This patch also forces all the group members to follow
    the currently opened events cpu if the group happened
    to be moved.
    
    This and the change of event->cpu in perf_install_in_context()
    function introduced in:
    
      0cda4c023132 ("perf: Introduce perf_pmu_migrate_context()")
    
    forces group members to change their event->cpu,
    if the currently-opened-event's PMU changed the cpu
    and there is a group move.
    
    Above behaviour causes problem for breakpoint events,
    which uses event->cpu to touch cpu specific data for
    breakpoints accounting. By changing event->cpu, some
    breakpoints slots were wrongly accounted for given
    cpu.
    
    Vinces's perf fuzzer hit this issue and caused following
    WARN on my setup:
    
       WARNING: CPU: 0 PID: 20214 at arch/x86/kernel/hw_breakpoint.c:119 arch_install_hw_breakpoint+0x142/0x150()
       Can't find any breakpoint slot
       [...]
    
    This patch changes the group moving code to keep the event's
    original cpu.
    
    Reported-by: Vince Weaver <vince@deater.net>
    Signed-off-by: Jiri Olsa <jolsa@redhat.com>
    Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Stephane Eranian <eranian@google.com>
    Cc: Vince Weaver <vince@deater.net>
    Cc: Yan, Zheng <zheng.z.yan@intel.com>
    Link: http://lkml.kernel.org/r/1418243031-20367-3-git-send-email-jolsa@kernel.org
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 5f34dcba9ab45437a8de83aab6298dd0183b334c
Author: Jiri Olsa <jolsa@kernel.org>
Date:   Wed Dec 10 21:23:50 2014 +0100

    perf/x86/intel/uncore: Make sure only uncore events are collected
    
    commit af91568e762d04931dcbdd6bef4655433d8b9418 upstream.
    
    The uncore_collect_events functions assumes that event group
    might contain only uncore events which is wrong, because it
    might contain any type of events.
    
    This bug leads to uncore framework touching 'not' uncore events,
    which could end up all sorts of bugs.
    
    One was triggered by Vince's perf fuzzer, when the uncore code
    touched breakpoint event private event space as if it was uncore
    event and caused BUG:
    
       BUG: unable to handle kernel paging request at ffffffff82822068
       IP: [<ffffffff81020338>] uncore_assign_events+0x188/0x250
       ...
    
    The code in uncore_assign_events() function was looking for
    event->hw.idx data while the event was initialized as a
    breakpoint with different members in event->hw union.
    
    This patch forces uncore_collect_events() to collect only uncore
    events.
    
    Reported-by: Vince Weaver <vince@deater.net>
    Signed-off-by: Jiri Olsa <jolsa@redhat.com>
    Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Stephane Eranian <eranian@google.com>
    Cc: Yan, Zheng <zheng.z.yan@intel.com>
    Link: http://lkml.kernel.org/r/1418243031-20367-2-git-send-email-jolsa@kernel.org
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 39ca76b2961ca4667a8035c8bde1ee31a3466d7a
Author: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date:   Thu Nov 13 10:38:57 2014 +0100

    ARM: mvebu: disable I/O coherency on non-SMP situations on Armada 370/375/38x/XP
    
    commit e55355453600a33bb5ca4f71f2d7214875f3b061 upstream.
    
    Enabling the hardware I/O coherency on Armada 370, Armada 375, Armada
    38x and Armada XP requires a certain number of conditions:
    
     - On Armada 370, the cache policy must be set to write-allocate.
    
     - On Armada 375, 38x and XP, the cache policy must be set to
       write-allocate, the pages must be mapped with the shareable
       attribute, and the SMP bit must be set
    
    Currently, on Armada XP, when CONFIG_SMP is enabled, those conditions
    are met. However, when Armada XP is used in a !CONFIG_SMP kernel, none
    of these conditions are met. With Armada 370, the situation is worse:
    since the processor is single core, regardless of whether CONFIG_SMP
    or !CONFIG_SMP is used, the cache policy will be set to write-back by
    the kernel and not write-allocate.
    
    Since solving this problem turns out to be quite complicated, and we
    don't want to let users with a mainline kernel known to have
    infrequent but existing data corruptions, this commit proposes to
    simply disable hardware I/O coherency in situations where it is known
    not to work.
    
    And basically, the is_smp() function of the kernel tells us whether it
    is OK to enable hardware I/O coherency or not, so this commit slightly
    refactors the coherency_type() function to return
    COHERENCY_FABRIC_TYPE_NONE when is_smp() is false, or the appropriate
    type of the coherency fabric in the other case.
    
    Thanks to this, the I/O coherency fabric will no longer be used at all
    in !CONFIG_SMP configurations. It will continue to be used in
    CONFIG_SMP configurations on Armada XP, Armada 375 and Armada 38x
    (which are multiple cores processors), but will no longer be used on
    Armada 370 (which is a single core processor).
    
    In the process, it simplifies the implementation of the
    coherency_type() function, and adds a missing call to of_node_put().
    
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
    Fixes: e60304f8cb7bb545e79fe62d9b9762460c254ec2 ("arm: mvebu: Add hardware I/O Coherency support")
    Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
    Link: https://lkml.kernel.org/r/1415871540-20302-3-git-send-email-thomas.petazzoni@free-electrons.com
    Signed-off-by: Jason Cooper <jason@lakedaemon.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit f7ab6b6700fffd510353b9b3ad8d9bc8894b13c4
Author: Pavel Machek <pavel@ucw.cz>
Date:   Sun Jan 4 20:01:23 2015 +0100

    Revert "ARM: 7830/1: delay: don't bother reporting bogomips in /proc/cpuinfo"
    
    commit 4bf9636c39ac70da091d5a2e28d3448eaa7f115c upstream.
    
    Commit 9fc2105aeaaf ("ARM: 7830/1: delay: don't bother reporting
    bogomips in /proc/cpuinfo") breaks audio in python, and probably
    elsewhere, with message
    
      FATAL: cannot locate cpu MHz in /proc/cpuinfo
    
    I'm not the first one to hit it, see for example
    
      https://theredblacktree.wordpress.com/2014/08/10/fatal-cannot-locate-cpu-mhz-in-proccpuinfo/
      https://devtalk.nvidia.com/default/topic/765800/workaround-for-fatal-cannot-locate-cpu-mhz-in-proc-cpuinf/?offset=1
    
    Reading original changelog, I have to say "Stop breaking working setups.
    You know who you are!".
    
    Signed-off-by: Pavel Machek <pavel@ucw.cz>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 02d684c2515b8bbe11b9ce1345840d5c855dc685
Author: Nishanth Menon <nm@ti.com>
Date:   Tue Oct 21 15:22:28 2014 -0500

    ARM: OMAP4: PM: Only do static dependency configuration in omap4_init_static_deps
    
    commit 9008d83fe9dc2e0f19b8ba17a423b3759d8e0fd7 upstream.
    
    Commit 705814b5ea6f ("ARM: OMAP4+: PM: Consolidate OMAP4 PM code to
    re-use it for OMAP5")
    
    Moved logic generic for OMAP5+ as part of the init routine by
    introducing omap4_pm_init. However, the patch left the powerdomain
    initial setup, an unused omap4430 es1.0 check and a spurious log
    "Power Management for TI OMAP4." in the original code.
    
    Remove the duplicate code which is already present in omap4_pm_init from
    omap4_init_static_deps.
    
    As part of this change, also move the u-boot version print out of the
    static dependency function to the omap4_pm_init function.
    
    Fixes: 705814b5ea6f ("ARM: OMAP4+: PM: Consolidate OMAP4 PM code to re-use it for OMAP5")
    Signed-off-by: Nishanth Menon <nm@ti.com>
    Signed-off-by: Tony Lindgren <tony@atomide.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 3e0c111cf99888ffedbe3ee9ff4818127f4d8a4e
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Wed Dec 10 15:41:28 2014 -0800

    scripts/kernel-doc: don't eat struct members with __aligned
    
    commit 7b990789a4c3420fa57596b368733158e432d444 upstream.
    
    The change from \d+ to .+ inside __aligned() means that the following
    structure:
    
      struct test {
            u8 a __aligned(2);
            u8 b __aligned(2);
      };
    
    essentially gets modified to
    
      struct test {
            u8 a;
      };
    
    for purposes of kernel-doc, thus dropping a struct member, which in
    turns causes warnings and invalid kernel-doc generation.
    
    Fix this by replacing the catch-all (".") with anything that's not a
    semicolon ("[^;]").
    
    Fixes: 9dc30918b23f ("scripts/kernel-doc: handle struct member __aligned without numbers")
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Cc: Nishanth Menon <nm@ti.com>
    Cc: Randy Dunlap <rdunlap@infradead.org>
    Cc: Michal Marek <mmarek@suse.cz>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit bd15ad4f51c047fddaa073bf461a5e09e28b640d
Author: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Date:   Wed Dec 10 15:54:34 2014 -0800

    nilfs2: fix the nilfs_iget() vs. nilfs_new_inode() races
    
    commit 705304a863cc41585508c0f476f6d3ec28cf7e00 upstream.
    
    Same story as in commit 41080b5a2401 ("nfsd race fixes: ext2") (similar
    ext2 fix) except that nilfs2 needs to use insert_inode_locked4() instead
    of insert_inode_locked() and a bug of a check for dead inodes needs to
    be fixed.
    
    If nilfs_iget() is called from nfsd after nilfs_new_inode() calls
    insert_inode_locked4(), nilfs_iget() will wait for unlock_new_inode() at
    the end of nilfs_mkdir()/nilfs_create()/etc to unlock the inode.
    
    If nilfs_iget() is called before nilfs_new_inode() calls
    insert_inode_locked4(), it will create an in-core inode and read its
    data from the on-disk inode.  But, nilfs_iget() will find i_nlink equals
    zero and fail at nilfs_read_inode_common(), which will lead it to call
    iget_failed() and cleanly fail.
    
    However, this sanity check doesn't work as expected for reused on-disk
    inodes because they leave a non-zero value in i_mode field and it
    hinders the test of i_nlink.  This patch also fixes the issue by
    removing the test on i_mode that nilfs2 doesn't need.
    
    Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit a3c563629b22bdf1fc61a294dcc345d341f41e9e
Author: Brian Norris <computersforpeace@gmail.com>
Date:   Fri Nov 21 10:24:29 2014 -0800

    mtd: tests: abort torturetest on erase errors
    
    commit 68f29815034e9dc9ed53cad85946c32b07adc8cc upstream.
    
    The torture test should quit once it actually induces an error in the
    flash. This step was accidentally removed during refactoring.
    
    Without this fix, the torturetest just continues infinitely, or until
    the maximum cycle count is reached. e.g.:
    
       ...
       [ 7619.218171] mtd_test: error -5 while erasing EB 100
       [ 7619.297981] mtd_test: error -5 while erasing EB 100
       [ 7619.377953] mtd_test: error -5 while erasing EB 100
       [ 7619.457998] mtd_test: error -5 while erasing EB 100
       [ 7619.537990] mtd_test: error -5 while erasing EB 100
       ...
    
    Fixes: 6cf78358c94f ("mtd: mtd_torturetest: use mtd_test helpers")
    Signed-off-by: Brian Norris <computersforpeace@gmail.com>
    Cc: Akinobu Mita <akinobu.mita@gmail.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit f844de9aa69cd95c52636e5b4faeaf1353477252
Author: Dan Carpenter <dan.carpenter@oracle.com>
Date:   Fri Nov 28 11:33:34 2014 +0300

    ceph: do_sync is never initialized
    
    commit 021b77bee210843bed1ea91b5cad58235ff9c8e5 upstream.
    
    Probably this code was syncing a lot more often then intended because
    the do_sync variable wasn't set to zero.
    
    Fixes: c62988ec0910 ('ceph: avoid meaningless calling ceph_caps_revoking if sync_mode == WB_SYNC_ALL.')
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 03e6a1dc9b69bed1e6c98ddfeb5232208f79e7a0
Author: Benjamin Coddington <bcodding@redhat.com>
Date:   Sun Dec 7 16:05:47 2014 -0500

    nfsd4: fix xdr4 inclusion of escaped char
    
    commit 5a64e56976f1ba98743e1678c0029a98e9034c81 upstream.
    
    Fix a bug where nfsd4_encode_components_esc() includes the esc_end char as
    an additional string encoding.
    
    Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
    Fixes: e7a0444aef4a "nfsd: add IPv6 addr escaping to fs_location hosts"
    Signed-off-by: J. Bruce Fields <bfields@redhat.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit b2abe3c2f4217e3df748a348d2536bae103afc9e
Author: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Date:   Fri Dec 5 16:40:07 2014 +0100

    fs: nfsd: Fix signedness bug in compare_blob
    
    commit ef17af2a817db97d42dd2ec0a425231748e23dbc upstream.
    
    Bugs similar to the one in acbbe6fbb240 (kcmp: fix standard comparison
    bug) are in rich supply.
    
    In this variant, the problem is that struct xdr_netobj::len has type
    unsigned int, so the expression o1->len - o2->len _also_ has type
    unsigned int; it has completely well-defined semantics, and the result
    is some non-negative integer, which is always representable in a long
    long. But this means that if the conditional triggers, we are
    guaranteed to return a positive value from compare_blob.
    
    In this case it could be fixed by
    
    -       res = o1->len - o2->len;
    +       res = (long long)o1->len - (long long)o2->len;
    
    but I'd rather eliminate the usually broken 'return a - b;' idiom.
    
    Reviewed-by: Jeff Layton <jlayton@primarydata.com>
    Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
    Signed-off-by: J. Bruce Fields <bfields@redhat.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 5ea7d58ceb75a5902252eca83df628b63fb913f6
Author: Vitaly Kuznetsov <vkuznets@redhat.com>
Date:   Tue Nov 4 13:40:11 2014 +0100

    Drivers: hv: vmbus: Fix a race condition when unregistering a device
    
    commit 04a258c162a85c0f4ae56be67634dc43c9a4fa9b upstream.
    
    When build with Debug the following crash is sometimes observed:
    Call Trace:
     [<ffffffff812b9600>] string+0x40/0x100
     [<ffffffff812bb038>] vsnprintf+0x218/0x5e0
     [<ffffffff810baf7d>] ? trace_hardirqs_off+0xd/0x10
     [<ffffffff812bb4c1>] vscnprintf+0x11/0x30
     [<ffffffff8107a2f0>] vprintk+0xd0/0x5c0
     [<ffffffffa0051ea0>] ? vmbus_process_rescind_offer+0x0/0x110 [hv_vmbus]
     [<ffffffff8155c71c>] printk+0x41/0x45
     [<ffffffffa004ebac>] vmbus_device_unregister+0x2c/0x40 [hv_vmbus]
     [<ffffffffa0051ecb>] vmbus_process_rescind_offer+0x2b/0x110 [hv_vmbus]
    ...
    
    This happens due to the following race: between 'if (channel->device_obj)' check
    in vmbus_process_rescind_offer() and pr_debug() in vmbus_device_unregister() the
    device can disappear. Fix the issue by taking an additional reference to the
    device before proceeding to vmbus_device_unregister().
    
    Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
    Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit fcd05986ca4be59515477a117324651386aa2142
Author: Christian Riesch <christian.riesch@omicron.at>
Date:   Thu Nov 13 05:53:26 2014 +0100

    n_tty: Fix read_buf race condition, increment read_head after pushing data
    
    commit 8bfbe2de769afda051c56aba5450391670e769fc upstream.
    
    Commit 19e2ad6a09f0c06dbca19c98e5f4584269d913dd ("n_tty: Remove overflow
    tests from receive_buf() path") moved the increment of read_head into
    the arguments list of read_buf_addr(). Function calls represent a
    sequence point in C. Therefore read_head is incremented before the
    character c is placed in the buffer. Since the circular read buffer is
    a lock-less design since commit 6d76bd2618535c581f1673047b8341fd291abc67
    ("n_tty: Make N_TTY ldisc receive path lockless"), this creates a race
    condition that leads to communication errors.
    
    This patch modifies the code to increment read_head _after_ the data
    is placed in the buffer and thus fixes the race for non-SMP machines.
    To fix the problem for SMP machines, memory barriers must be added in
    a separate patch.
    
    Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit d053001d5433355483f532e1201ed063f8d56b81
Author: Robert Baldyga <r.baldyga@samsung.com>
Date:   Mon Nov 24 07:56:21 2014 +0100

    serial: samsung: wait for transfer completion before clock disable
    
    commit 1ff383a4c3eda8893ec61b02831826e1b1f46b41 upstream.
    
    This patch adds waiting until transmit buffer and shifter will be empty
    before clock disabling.
    
    Without this fix it's possible to have clock disabled while data was
    not transmited yet, which causes unproper state of TX line and problems
    in following data transfers.
    
    Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 36e4033e7a20009e8d0d4550f0fed22b43f2f89c
Author: Tejun Heo <tj@kernel.org>
Date:   Fri Oct 24 15:38:21 2014 -0400

    writeback: fix a subtle race condition in I_DIRTY clearing
    
    commit 9c6ac78eb3521c5937b2dd8a7d1b300f41092f45 upstream.
    
    After invoking ->dirty_inode(), __mark_inode_dirty() does smp_mb() and
    tests inode->i_state locklessly to see whether it already has all the
    necessary I_DIRTY bits set.  The comment above the barrier doesn't
    contain any useful information - memory barriers can't ensure "changes
    are seen by all cpus" by itself.
    
    And it sure enough was broken.  Please consider the following
    scenario.
    
     CPU 0					CPU 1
     -------------------------------------------------------------------------------
    
    					enters __writeback_single_inode()
    					grabs inode->i_lock
    					tests PAGECACHE_TAG_DIRTY which is clear
     enters __set_page_dirty()
     grabs mapping->tree_lock
     sets PAGECACHE_TAG_DIRTY
     releases mapping->tree_lock
     leaves __set_page_dirty()
    
     enters __mark_inode_dirty()
     smp_mb()
     sees I_DIRTY_PAGES set
     leaves __mark_inode_dirty()
    					clears I_DIRTY_PAGES
    					releases inode->i_lock
    
    Now @inode has dirty pages w/ I_DIRTY_PAGES clear.  This doesn't seem
    to lead to an immediately critical problem because requeue_inode()
    later checks PAGECACHE_TAG_DIRTY instead of I_DIRTY_PAGES when
    deciding whether the inode needs to be requeued for IO and there are
    enough unintentional memory barriers inbetween, so while the inode
    ends up with inconsistent I_DIRTY_PAGES flag, it doesn't fall off the
    IO list.
    
    The lack of explicit barrier may also theoretically affect the other
    I_DIRTY bits which deal with metadata dirtiness.  There is no
    guarantee that a strong enough barrier exists between
    I_DIRTY_[DATA]SYNC clearing and write_inode() writing out the dirtied
    inode.  Filesystem inode writeout path likely has enough stuff which
    can behave as full barrier but it's theoretically possible that the
    writeout may not see all the updates from ->dirty_inode().
    
    Fix it by adding an explicit smp_mb() after I_DIRTY clearing.  Note
    that I_DIRTY_PAGES needs a special treatment as it always needs to be
    cleared to be interlocked with the lockless test on
    __mark_inode_dirty() side.  It's cleared unconditionally and
    reinstated after smp_mb() if the mapping still has dirty pages.
    
    Also add comments explaining how and why the barriers are paired.
    
    Lightly tested.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Jan Kara <jack@suse.cz>
    Cc: Mikulas Patocka <mpatocka@redhat.com>
    Cc: Jens Axboe <axboe@kernel.dk>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Reviewed-by: Jan Kara <jack@suse.cz>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit b38841c614577800be3d9018f6455a8ee96d8855
Author: Oliver Neukum <oneukum@suse.de>
Date:   Thu Nov 20 14:54:35 2014 +0100

    cdc-acm: memory leak in error case
    
    commit d908f8478a8d18e66c80a12adb27764920c1f1ca upstream.
    
    If probe() fails not only the attributes need to be removed
    but also the memory freed.
    
    Reported-by: Ahmed Tamrawi <ahmedtamrawi@gmail.com>
    Signed-off-by: Oliver Neukum <oneukum@suse.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit faabc4f5c3b94993ca781a03ead160bf5248c7db
Author: Jens Axboe <axboe@fb.com>
Date:   Wed Nov 19 13:06:22 2014 -0700

    genhd: check for int overflow in disk_expand_part_tbl()
    
    commit 5fabcb4c33fe11c7e3afdf805fde26c1a54d0953 upstream.
    
    We can get here from blkdev_ioctl() -> blkpg_ioctl() -> add_partition()
    with a user passed in partno value. If we pass in 0x7fffffff, the
    new target in disk_expand_part_tbl() overflows the 'int' and we
    access beyond the end of ptbl->part[] and even write to it when we
    do the rcu_assign_pointer() to assign the new partition.
    
    Reported-by: David Ramos <daramos@stanford.edu>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit d379dec78e7c15ca987166092114094c8aea4b0a
Author: Steev Klimaszewski <threeway@gmail.com>
Date:   Tue Dec 30 00:55:48 2014 -0600

    Add USB_EHCI_EXYNOS to multi_v7_defconfig
    
    commit 007487f1fd43d84f26cda926081ca219a24ecbc4 upstream.
    
    Currently we enable Exynos devices in the multi v7 defconfig, however, when
    testing on my ODROID-U3, I noticed that USB was not working.  Enabling this
    option causes USB to work, which enables networking support as well since the
    ODROID-U3 has networking on the USB bus.
    
    [arnd] Support for odroid-u3 was added in 3.10, so it would be nice to
    backport this fix at least that far.
    
    Signed-off-by: Steev Klimaszewski <steev@gentoo.org>
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 7f05446ddd65a1ab8b1d3a8dbc5acddbe0c66745
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Fri Nov 7 08:48:15 2014 -0800

    USB: cdc-acm: check for valid interfaces
    
    commit 403dff4e2c94f275e24fd85f40b2732ffec268a1 upstream.
    
    We need to check that we have both a valid data and control inteface for both
    types of headers (union and not union.)
    
    References: https://bugzilla.kernel.org/show_bug.cgi?id=83551
    Reported-by: Simon Schubert <2+kernel@0x2c.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit ba412300046121eb98bff798f221fdcc7f13424f
Author: Takashi Iwai <tiwai@suse.de>
Date:   Mon Jan 5 13:27:33 2015 +0100

    ALSA: hda - Fix wrong gpio_dir & gpio_mask hint setups for IDT/STAC codecs
    
    commit c507de88f6a336bd7296c9ec0073b2d4af8b4f5e upstream.
    
    stac_store_hints() does utterly wrong for masking the values for
    gpio_dir and gpio_data, likely due to copy&paste errors.  Fortunately,
    this feature is used very rarely, so the impact must be really small.
    
    Reported-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit d97bff5a0563b701a9b07b7dd5af5a69d91104b0
Author: Dan Carpenter <dan.carpenter@oracle.com>
Date:   Thu Nov 27 01:34:43 2014 +0300

    ALSA: hda - using uninitialized data
    
    commit 69eba10e606a80665f8573221fec589430d9d1cb upstream.
    
    In olden times the snd_hda_param_read() function always set "*start_id"
    but in 2007 we introduced a new return and it causes uninitialized data
    bugs in a couple of the callers: print_codec_info() and
    hdmi_parse_codec().
    
    Fixes: e8a7f136f5ed ('[ALSA] hda-intel - Improve HD-audio codec probing robustness')
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 3d041411e3b467708e64f2bbb7b5d8b0885150aa
Author: Jiri Jaburek <jjaburek@redhat.com>
Date:   Thu Dec 18 02:03:19 2014 +0100

    ALSA: usb-audio: extend KEF X300A FU 10 tweak to Arcam rPAC
    
    commit d70a1b9893f820fdbcdffac408c909c50f2e6b43 upstream.
    
    The Arcam rPAC seems to have the same problem - whenever anything
    (alsamixer, udevd, 3.9+ kernel from 60af3d037eb8c, ..) attempts to
    access mixer / control interface of the card, the firmware "locks up"
    the entire device, resulting in
      SNDRV_PCM_IOCTL_HW_PARAMS failed (-5): Input/output error
    from alsa-lib.
    
    Other operating systems can somehow read the mixer (there seems to be
    playback volume/mute), but any manipulation is ignored by the device
    (which has hardware volume controls).
    
    Signed-off-by: Jiri Jaburek <jjaburek@redhat.com>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit ce3740b1080853a3f6c879374b468ae8800028a8
Author: Alex Williamson <alex.williamson@redhat.com>
Date:   Fri Oct 31 11:13:07 2014 -0600

    driver core: Fix unbalanced device reference in drivers_probe
    
    commit bb34cb6bbd287b57e955bc5cfd42fcde6aaca279 upstream.
    
    bus_find_device_by_name() acquires a device reference which is never
    released.  This results in an object leak, which on older kernels
    results in failure to release all resources of PCI devices.  libvirt
    uses drivers_probe to re-attach devices to the host after assignment
    and is therefore a common trigger for this leak.
    
    Example:
    
    # cd /sys/bus/pci/
    # dmesg -C
    # echo 1 > devices/0000\:01\:00.0/sriov_numvfs
    # echo 0 > devices/0000\:01\:00.0/sriov_numvfs
    # dmesg | grep 01:10
     pci 0000:01:10.0: [8086:10ca] type 00 class 0x020000
     kobject: '0000:01:10.0' (ffff8801d79cd0a8): kobject_add_internal: parent: '0000:00:01.0', set: 'devices'
     kobject: '0000:01:10.0' (ffff8801d79cd0a8): kobject_uevent_env
     kobject: '0000:01:10.0' (ffff8801d79cd0a8): fill_kobj_path: path = '/devices/pci0000:00/0000:00:01.0/0000:01:10.0'
     kobject: '0000:01:10.0' (ffff8801d79cd0a8): kobject_uevent_env
     kobject: '0000:01:10.0' (ffff8801d79cd0a8): fill_kobj_path: path = '/devices/pci0000:00/0000:00:01.0/0000:01:10.0'
     kobject: '0000:01:10.0' (ffff8801d79cd0a8): kobject_uevent_env
     kobject: '0000:01:10.0' (ffff8801d79cd0a8): fill_kobj_path: path = '/devices/pci0000:00/0000:00:01.0/0000:01:10.0'
     kobject: '0000:01:10.0' (ffff8801d79cd0a8): kobject_cleanup, parent           (null)
     kobject: '0000:01:10.0' (ffff8801d79cd0a8): calling ktype release
     kobject: '0000:01:10.0': free name
    
    [kobject freed as expected]
    
    # dmesg -C
    # echo 1 > devices/0000\:01\:00.0/sriov_numvfs
    # echo 0000:01:10.0 > drivers_probe
    # echo 0 > devices/0000\:01\:00.0/sriov_numvfs
    # dmesg | grep 01:10
     pci 0000:01:10.0: [8086:10ca] type 00 class 0x020000
     kobject: '0000:01:10.0' (ffff8801d79ce0a8): kobject_add_internal: parent: '0000:00:01.0', set: 'devices'
     kobject: '0000:01:10.0' (ffff8801d79ce0a8): kobject_uevent_env
     kobject: '0000:01:10.0' (ffff8801d79ce0a8): fill_kobj_path: path = '/devices/pci0000:00/0000:00:01.0/0000:01:10.0'
     kobject: '0000:01:10.0' (ffff8801d79ce0a8): kobject_uevent_env
     kobject: '0000:01:10.0' (ffff8801d79ce0a8): fill_kobj_path: path = '/devices/pci0000:00/0000:00:01.0/0000:01:10.0'
     kobject: '0000:01:10.0' (ffff8801d79ce0a8): kobject_uevent_env
     kobject: '0000:01:10.0' (ffff8801d79ce0a8): fill_kobj_path: path = '/devices/pci0000:00/0000:00:01.0/0000:01:10.0'
    
    [no free]
    
    Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 779cf1d93e1194b041cd139b8e71e0baae4884a6
Author: Andy Lutomirski <luto@amacapital.net>
Date:   Sun Dec 21 08:57:46 2014 -0800

    x86, vdso: Use asm volatile in __getcpu
    
    commit 1ddf0b1b11aa8a90cef6706e935fc31c75c406ba upstream.
    
    In Linux 3.18 and below, GCC hoists the lsl instructions in the
    pvclock code all the way to the beginning of __vdso_clock_gettime,
    slowing the non-paravirt case significantly.  For unknown reasons,
    presumably related to the removal of a branch, the performance issue
    is gone as of
    
    e76b027e6408 x86,vdso: Use LSL unconditionally for vgetcpu
    
    but I don't trust GCC enough to expect the problem to stay fixed.
    
    There should be no correctness issue, because the __getcpu calls in
    __vdso_vlock_gettime were never necessary in the first place.
    
    Note to stable maintainers: In 3.18 and below, depending on
    configuration, gcc 4.9.2 generates code like this:
    
         9c3:       44 0f 03 e8             lsl    %ax,%r13d
         9c7:       45 89 eb                mov    %r13d,%r11d
         9ca:       0f 03 d8                lsl    %ax,%ebx
    
    This patch won't apply as is to any released kernel, but I'll send a
    trivial backported version if needed.
    
    [
     Backported by Andy Lutomirski.  Should apply to all affected
     versions.  This fixes a functionality bug as well as a performance
     bug: buggy kernels can infinite loop in __vdso_clock_gettime on
     affected compilers.  See, for exammple:
    
     https://bugzilla.redhat.com/show_bug.cgi?id=1178975
    ]
    
    Fixes: 51c19b4f5927 x86: vdso: pvclock gettime support
    Cc: Marcelo Tosatti <mtosatti@redhat.com>
    Acked-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Andy Lutomirski <luto@amacapital.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 0c9312164d6e069707dd96a001849f4b853c546d
Author: Andy Lutomirski <luto@amacapital.net>
Date:   Fri Dec 19 16:04:11 2014 -0800

    x86_64, vdso: Fix the vdso address randomization algorithm
    
    commit 394f56fe480140877304d342dec46d50dc823d46 upstream.
    
    The theory behind vdso randomization is that it's mapped at a random
    offset above the top of the stack.  To avoid wasting a page of
    memory for an extra page table, the vdso isn't supposed to extend
    past the lowest PMD into which it can fit.  Other than that, the
    address should be a uniformly distributed address that meets all of
    the alignment requirements.
    
    The current algorithm is buggy: the vdso has about a 50% probability
    of being at the very end of a PMD.  The current algorithm also has a
    decent chance of failing outright due to incorrect handling of the
    case where the top of the stack is near the top of its PMD.
    
    This fixes the implementation.  The paxtest estimate of vdso
    "randomisation" improves from 11 bits to 18 bits.  (Disclaimer: I
    don't know what the paxtest code is actually calculating.)
    
    It's worth noting that this algorithm is inherently biased: the vdso
    is more likely to end up near the end of its PMD than near the
    beginning.  Ideally we would either nix the PMD sharing requirement
    or jointly randomize the vdso and the stack to reduce the bias.
    
    In the mean time, this is a considerable improvement with basically
    no risk of compatibility issues, since the allowed outputs of the
    algorithm are unchanged.
    
    As an easy test, doing this:
    
    for i in `seq 10000`
      do grep -P vdso /proc/self/maps |cut -d- -f1
    done |sort |uniq -d
    
    used to produce lots of output (1445 lines on my most recent run).
    A tiny subset looks like this:
    
    7fffdfffe000
    7fffe01fe000
    7fffe05fe000
    7fffe07fe000
    7fffe09fe000
    7fffe0bfe000
    7fffe0dfe000
    
    Note the suspicious fe000 endings.  With the fix, I get a much more
    palatable 76 repeated addresses.
    
    Reviewed-by: Kees Cook <keescook@chromium.org>
    Signed-off-by: Andy Lutomirski <luto@amacapital.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 33309bc127c6068759d60552a85cb28497e25fcc
Author: Paolo Bonzini <pbonzini@redhat.com>
Date:   Mon Dec 22 10:43:39 2014 +0100

    kvm: x86: drop severity of "generation wraparound" message
    
    commit a629df7eadffb03e6ce4a8616e62ea29fdf69b6b upstream.
    
    Since most virtual machines raise this message once, it is a bit annoying.
    Make it KERN_DEBUG severity.
    
    Fixes: 7a2e8aaf0f6873b47bc2347f216ea5b0e4c258ab
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 6bbd1764b520f02cb69a86b03b4c3084a27339b7
Author: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Date:   Sat Dec 27 00:28:30 2014 +0200

    HID: Add a new id 0x501a for Genius MousePen i608X
    
    commit 2bacedada682d5485424f5227f27a3d5d6eb551c upstream.
    
    New Genius MousePen i608X devices have a new id 0x501a instead of the
    old 0x5011 so add a new #define with "_2" appended and change required
    places.
    
    The remaining two checkpatch warnings about line length
    being over 80 characters are present in the original files too and this
    patch was made in the same style (no line break).
    
    Just adding a new id and changing the required places should make the
    new device work without any issues according to the bug report in the
    following url.
    
    This patch was made according to and fixes:
    https://bugzilla.kernel.org/show_bug.cgi?id=67111
    
    Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.cz>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 19fd1c1aad20eff874b7187cfdddb46d25786260
Author: Karl Relton <karllinuxtest.relton@ntlworld.com>
Date:   Tue Dec 16 15:37:22 2014 +0000

    HID: add battery quirk for USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO keyboard
    
    commit da940db41dcf8c04166f711646df2f35376010aa upstream.
    
    Apple bluetooth wireless keyboard (sold in UK) has always reported zero
    for battery strength no matter what condition the batteries are actually
    in. With this patch applied (applying same quirk as other Apple
    keyboards), the battery strength is now correctly reported.
    
    Signed-off-by: Karl Relton <karllinuxtest.relton@ntlworld.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.cz>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 126193e0b6e590a4943566136619778546a79856
Author: Dan Carpenter <dan.carpenter@oracle.com>
Date:   Fri Jan 9 15:32:31 2015 +0300

    HID: roccat: potential out of bounds in pyra_sysfs_write_settings()
    
    commit 606185b20caf4c57d7e41e5a5ea4aff460aef2ab upstream.
    
    This is a static checker fix.  We write some binary settings to the
    sysfs file.  One of the settings is the "->startup_profile".  There
    isn't any checking to make sure it fits into the
    pyra->profile_settings[] array in the profile_activated() function.
    
    I added a check to pyra_sysfs_write_settings() in both places because
    I wasn't positive that the other callers were correct.
    
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.cz>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit f0a431e778fffb7eae3350a85b0998bf17e726a6
Author: Gwendal Grignou <gwendal@chromium.org>
Date:   Thu Dec 11 16:02:45 2014 -0800

    HID: i2c-hid: prevent buffer overflow in early IRQ
    
    commit d1c7e29e8d276c669e8790bb8be9f505ddc48888 upstream.
    
    Before ->start() is called, bufsize size is set to HID_MIN_BUFFER_SIZE,
    64 bytes. While processing the IRQ, we were asking to receive up to
    wMaxInputLength bytes, which can be bigger than 64 bytes.
    
    Later, when ->start is run, a proper bufsize will be calculated.
    
    Given wMaxInputLength is said to be unreliable in other part of the
    code, set to receive only what we can even if it results in truncated
    reports.
    
    Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
    Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.cz>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 5927cd034b1a289e1c73018fc908403c0ce15658
Author: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Date:   Thu Nov 20 00:46:37 2014 +0800

    HID: i2c-hid: fix race condition reading reports
    
    commit 6296f4a8eb86f9abcc370fb7a1a116b8441c17fd upstream.
    
    Current driver uses a common buffer for reading reports either
    synchronously in i2c_hid_get_raw_report() and asynchronously in
    the interrupt handler.
    There is race condition if an interrupt arrives immediately after
    the report is received in i2c_hid_get_raw_report(); the common
    buffer is modified by the interrupt handler with the new report
    and then i2c_hid_get_raw_report() proceed using wrong data.
    
    Fix it by using a separate buffers for synchronous reports.
    
    Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
    [Antonio Borneo: cleanup, rebase to v3.17, submit mainline]
    Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
    Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.cz>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit b377e72cf3c79fcba0fad4b0925fde850d353a15
Author: Jiang Liu <jiang.liu@linux.intel.com>
Date:   Wed Nov 26 09:42:10 2014 +0800

    iommu/vt-d: Fix an off-by-one bug in __domain_mapping()
    
    commit cc4f14aa170d895c9a43bdb56f62070c8a6da908 upstream.
    
    There's an off-by-one bug in function __domain_mapping(), which may
    trigger the BUG_ON(nr_pages < lvl_pages) when
    	(nr_pages + 1) & superpage_mask == 0
    
    The issue was introduced by commit 9051aa0268dc "intel-iommu: Combine
    domain_pfn_mapping() and domain_sg_mapping()", which sets sg_res to
    "nr_pages + 1" to avoid some of the 'sg_res==0' code paths.
    
    It's safe to remove extra "+1" because sg_res is only used to calculate
    page size now.
    
    Reported-And-Tested-by: Sudeep Dutt <sudeep.dutt@intel.com>
    Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
    Acked-By: David Woodhouse <David.Woodhouse@intel.com>
    Signed-off-by: Joerg Roedel <jroedel@suse.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit d97a9dc7ab8bcad943464de5d27e1341bad3ccbb
Author: Richard Weinberger <richard@nod.at>
Date:   Thu Nov 6 16:47:49 2014 +0100

    UBI: Fix double free after do_sync_erase()
    
    commit aa5ad3b6eb8feb2399a5d26c8fb0060561bb9534 upstream.
    
    If the erase worker is unable to erase a PEB it will
    free the ubi_wl_entry itself.
    The failing ubi_wl_entry must not free()'d again after
    do_sync_erase() returns.
    
    Signed-off-by: Richard Weinberger <richard@nod.at>
    Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit b4725475530d091cfac701c3d4574b04a6eed21b
Author: Richard Weinberger <richard@nod.at>
Date:   Mon Oct 27 00:46:11 2014 +0100

    UBI: Fix invalid vfree()
    
    commit f38aed975c0c3645bbdfc5ebe35726e64caaf588 upstream.
    
    The logic of vfree()'ing vol->upd_buf is tied to vol->updating.
    In ubi_start_update() vol->updating is set long before vmalloc()'ing
    vol->upd_buf. If we encounter a write failure in ubi_start_update()
    before vmalloc() the UBI device release function will try to vfree()
    vol->upd_buf because vol->updating is set.
    Fix this by allocating vol->upd_buf directly after setting vol->updating.
    
    Fixes:
    [   31.559338] UBI warning: vol_cdev_release: update of volume 2 not finished, volume is damaged
    [   31.559340] ------------[ cut here ]------------
    [   31.559343] WARNING: CPU: 1 PID: 2747 at mm/vmalloc.c:1446 __vunmap+0xe3/0x110()
    [   31.559344] Trying to vfree() nonexistent vm area (ffffc90001f2b000)
    [   31.559345] Modules linked in:
    [   31.565620]  0000000000000bba ffff88002a0cbdb0 ffffffff818f0497 ffff88003b9ba148
    [   31.566347]  ffff88002a0cbde0 ffffffff8156f515 ffff88003b9ba148 0000000000000bba
    [   31.567073]  0000000000000000 0000000000000000 ffff88002a0cbe88 ffffffff8156c10a
    [   31.567793] Call Trace:
    [   31.568034]  [<ffffffff818f0497>] dump_stack+0x4e/0x7a
    [   31.568510]  [<ffffffff8156f515>] ubi_io_write_vid_hdr+0x155/0x160
    [   31.569084]  [<ffffffff8156c10a>] ubi_eba_write_leb+0x23a/0x870
    [   31.569628]  [<ffffffff81569b36>] vol_cdev_write+0x226/0x380
    [   31.570155]  [<ffffffff81179265>] vfs_write+0xb5/0x1f0
    [   31.570627]  [<ffffffff81179f8a>] SyS_pwrite64+0x6a/0xa0
    [   31.571123]  [<ffffffff818fde12>] system_call_fastpath+0x16/0x1b
    
    Signed-off-by: Richard Weinberger <richard@nod.at>
    Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit ca6a4563d4052e1da58439a60be113964c77388c
Author: Tony Lindgren <tony@atomide.com>
Date:   Tue Sep 16 13:50:01 2014 -0700

    pstore-ram: Allow optional mapping with pgprot_noncached
    
    commit 027bc8b08242c59e19356b4b2c189f2d849ab660 upstream.
    
    On some ARMs the memory can be mapped pgprot_noncached() and still
    be working for atomic operations. As pointed out by Colin Cross
    <ccross@android.com>, in some cases you do want to use
    pgprot_noncached() if the SoC supports it to see a debug printk
    just before a write hanging the system.
    
    On ARMs, the atomic operations on strongly ordered memory are
    implementation defined. So let's provide an optional kernel parameter
    for configuring pgprot_noncached(), and use pgprot_writecombine() by
    default.
    
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Rob Herring <robherring2@gmail.com>
    Cc: Randy Dunlap <rdunlap@infradead.org>
    Cc: Anton Vorontsov <anton@enomsg.org>
    Cc: Colin Cross <ccross@android.com>
    Cc: Olof Johansson <olof@lixom.net>
    Cc: Russell King <linux@arm.linux.org.uk>
    Acked-by: Kees Cook <keescook@chromium.org>
    Signed-off-by: Tony Lindgren <tony@atomide.com>
    Signed-off-by: Tony Luck <tony.luck@intel.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 1c5988f826a485e2d25c836a8d3bd2f8acd04bc5
Author: Rob Herring <robherring2@gmail.com>
Date:   Fri Sep 12 11:32:24 2014 -0700

    pstore-ram: Fix hangs by using write-combine mappings
    
    commit 7ae9cb81933515dc7db1aa3c47ef7653717e3090 upstream.
    
    Currently trying to use pstore on at least ARMs can hang as we're
    mapping the peristent RAM with pgprot_noncached().
    
    On ARMs, pgprot_noncached() will actually make the memory strongly
    ordered, and as the atomic operations pstore uses are implementation
    defined for strongly ordered memory, they may not work. So basically
    atomic operations have undefined behavior on ARM for device or strongly
    ordered memory types.
    
    Let's fix the issue by using write-combine variants for mappings. This
    corresponds to normal, non-cacheable memory on ARM. For many other
    architectures, this change does not change the mapping type as by
    default we have:
    
    #define pgprot_writecombine pgprot_noncached
    
    The reason why pgprot_noncached() was originaly used for pstore
    is because Colin Cross <ccross@android.com> had observed lost
    debug prints right before a device hanging write operation on some
    systems. For the platforms supporting pgprot_noncached(), we can
    add a an optional configuration option to support that. But let's
    get pstore working first before adding new features.
    
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Anton Vorontsov <cbouatmailru@gmail.com>
    Cc: Colin Cross <ccross@android.com>
    Cc: Olof Johansson <olof@lixom.net>
    Cc: linux-kernel@vger.kernel.org
    Acked-by: Kees Cook <keescook@chromium.org>
    Signed-off-by: Rob Herring <rob.herring@calxeda.com>
    [tony@atomide.com: updated description]
    Signed-off-by: Tony Lindgren <tony@atomide.com>
    Signed-off-by: Tony Luck <tony.luck@intel.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit eba8e5d2eb236df8b7bc79ed985205d1b9cb0bfd
Author: Myron Stowe <myron.stowe@redhat.com>
Date:   Thu Oct 30 11:54:37 2014 -0600

    PCI: Restore detection of read-only BARs
    
    commit 36e8164882ca6d3c41cb91e6f09a3ed236841f80 upstream.
    
    Commit 6ac665c63dca ("PCI: rewrite PCI BAR reading code") masked off
    low-order bits from 'l', but not from 'sz'.  Both are passed to pci_size(),
    which compares 'base == maxbase' to check for read-only BARs.  The masking
    of 'l' means that comparison will never be 'true', so the check for
    read-only BARs no longer works.
    
    Resolve this by also masking off the low-order bits of 'sz' before passing
    it into pci_size() as 'maxbase'.  With this change, pci_size() will once
    again catch the problems that have been encountered to date:
    
      - AGP aperture BAR of AMD-7xx host bridges: if the AGP window is
        disabled, this BAR is read-only and read as 0x00000008 [1]
    
      - BARs 0-4 of ALi IDE controllers can be non-zero and read-only [1]
    
      - Intel Sandy Bridge - Thermal Management Controller [8086:0103];
        BAR 0 returning 0xfed98004 [2]
    
      - Intel Xeon E5 v3/Core i7 Power Control Unit [8086:2fc0];
        Bar 0 returning 0x00001a [3]
    
    Link: [1] https://git.kernel.org/cgit/linux/kernel/git/tglx/history.git/commit/drivers/pci/probe.c?id=1307ef6621991f1c4bc3cec1b5a4ebd6fd3d66b9 ("PCI: probing read-only BARs" (pre-git))
    Link: [2] https://bugzilla.kernel.org/show_bug.cgi?id=43331
    Link: [3] https://bugzilla.kernel.org/show_bug.cgi?id=85991
    Reported-by: William Unruh <unruh@physics.ubc.ca>
    Reported-by: Martin Lucina <martin@lucina.net>
    Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
    CC: Matthew Wilcox <willy@linux.intel.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 02b586bfc1eb8a7a6153c684f1b52a4db15a49c2
Author: Paul Mackerras <paulus@samba.org>
Date:   Wed Dec 10 00:26:50 2014 +0530

    powerpc/powernv: Switch off MMU before entering nap/sleep/rvwinkle mode
    
    commit 8117ac6a6c2fa0f847ff6a21a1f32c8d2c8501d0 upstream.
    
    Currently, when going idle, we set the flag indicating that we are in
    nap mode (paca->kvm_hstate.hwthread_state) and then execute the nap
    (or sleep or rvwinkle) instruction, all with the MMU on.  This is bad
    for two reasons: (a) the architecture specifies that those instructions
    must be executed with the MMU off, and in fact with only the SF, HV, ME
    and possibly RI bits set, and (b) this introduces a race, because as
    soon as we set the flag, another thread can switch the MMU to a guest
    context.  If the race is lost, this thread will typically start looping
    on relocation-on ISIs at 0xc...4400.
    
    This fixes it by setting the MSR as required by the architecture before
    setting the flag or executing the nap/sleep/rvwinkle instruction.
    
    [ shreyas@linux.vnet.ibm.com: Edited to handle LE ]
    Signed-off-by: Paul Mackerras <paulus@samba.org>
    Signed-off-by: Shreyas B. Prabhu <shreyas@linux.vnet.ibm.com>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: Michael Ellerman <mpe@ellerman.id.au>
    Cc: linuxppc-dev@lists.ozlabs.org
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit c6fdf6dc5e74d008ca8db8c4f7a579a94186c85f
Author: Anton Blanchard <anton@samba.org>
Date:   Tue Nov 11 09:12:28 2014 +1100

    powerpc: Fix bad NULL pointer check in udbg_uart_getc_poll()
    
    commit cd32e2dcc9de6c27ecbbfc0e2079fb64b42bad5f upstream.
    
    We have some code in udbg_uart_getc_poll() that tries to protect
    against a NULL udbg_uart_in, but gets it all wrong.
    
    Found with the LLVM static analyzer (scan-build).
    
    Fixes: 309257484cc1 ("powerpc: Cleanup udbg_16550 and add support for LPC PIO-only UARTs")
    Signed-off-by: Anton Blanchard <anton@samba.org>
    [mpe: Add some newlines for readability while we're here]
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit e3ab75edf0292a413a45448b993775ba4cc4dbd9
Author: Andrew Jackson <Andrew.Jackson@arm.com>
Date:   Fri Dec 19 16:18:05 2014 +0000

    ASoC: dwc: Ensure FIFOs are flushed to prevent channel swap
    
    commit 3475c3d034d7f276a474c8bd53f44b48c8bf669d upstream.
    
    Flush the FIFOs when the stream is prepared for use.  This avoids
    an inadvertent swapping of the left/right channels if the FIFOs are
    not empty at startup.
    
    Signed-off-by: Andrew Jackson <Andrew.Jackson@arm.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 63c9d40707fd0073533385632ed50673811d608a
Author: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Date:   Mon Nov 24 15:32:36 2014 +0200

    ASoC: max98090: Fix ill-defined sidetone route
    
    commit 48826ee590da03e9882922edf96d8d27bdfe9552 upstream.
    
    Commit 5fe5b767dc6f ("ASoC: dapm: Do not pretend to support controls for non
    mixer/mux widgets") revealed ill-defined control in a route between
    "STENL Mux" and DACs in max98090.c:
    
    max98090 i2c-193C9890:00: Control not supported for path STENL Mux -> [NULL] -> DACL
    max98090 i2c-193C9890:00: ASoC: no dapm match for STENL Mux --> NULL --> DACL
    max98090 i2c-193C9890:00: ASoC: Failed to add route STENL Mux -> NULL -> DACL
    max98090 i2c-193C9890:00: Control not supported for path STENL Mux -> [NULL] -> DACR
    max98090 i2c-193C9890:00: ASoC: no dapm match for STENL Mux --> NULL --> DACR
    max98090 i2c-193C9890:00: ASoC: Failed to add route STENL Mux -> NULL -> DACR
    
    Since there is no control between "STENL Mux" and DACs the control name must
    be NULL not "NULL".
    
    Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit e1d6f7ff9cd65f868066d9b17833fb82760209f4
Author: Lars-Peter Clausen <lars@metafoo.de>
Date:   Wed Nov 19 18:29:02 2014 +0100

    ASoC: sigmadsp: Refuse to load firmware files with a non-supported version
    
    commit 50c0f21b42dd4cd02b51f82274f66912d9a7fa32 upstream.
    
    Make sure to check the version field of the firmware header to make sure to
    not accidentally try to parse a firmware file with a different layout.
    Trying to do so can result in loading invalid firmware code to the device.
    
    Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 939c0896c85b324de081975d21b77b7678fff2af
Author: Felix Fietkau <nbd@openwrt.org>
Date:   Sun Nov 30 21:52:57 2014 +0100

    ath5k: fix hardware queue index assignment
    
    commit 9e4982f6a51a2442f1bb588fee42521b44b4531c upstream.
    
    Like with ath9k, ath5k queues also need to be ordered by priority.
    queue_info->tqi_subtype already contains the correct index, so use it
    instead of relying on the order of ath5k_hw_setup_tx_queue calls.
    
    Signed-off-by: Felix Fietkau <nbd@openwrt.org>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 6b4be54359e16d4b4f2dfa8d00ddce49e0e2d93b
Author: Stephane Grosjean <s.grosjean@peak-system.com>
Date:   Fri Nov 28 14:08:48 2014 +0100

    can: peak_usb: fix memset() usage
    
    commit dc50ddcd4c58a5a0226038307d6ef884bec9f8c2 upstream.
    
    This patchs fixes a misplaced call to memset() that fills the request
    buffer with 0. The problem was with sending PCAN_USBPRO_REQ_FCT
    requests, the content set by the caller was thus lost.
    
    With this patch, the memory area is zeroed only when requesting info
    from the device.
    
    Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit e1f20f1d2fa56de8dfff0d7fcfe26609fa55cae6
Author: Stephane Grosjean <s.grosjean@peak-system.com>
Date:   Fri Nov 28 13:49:10 2014 +0100

    can: peak_usb: fix cleanup sequence order in case of error during init
    
    commit af35d0f1cce7a990286e2b94c260a2c2d2a0e4b0 upstream.
    
    This patch sets the correct reverse sequence order to the instructions
    set to run, when any failure occurs during the initialization steps.
    It also adds the missing unregistration call of the can device if the
    failure appears after having been registered.
    
    Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 5dc24dd1e87703800d669192643ead195d080b52
Author: Felix Fietkau <nbd@openwrt.org>
Date:   Sun Nov 30 20:38:41 2014 +0100

    ath9k: fix BE/BK queue order
    
    commit 78063d81d353e10cbdd279c490593113b8fdae1c upstream.
    
    Hardware queues are ordered by priority. Use queue index 0 for BK, which
    has lower priority than BE.
    
    Signed-off-by: Felix Fietkau <nbd@openwrt.org>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 7a2dbfb651aeb95a78029b01af55cde96a2f8db7
Author: Felix Fietkau <nbd@openwrt.org>
Date:   Sun Nov 30 20:38:40 2014 +0100

    ath9k_hw: fix hardware queue allocation
    
    commit ad8fdccf9c197a89e2d2fa78c453283dcc2c343f upstream.
    
    The driver passes the desired hardware queue index for a WMM data queue
    in qinfo->tqi_subtype. This was ignored in ath9k_hw_setuptxqueue, which
    instead relied on the order in which the function is called.
    
    Reported-by: Hubert Feurstein <h.feurstein@gmail.com>
    Signed-off-by: Felix Fietkau <nbd@openwrt.org>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit e5a7d2e6d991b775dbd8407d7c589ef6709f112a
Author: Junxiao Bi <junxiao.bi@oracle.com>
Date:   Thu Dec 18 16:17:37 2014 -0800

    ocfs2: fix journal commit deadlock
    
    commit 136f49b9171074872f2a14ad0ab10486d1ba13ca upstream.
    
    For buffer write, page lock will be got in write_begin and released in
    write_end, in ocfs2_write_end_nolock(), before it unlock the page in
    ocfs2_free_write_ctxt(), it calls ocfs2_run_deallocs(), this will ask
    for the read lock of journal->j_trans_barrier.  Holding page lock and
    ask for journal->j_trans_barrier breaks the locking order.
    
    This will cause a deadlock with journal commit threads, ocfs2cmt will
    get write lock of journal->j_trans_barrier first, then it wakes up
    kjournald2 to do the commit work, at last it waits until done.  To
    commit journal, kjournald2 needs flushing data first, it needs get the
    cache page lock.
    
    Since some ocfs2 cluster locks are holding by write process, this
    deadlock may hung the whole cluster.
    
    unlock pages before ocfs2_run_deallocs() can fix the locking order, also
    put unlock before ocfs2_commit_trans() to make page lock is unlocked
    before j_trans_barrier to preserve unlocking order.
    
    Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
    Reviewed-by: Wengang Wang <wen.gang.wang@oracle.com>
    Reviewed-by: Mark Fasheh <mfasheh@suse.de>
    Cc: Joel Becker <jlbec@evilplan.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 56773a63532f311fbac75b5c16dfccebd2525bbe
Author: Guo Zeng <guo.zeng@csr.com>
Date:   Wed Dec 10 15:52:24 2014 -0800

    drivers/rtc/rtc-sirfsoc.c: move hardware initilization earlier in probe
    
    commit 0e95325525c4383565cea4f402f15a3113162d05 upstream.
    
    Move rtc register to be later than hardware initialization.  The reason
    is that devm_rtc_device_register() will do read_time() which is a
    callback accessing hardware.  This sometimes causes a hang in the
    hardware related callback.
    
    Signed-off-by: Guo Zeng <guo.zeng@csr.com>
    Signed-off-by: Barry Song <Baohua.Song@csr.com>
    Cc: Alessandro Zummo <a.zummo@towertech.it>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit ce4a451f616a1e7ab58cfeceea5e49c8b1c68c81
Author: Jerry Hoemann <jerry.hoemann@hp.com>
Date:   Wed Oct 29 14:50:22 2014 -0700

    fsnotify: next_i is freed during fsnotify_unmount_inodes.
    
    commit 6424babfd68dd8a83d9c60a5242d27038856599f upstream.
    
    During file system stress testing on 3.10 and 3.12 based kernels, the
    umount command occasionally hung in fsnotify_unmount_inodes in the
    section of code:
    
                    spin_lock(&inode->i_lock);
                    if (inode->i_state & (I_FREEING|I_WILL_FREE|I_NEW)) {
                            spin_unlock(&inode->i_lock);
                            continue;
                    }
    
    As this section of code holds the global inode_sb_list_lock, eventually
    the system hangs trying to acquire the lock.
    
    Multiple crash dumps showed:
    
    The inode->i_state == 0x60 and i_count == 0 and i_sb_list would point
    back at itself.  As this is not the value of list upon entry to the
    function, the kernel never exits the loop.
    
    To help narrow down problem, the call to list_del_init in
    inode_sb_list_del was changed to list_del.  This poisons the pointers in
    the i_sb_list and causes a kernel to panic if it transverse a freed
    inode.
    
    Subsequent stress testing paniced in fsnotify_unmount_inodes at the
    bottom of the list_for_each_entry_safe loop showing next_i had become
    free.
    
    We believe the root cause of the problem is that next_i is being freed
    during the window of time that the list_for_each_entry_safe loop
    temporarily releases inode_sb_list_lock to call fsnotify and
    fsnotify_inode_delete.
    
    The code in fsnotify_unmount_inodes attempts to prevent the freeing of
    inode and next_i by calling __iget.  However, the code doesn't do the
    __iget call on next_i
    
    	if i_count == 0 or
    	if i_state & (I_FREEING | I_WILL_FREE)
    
    The patch addresses this issue by advancing next_i in the above two cases
    until we either find a next_i which we can __iget or we reach the end of
    the list.  This makes the handling of next_i more closely match the
    handling of the variable "inode."
    
    The time to reproduce the hang is highly variable (from hours to days.) We
    ran the stress test on a 3.10 kernel with the proposed patch for a week
    without failure.
    
    During list_for_each_entry_safe, next_i is becoming free causing
    the loop to never terminate.  Advance next_i in those cases where
    __iget is not done.
    
    Signed-off-by: Jerry Hoemann <jerry.hoemann@hp.com>
    Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
    Cc: Ken Helias <kenhelias@firemail.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>