commit cf1b3dad6c5699b977273276bada8597636ef3e2
Author: Zefan Li <lizefan@huawei.com>
Date:   Fri Jun 19 11:40:35 2015 +0800

    Linux 3.4.108

commit 366df578d3354ee84edc4e0e731ad47678f09e4e
Author: Ian Campbell <Ian.Campbell@citrix.com>
Date:   Mon Jun 1 11:30:24 2015 +0100

    xen: netback: read hotplug script once at start of day.
    
    commit 31a418986a5852034d520a5bab546821ff1ccf3d upstream.
    
    When we come to tear things down in netback_remove() and generate the
    uevent it is possible that the xenstore directory has already been
    removed (details below).
    
    In such cases netback_uevent() won't be able to read the hotplug
    script and will write a xenstore error node.
    
    A recent change to the hypervisor exposed this race such that we now
    sometimes lose it (where apparently we didn't ever before).
    
    Instead read the hotplug script configuration during setup and use it
    for the lifetime of the backend device.
    
    The apparently more obvious fix of moving the transition to
    state=Closed in netback_remove() to after the uevent does not work
    because it is possible that we are already in state=Closed (in
    reaction to the guest having disconnected as it shutdown). Being
    already in Closed means the toolstack is at liberty to start tearing
    down the xenstore directories. In principal it might be possible to
    arrange to unregister the device sooner (e.g on transition to Closing)
    such that xenstore would still be there but this state machine is
    fragile and prone to anger...
    
    A modern Xen system only relies on the hotplug uevent for driver
    domains, when the backend is in the same domain as the toolstack it
    will run the necessary setup/teardown directly in the correct sequence
    wrt xenstore changes.
    
    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Acked-by: Wei Liu <wei.liu2@citrix.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit e0483eb80cb0f7ffc160da18ddd95434ae3e8c34
Author: Joonsoo Kim <js1304@gmail.com>
Date:   Sat Jun 9 02:23:16 2012 +0900

    slub: refactoring unfreeze_partials()
    
    commit 43d77867a4f333de4e4189114c480dd365133c09 upstream.
    
    Current implementation of unfreeze_partials() is so complicated,
    but benefit from it is insignificant. In addition many code in
    do {} while loop have a bad influence to a fail rate of cmpxchg_double_slab.
    Under current implementation which test status of cpu partial slab
    and acquire list_lock in do {} while loop,
    we don't need to acquire a list_lock and gain a little benefit
    when front of the cpu partial slab is to be discarded, but this is a rare case.
    In case that add_partial is performed and cmpxchg_double_slab is failed,
    remove_partial should be called case by case.
    
    I think that these are disadvantages of current implementation,
    so I do refactoring unfreeze_partials().
    
    Minimizing code in do {} while loop introduce a reduced fail rate
    of cmpxchg_double_slab. Below is output of 'slabinfo -r kmalloc-256'
    when './perf stat -r 33 hackbench 50 process 4000 > /dev/null' is done.
    
    ** before **
    Cmpxchg_double Looping
    ------------------------
    Locked Cmpxchg Double redos   182685
    Unlocked Cmpxchg Double redos 0
    
    ** after **
    Cmpxchg_double Looping
    ------------------------
    Locked Cmpxchg Double redos   177995
    Unlocked Cmpxchg Double redos 1
    
    We can see cmpxchg_double_slab fail rate is improved slightly.
    
    Bolow is output of './perf stat -r 30 hackbench 50 process 4000 > /dev/null'.
    
    ** before **
     Performance counter stats for './hackbench 50 process 4000' (30 runs):
    
         108517.190463 task-clock                #    7.926 CPUs utilized            ( +-  0.24% )
             2,919,550 context-switches          #    0.027 M/sec                    ( +-  3.07% )
               100,774 CPU-migrations            #    0.929 K/sec                    ( +-  4.72% )
               124,201 page-faults               #    0.001 M/sec                    ( +-  0.15% )
       401,500,234,387 cycles                    #    3.700 GHz                      ( +-  0.24% )
       <not supported> stalled-cycles-frontend
       <not supported> stalled-cycles-backend
       250,576,913,354 instructions              #    0.62  insns per cycle          ( +-  0.13% )
        45,934,956,860 branches                  #  423.297 M/sec                    ( +-  0.14% )
           188,219,787 branch-misses             #    0.41% of all branches          ( +-  0.56% )
    
          13.691837307 seconds time elapsed                                          ( +-  0.24% )
    
    ** after **
     Performance counter stats for './hackbench 50 process 4000' (30 runs):
    
         107784.479767 task-clock                #    7.928 CPUs utilized            ( +-  0.22% )
             2,834,781 context-switches          #    0.026 M/sec                    ( +-  2.33% )
                93,083 CPU-migrations            #    0.864 K/sec                    ( +-  3.45% )
               123,967 page-faults               #    0.001 M/sec                    ( +-  0.15% )
       398,781,421,836 cycles                    #    3.700 GHz                      ( +-  0.22% )
       <not supported> stalled-cycles-frontend
       <not supported> stalled-cycles-backend
       250,189,160,419 instructions              #    0.63  insns per cycle          ( +-  0.09% )
        45,855,370,128 branches                  #  425.436 M/sec                    ( +-  0.10% )
           169,881,248 branch-misses             #    0.37% of all branches          ( +-  0.43% )
    
          13.596272341 seconds time elapsed                                          ( +-  0.22% )
    
    No regression is found, but rather we can see slightly better result.
    
    Acked-by: Christoph Lameter <cl@linux.com>
    Signed-off-by: Joonsoo Kim <js1304@gmail.com>
    Signed-off-by: Pekka Enberg <penberg@kernel.org>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit cb990484af9902b4acdb892668441e11f3df8923
Author: Ben Hutchings <ben@decadent.org.uk>
Date:   Mon Apr 13 00:26:35 2015 +0100

    xen-pciback: Add name prefix to global 'permissive' variable
    
    commit 8014bcc86ef112eab9ee1db312dba4e6b608cf89 upstream.
    
    The variable for the 'permissive' module parameter used to be static
    but was recently changed to be extern.  This puts it in the kernel
    global namespace if the driver is built-in, so its name should begin
    with a prefix identifying the driver.
    
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    Fixes: af6fc858a35b ("xen-pciback: limit guest control of command register")
    Signed-off-by: David Vrabel <david.vrabel@citrix.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit c905f0af23c68732315840412e3cf0f180a63d0c
Author: Tejun Heo <tj@kernel.org>
Date:   Tue Apr 21 16:49:13 2015 -0400

    writeback: use |1 instead of +1 to protect against div by zero
    
    commit 464d1387acb94dc43ba772b35242345e3d2ead1b upstream.
    
    mm/page-writeback.c has several places where 1 is added to the divisor
    to prevent division by zero exceptions; however, if the original
    divisor is equivalent to -1, adding 1 leads to division by zero.
    
    There are three places where +1 is used for this purpose - one in
    pos_ratio_polynom() and two in bdi_position_ratio().  The second one
    in bdi_position_ratio() actually triggered div-by-zero oops on a
    machine running a 3.10 kernel.  The divisor is
    
      x_intercept - bdi_setpoint + 1 == span + 1
    
    span is confirmed to be (u32)-1.  It isn't clear how it ended up that
    but it could be from write bandwidth calculation underflow fixed by
    c72efb658f7c ("writeback: fix possible underflow in write bandwidth
    calculation").
    
    At any rate, +1 isn't a proper protection against div-by-zero.  This
    patch converts all +1 protections to |1.  Note that
    bdi_update_dirty_ratelimit() was already using |1 before this patch.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Reviewed-by: Jan Kara <jack@suse.cz>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    [lizf: Backported to 3.4: drop other two changes as there's only one
     such statment in 3.4]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 397c6496535ee3f1de27c46e904e3a8f95ce60f6
Author: Yann Droneaud <ydroneaud@opteya.com>
Date:   Mon Apr 13 14:56:23 2015 +0200

    IB/core: don't disallow registering region starting at 0x0
    
    commit 66578b0b2f69659f00b6169e6fe7377c4b100d18 upstream.
    
    In a call to ib_umem_get(), if address is 0x0 and size is
    already page aligned, check added in commit 8494057ab5e4
    ("IB/uverbs: Prevent integer overflow in ib_umem_get address
    arithmetic") will refuse to register a memory region that
    could otherwise be valid (provided vm.mmap_min_addr sysctl
    and mmap_low_allowed SELinux knobs allow userspace to map
    something at address 0x0).
    
    This patch allows back such registration: ib_umem_get()
    should probably don't care of the base address provided it
    can be pinned with get_user_pages().
    
    There's two possible overflows, in (addr + size) and in
    PAGE_ALIGN(addr + size), this patch keep ensuring none
    of them happen while allowing to pin memory at address
    0x0. Anyway, the case of size equal 0 is no more (partially)
    handled as 0-length memory region are disallowed by an
    earlier check.
    
    Link: http://mid.gmane.org/cover.1428929103.git.ydroneaud@opteya.com
    Cc: Shachar Raindel <raindel@mellanox.com>
    Cc: Jack Morgenstein <jackm@mellanox.com>
    Cc: Or Gerlitz <ogerlitz@mellanox.com>
    Signed-off-by: Yann Droneaud <ydroneaud@opteya.com>
    Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
    Reviewed-by: Haggai Eran <haggaie@mellanox.com>
    Signed-off-by: Doug Ledford <dledford@redhat.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit b383c48a15768f2013a38e20b2bba82d04b53dcf
Author: Quentin Casasnovas <quentin.casasnovas@oracle.com>
Date:   Tue Apr 14 11:25:43 2015 +0200

    cdc-acm: prevent infinite loop when parsing CDC headers.
    
    commit 0d3bba0287d4e284c3ec7d3397e81eec920d5e7e upstream.
    
    Phil and I found out a problem with commit:
    
      7e860a6e7aa6 ("cdc-acm: add sanity checks")
    
    It added some sanity checks to ignore potential garbage in CDC headers but
    also introduced a potential infinite loop.  This can happen at the first
    loop iteration (elength = 0 in that case) if the description isn't a
    DT_CS_INTERFACE or later if 'buffer[0]' is zero.
    
    It should also be noted that the wrong length was being added to 'buffer'
    in case 'buffer[1]' was not a DT_CS_INTERFACE descriptor, since elength was
    assigned after that check in the loop.
    
    A specially crafted USB device could be used to trigger this infinite loop.
    
    Fixes: 7e860a6e7aa6 ("cdc-acm: add sanity checks")
    Signed-off-by: Phil Turnbull <phil.turnbull@oracle.com>
    Signed-off-by: Quentin Casasnovas <quentin.casasnovas@oracle.com>
    CC: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
    CC: Oliver Neukum <oneukum@suse.de>
    CC: Adam Lee <adam8157@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 981889fbaee9c2851727f534deb425b85a15e641
Author: Al Viro <viro@zeniv.linux.org.uk>
Date:   Sat Sep 13 21:55:46 2014 -0400

    don't bugger nd->seq on set_root_rcu() from follow_dotdot_rcu()
    
    commit 7bd88377d482e1eae3c5329b12e33cfd664fa6a9 upstream.
    
    return the value instead, and have path_init() do the assignment.  Broken by
    "vfs: Fix absolute RCU path walk failures due to uninitialized seq number",
    which was Cc-stable with 2.6.38+ as destination.  This one should go where
    it went.
    
    To avoid dummy value returned in case when root is already set (it would do
    no harm, actually, since the only caller that doesn't ignore the return value
    is guaranteed to have nd->root *not* set, but it's more obvious that way),
    lift the check into callers.  And do the same to set_root(), to keep them
    in sync.
    
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Ian Jackson <ian.jackson@eu.citrix.com>
    [lizf: the previous backport of this upstream commit is buggy. fix it]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit bded67cc51db4e29af84f9ec1d671a86b0b6763b
Author: Yinghai Lu <yinghai@kernel.org>
Date:   Mon Dec 9 22:54:40 2013 -0800

    PCI: Convert pcibios_resource_to_bus() to take a pci_bus, not a pci_dev
    
    commit fc2798502f860b18f3c7121e4dc659d3d9d28d74 upstream.
    
    These interfaces:
    
      pcibios_resource_to_bus(struct pci_dev *dev, *bus_region, *resource)
      pcibios_bus_to_resource(struct pci_dev *dev, *resource, *bus_region)
    
    took a pci_dev, but they really depend only on the pci_bus.  And we want to
    use them in resource allocation paths where we have the bus but not a
    device, so this patch converts them to take the pci_bus instead of the
    pci_dev:
    
      pcibios_resource_to_bus(struct pci_bus *bus, *bus_region, *resource)
      pcibios_bus_to_resource(struct pci_bus *bus, *resource, *bus_region)
    
    In fact, with standard PCI-PCI bridges, they only depend on the host
    bridge, because that's the only place address translation occurs, but
    we aren't going that far yet.
    
    [bhelgaas: changelog]
    Signed-off-by: Yinghai Lu <yinghai@kernel.org>
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
    Cc: Dirk Behme <dirk.behme@gmail.com>
    [lizf: Backported to 3.4:
     - make changes to pci_host_bridge() instead of find_pci_root_bus()
     - adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit edf76233db20b417ad0cb88cc9f4d4001fef1bd3
Author: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Date:   Fri Apr 17 15:04:48 2015 -0400

    config: Enable NEED_DMA_MAP_STATE by default when SWIOTLB is selected
    
    commit a6dfa128ce5c414ab46b1d690f7a1b8decb8526d upstream.
    
    A huge amount of NIC drivers use the DMA API, however if
    compiled under 32-bit an very important part of the DMA API can
    be ommitted leading to the drivers not working at all
    (especially if used with 'swiotlb=force iommu=soft').
    
    As Prashant Sreedharan explains it: "the driver [tg3] uses
    DEFINE_DMA_UNMAP_ADDR(), dma_unmap_addr_set() to keep a copy of
    the dma "mapping" and dma_unmap_addr() to get the "mapping"
    value. On most of the platforms this is a no-op, but ... with
    "iommu=soft and swiotlb=force" this house keeping is required,
    ... otherwise we pass 0 while calling pci_unmap_/pci_dma_sync_
    instead of the DMA address."
    
    As such enable this even when using 32-bit kernels.
    
    Reported-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    Acked-by: David S. Miller <davem@davemloft.net>
    Acked-by: Prashant Sreedharan <prashant@broadcom.com>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Michael Chan <mchan@broadcom.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: boris.ostrovsky@oracle.com
    Cc: cascardo@linux.vnet.ibm.com
    Cc: david.vrabel@citrix.com
    Cc: sanjeevb@broadcom.com
    Cc: siva.kallam@broadcom.com
    Cc: vyasevich@gmail.com
    Cc: xen-devel@lists.xensource.com
    Link: http://lkml.kernel.org/r/20150417190448.GA9462@l.oracle.com
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Cc: Ben Hutchings <ben@decadent.org.uk>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit db5a01017cff23144e5d1fbf8d3a207b34819e92
Author: Kirill A. Shutemov <kirill@shutemov.name>
Date:   Mon Jun 24 11:43:14 2013 +0300

    perf tools: Fix build with perl 5.18
    
    commit 575bf1d04e908469d26da424b52fc1b12a1db9d8 upstream.
    
    perl.h from new Perl release doesn't like -Wundef and -Wswitch-default:
    
    /usr/lib/perl5/core_perl/CORE/perl.h:548:5: error: "SILENT_NO_TAINT_SUPPORT" is not defined [-Werror=undef]
     #if SILENT_NO_TAINT_SUPPORT && !defined(NO_TAINT_SUPPORT)
         ^
    /usr/lib/perl5/core_perl/CORE/perl.h:556:5: error: "NO_TAINT_SUPPORT" is not defined [-Werror=undef]
     #if NO_TAINT_SUPPORT
         ^
    In file included from /usr/lib/perl5/core_perl/CORE/perl.h:3471:0,
                     from util/scripting-engines/trace-event-perl.c:30:
    /usr/lib/perl5/core_perl/CORE/sv.h:1455:5: error: "NO_TAINT_SUPPORT" is not defined [-Werror=undef]
     #if NO_TAINT_SUPPORT
         ^
    In file included from /usr/lib/perl5/core_perl/CORE/perl.h:3472:0,
                     from util/scripting-engines/trace-event-perl.c:30:
    /usr/lib/perl5/core_perl/CORE/regexp.h:436:5: error: "NO_TAINT_SUPPORT" is not defined [-Werror=undef]
     #if NO_TAINT_SUPPORT
         ^
    In file included from /usr/lib/perl5/core_perl/CORE/hv.h:592:0,
                     from /usr/lib/perl5/core_perl/CORE/perl.h:3480,
                     from util/scripting-engines/trace-event-perl.c:30:
    /usr/lib/perl5/core_perl/CORE/hv_func.h: In function ‘S_perl_hash_siphash_2_4’:
    /usr/lib/perl5/core_perl/CORE/hv_func.h:222:3: error: switch missing default case [-Werror=switch-default]
       switch( left )
       ^
    /usr/lib/perl5/core_perl/CORE/hv_func.h: In function ‘S_perl_hash_superfast’:
    /usr/lib/perl5/core_perl/CORE/hv_func.h:274:5: error: switch missing default case [-Werror=switch-default]
         switch (rem) { \
         ^
    /usr/lib/perl5/core_perl/CORE/hv_func.h: In function ‘S_perl_hash_murmur3’:
    /usr/lib/perl5/core_perl/CORE/hv_func.h:398:5: error: switch missing default case [-Werror=switch-default]
         switch(bytes_in_carry) { /* how many bytes in carry */
         ^
    
    Let's disable the warnings for code which uses perl.h.
    
    Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Link: http://lkml.kernel.org/r/1372063394-20126-1-git-send-email-kirill@shutemov.name
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Vinson Lee <vlee@twopensource.com>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 9f03e834a195105852d725f968602b5e9f4b5fe3
Author: hujianyang <hujianyang@huawei.com>
Date:   Tue Dec 30 11:56:09 2014 +0800

    UBI: fix soft lockup in ubi_check_volume()
    
    commit 9aa272b492e7551a9ee0e2c83c720ea013698485 upstream.
    
    Running mtd-utils/tests/ubi-tests/io_basic.c could cause
    soft lockup or watchdog reset. It is because *updatevol*
    will perform ubi_check_volume() after updating finish
    and this function will full scan the updated lebs if the
    volume is initialized as STATIC_VOLUME.
    
    This patch adds *cond_resched()* in the loop of lebs scan
    to avoid soft lockup.
    
    Helped by Richard Weinberger <richard@nod.at>
    
    [ 2158.067096] INFO: rcu_sched self-detected stall on CPU { 1}  (t=2101 jiffies g=1606 c=1605 q=56)
    [ 2158.172867] CPU: 1 PID: 2073 Comm: io_basic Tainted: G           O 3.10.53 #21
    [ 2158.172898] [<c000f624>] (unwind_backtrace+0x0/0x120) from [<c000c294>] (show_stack+0x10/0x14)
    [ 2158.172918] [<c000c294>] (show_stack+0x10/0x14) from [<c008ac3c>] (rcu_check_callbacks+0x1c0/0x660)
    [ 2158.172936] [<c008ac3c>] (rcu_check_callbacks+0x1c0/0x660) from [<c002b480>] (update_process_times+0x38/0x64)
    [ 2158.172953] [<c002b480>] (update_process_times+0x38/0x64) from [<c005ff38>] (tick_sched_handle+0x54/0x60)
    [ 2158.172966] [<c005ff38>] (tick_sched_handle+0x54/0x60) from [<c00601ac>] (tick_sched_timer+0x44/0x74)
    [ 2158.172978] [<c00601ac>] (tick_sched_timer+0x44/0x74) from [<c003f348>] (__run_hrtimer+0xc8/0x1b8)
    [ 2158.172992] [<c003f348>] (__run_hrtimer+0xc8/0x1b8) from [<c003fd9c>] (hrtimer_interrupt+0x128/0x2a4)
    [ 2158.173007] [<c003fd9c>] (hrtimer_interrupt+0x128/0x2a4) from [<c0246f1c>] (arch_timer_handler_virt+0x28/0x30)
    [ 2158.173022] [<c0246f1c>] (arch_timer_handler_virt+0x28/0x30) from [<c0086214>] (handle_percpu_devid_irq+0x9c/0x124)
    [ 2158.173036] [<c0086214>] (handle_percpu_devid_irq+0x9c/0x124) from [<c0082bd8>] (generic_handle_irq+0x20/0x30)
    [ 2158.173049] [<c0082bd8>] (generic_handle_irq+0x20/0x30) from [<c000969c>] (handle_IRQ+0x64/0x8c)
    [ 2158.173060] [<c000969c>] (handle_IRQ+0x64/0x8c) from [<c0008544>] (gic_handle_irq+0x3c/0x60)
    [ 2158.173074] [<c0008544>] (gic_handle_irq+0x3c/0x60) from [<c02f0f80>] (__irq_svc+0x40/0x50)
    [ 2158.173083] Exception stack(0xc4043c98 to 0xc4043ce0)
    [ 2158.173092] 3c80:                                                       c4043ce4 00000019
    [ 2158.173102] 3ca0: 1f8a865f c050ad10 1f8a864c 00000031 c04b5970 0003ebce 00000000 f3550000
    [ 2158.173113] 3cc0: bf00bc68 00000800 0003ebce c4043ce0 c0186d14 c0186cb8 80000013 ffffffff
    [ 2158.173130] [<c02f0f80>] (__irq_svc+0x40/0x50) from [<c0186cb8>] (read_current_timer+0x4/0x38)
    [ 2158.173145] [<c0186cb8>] (read_current_timer+0x4/0x38) from [<1f8a865f>] (0x1f8a865f)
    [ 2183.927097] BUG: soft lockup - CPU#1 stuck for 22s! [io_basic:2073]
    [ 2184.002229] Modules linked in: nandflash(O) [last unloaded: nandflash]
    
    Signed-off-by: Wang Kai <morgan.wang@huawei.com>
    Signed-off-by: hujianyang <hujianyang@huawei.com>
    Signed-off-by: Richard Weinberger <richard@nod.at>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit a5822a0847e8d2980ee1d04f96ef78b9597928c8
Author: Sasha Levin <sasha.levin@oracle.com>
Date:   Tue Apr 8 16:04:11 2014 -0700

    autofs4: check dev ioctl size before allocating
    
    commit e53d77eb8bb616e903e34cc7a918401bee3b5149 upstream.
    
    There wasn't any check of the size passed from userspace before trying
    to allocate the memory required.
    
    This meant that userspace might request more space than allowed,
    triggering an OOM.
    
    Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
    Signed-off-by: Ian Kent <raven@themaw.net>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 4dd86a6aea75dba2284caa49817897582a0fe684
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>
    Cc: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 812fbfa11d44a4e59623229cbd61833fed1c1768
Author: Florian Westphal <fw@strlen.de>
Date:   Mon Oct 20 13:49:17 2014 +0200

    net: make skb_gso_segment error handling more robust
    
    commit 330966e501ffe282d7184fde4518d5e0c24bc7f8 upstream.
    
    skb_gso_segment has three possible return values:
    1. a pointer to the first segmented skb
    2. an errno value (IS_ERR())
    3. NULL.  This can happen when GSO is used for header verification.
    
    However, several callers currently test IS_ERR instead of IS_ERR_OR_NULL
    and would oops when NULL is returned.
    
    Note that these call sites should never actually see such a NULL return
    value; all callers mask out the GSO bits in the feature argument.
    
    However, there have been issues with some protocol handlers erronously not
    respecting the specified feature mask in some cases.
    
    It is preferable to get 'have to turn off hw offloading, else slow' reports
    rather than 'kernel crashes'.
    
    Signed-off-by: Florian Westphal <fw@strlen.de>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Cc: Ben Hutchings <ben@decadent.org.uk>
    [lizf: Backported to 3.4: drop some hunks as there are fewer skb_gso_segment()
     users in 3.4]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 4e237a3ed2af86578d22ec17a93738f5fc8a6076
Author: Pravin B Shelar <pshelar@nicira.com>
Date:   Fri Jul 20 14:46:29 2012 -0700

    openvswitch: Check currect return value from skb_gso_segment()
    
    commit 92e5dfc34cf39c20ae1087bd5e676238b5d0dfac upstream.
    
    Fix return check typo.
    
    Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
    Signed-off-by: Jesse Gross <jesse@nicira.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit e661bb1c6d22a28c9038f4c2888e1e3b52f5b247
Author: Jann Horn <jann@thejh.net>
Date:   Sun Apr 19 02:48:39 2015 +0200

    fs: take i_mutex during prepare_binprm for set[ug]id executables
    
    commit 8b01fc86b9f425899f8a3a8fc1c47d73c2c20543 upstream.
    
    This prevents a race between chown() and execve(), where chowning a
    setuid-user binary to root would momentarily make the binary setuid
    root.
    
    This patch was mostly written by Linus Torvalds.
    
    Signed-off-by: Jann Horn <jann@thejh.net>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    [lizf: Backported to 3.4:
     - adjust context
     - remove task_no_new_priv and user namespace stuff
     - open-code file_inode()
     - s/READ_ONCE/ACCESS_ONCE]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit fcafa22d451873a00bc97caa3abeeaa07b07685e
Author: Tomas Henzl <thenzl@redhat.com>
Date:   Fri Jan 23 16:41:14 2015 -0600

    hpsa: fix memory leak in kdump hard reset
    
    commit 03741d956eaac31264952e0afa181b62713892a5 upstream.
    
    There is a potential memory leak in hpsa_kdump_hard_reset_controller.
    
    Reviewed-by: Don Brace <don.brace@pmcs.com>
    Reviewed-by: Scott Teel <scott.teel@pmcs.com>
    Signed-off-by: Tomas Henzl <thenzl@redhat.com>
    Signed-off-by: Don Brace <don.brace@pmcs.com>
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Cc: Vinson Lee <vlee@twopensource.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 52f706062ac08cfbb1b9d689e69949b6440c30eb
Author: Tomas Henzl <thenzl@redhat.com>
Date:   Fri Jan 23 16:41:20 2015 -0600

    hpsa: turn off interrupts when kdump starts
    
    commit 3b747298786355c6934b0892fc9ae4ca44105192 upstream.
    
    Sometimes when the card is restarted it may cause -
    "irq 16: nobody cared (try booting with the "irqpoll" option)"
    that is likely caused so, that the card, after the hard reset
    finishes, pulls on the irq. Disabling the ints before or after
    the hpsa_kdump_hard_reset_controller fixes it.
    
    At this point we can't know in which state the card is,
    so using SA5_INTR_OFF + SA5_REPLY_INTR_MASK_OFFSET defines directly,
    instead of the function the drivers provides, seems to be apropriate.
    
    Reviewed-by: Scott Teel <scott.teel@pmcs.com>
    Signed-off-by: Don Brace <don.brace@pmcs.com>
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Cc: Vinson Lee <vlee@twopensource.com>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 554117937a31d12a6c3fa8d98dcb1bde672130dd
Author: Tomas Henzl <thenzl@redhat.com>
Date:   Fri Sep 12 14:44:15 2014 +0200

    hpsa: add missing pci_set_master in kdump path
    
    commit 859c75aba20264d87dd026bab0d0ca3bff385955 upstream.
    
    Add a call to pci_set_master(...)  missing in the previous
    patch "hpsa: refine the pci enable/disable handling".
    Found thanks to Rob Elliot.
    
    Signed-off-by: Tomas Henzl <thenzl@redhat.com>
    Reviewed-by: Robert Elliott <elliott@hp.com>
    Tested-by: Robert Elliott <elliott@hp.com>
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Cc: Vinson Lee <vlee@twopensource.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 7de2f4c1f4905163d8496e08f5deca8b8aacd3a6
Author: Tomas Henzl <thenzl@redhat.com>
Date:   Thu Aug 14 16:12:39 2014 +0200

    hpsa: refine the pci enable/disable handling
    
    commit 132aa220b45d60e9b20def1e9d8be9422eed9616 upstream.
    
    When a second(kdump) kernel starts and the hard reset method is used
    the driver calls pci_disable_device without previously enabling it,
    so the kernel shows a warning -
    [   16.876248] WARNING: at drivers/pci/pci.c:1431 pci_disable_device+0x84/0x90()
    [   16.882686] Device hpsa
    disabling already-disabled device
    ...
    This patch fixes it, in addition to this I tried to balance also some other pairs
    of enable/disable device in the driver.
    Unfortunately I wasn't able to verify the functionality for the case of a sw reset,
    because of a lack of proper hw.
    
    Signed-off-by: Tomas Henzl <thenzl@redhat.com>
    Reviewed-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Cc: Vinson Lee <vlee@twopensource.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 54561a5233a3981a6a139e22fc1e4688475c296c
Author: Eli Cohen <eli@dev.mellanox.co.il>
Date:   Sun Sep 14 16:47:52 2014 +0300

    IB/core: Avoid leakage from kernel to user space
    
    commit 377b513485fd885dea1083a9a5430df65b35e048 upstream.
    
    Clear the reserved field of struct ib_uverbs_async_event_desc which is
    copied to user space.
    
    Signed-off-by: Eli Cohen <eli@mellanox.com>
    Reviewed-by: Yann Droneaud <ydroneaud@opteya.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 6221195422cc63c0c977ae05e964aad862f6cee6
Author: Ian Abbott <abbotti@mev.co.uk>
Date:   Mon Mar 23 17:50:27 2015 +0000

    spi: spidev: fix possible arithmetic overflow for multi-transfer message
    
    commit f20fbaad7620af2df36a1f9d1c9ecf48ead5b747 upstream.
    
    `spidev_message()` sums the lengths of the individual SPI transfers to
    determine the overall SPI message length.  It restricts the total
    length, returning an error if too long, but it does not check for
    arithmetic overflow.  For example, if the SPI message consisted of two
    transfers and the first has a length of 10 and the second has a length
    of (__u32)(-1), the total length would be seen as 9, even though the
    second transfer is actually very long.  If the second transfer specifies
    a null `rx_buf` and a non-null `tx_buf`, the `copy_from_user()` could
    overrun the spidev's pre-allocated tx buffer before it reaches an
    invalid user memory address.  Fix it by checking that neither the total
    nor the individual transfer lengths exceed the maximum allowed value.
    
    Thanks to Dan Carpenter for reporting the potential integer overflow.
    
    Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    [Ian Abbott: Note: original commit compares the lengths to INT_MAX instead
    of bufsiz due to changes in earlier commits.]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit a743477636c629c2b2f4e6e423275d9cf51050dd
Author: Jim Snow <jim.m.snow@intel.com>
Date:   Tue Nov 18 14:51:09 2014 +0100

    sb_edac: Fix erroneous bytes->gigabytes conversion
    
    commit 8c009100295597f23978c224aec5751a365bc965 upstream.
    
    Signed-off-by: Jim Snow <jim.snow@intel.com>
    Signed-off-by: Lukasz Anaczkowski <lukasz.anaczkowski@intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
    Cc: Vinson Lee <vlee@twopensource.com>
    [lizf: Backported to 3.4:
     - adjust context
     - use debugf0() instead of edac_dbg()]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 5f842c0f4a0c22095ba5e3d7a8fc5213f31c160f
Author: Scott Wood <scottwood@freescale.com>
Date:   Wed Dec 17 19:06:31 2014 -0600

    powerpc/mpc85xx: Add ranges to etsec2 nodes
    
    commit bb344ca5b90df62b1a3b7a35c6a9d00b306a170d upstream.
    
    Commit 746c9e9f92dd "of/base: Fix PowerPC address parsing hack" limited
    the applicability of the workaround whereby a missing ranges is treated
    as an empty ranges.  This workaround was hiding a bug in the etsec2
    device tree nodes, which have children with reg, but did not have
    ranges.
    
    Signed-off-by: Scott Wood <scottwood@freescale.com>
    Reported-by: Alexander Graf <agraf@suse.de>
    Cc: Scott Wood <scottwood@freescale.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit bff9edd65d2562a82d7ea2cdaf81c2ba8c7c231a
Author: Ben Hutchings <ben@decadent.org.uk>
Date:   Tue Feb 17 01:46:53 2015 +0000

    splice: Apply generic position and size checks to each write
    
    3.2.67-rc1 review patch.  If anyone has any objections, please let me know.
    
    ------------------
    
    From: Ben Hutchings <ben@decadent.org.uk>
    
    We need to check the position and size of file writes against various
    limits, using generic_write_check().  This was not being done for
    the splice write path.  It was fixed upstream by commit 8d0207652cbe
    ("->splice_write() via ->write_iter()") but we can't apply that.
    
    CVE-2014-7822
    
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit b674b0adae623283de4f49e1734de675678c456f
Author: Ben Greear <greearb@candelatech.com>
Date:   Thu Jun 6 14:29:49 2013 -0700

    Fix lockup related to stop_machine being stuck in __do_softirq.
    
    commit 34376a50fb1fa095b9d0636fa41ed2e73125f214 upstream.
    
    The stop machine logic can lock up if all but one of the migration
    threads make it through the disable-irq step and the one remaining
    thread gets stuck in __do_softirq.  The reason __do_softirq can hang is
    that it has a bail-out based on jiffies timeout, but in the lockup case,
    jiffies itself is not incremented.
    
    To work around this, re-add the max_restart counter in __do_irq and stop
    processing irqs after 10 restarts.
    
    Thanks to Tejun Heo and Rusty Russell and others for helping me track
    this down.
    
    This was introduced in 3.9 by commit c10d73671ad3 ("softirq: reduce
    latencies").
    
    It may be worth looking into ath9k to see if it has issues with its irq
    handler at a later date.
    
    The hang stack traces look something like this:
    
        ------------[ cut here ]------------
        WARNING: at kernel/watchdog.c:245 watchdog_overflow_callback+0x9c/0xa7()
        Watchdog detected hard LOCKUP on cpu 2
        Modules linked in: ath9k ath9k_common ath9k_hw ath mac80211 cfg80211 nfsv4 auth_rpcgss nfs fscache nf_nat_ipv4 nf_nat veth 8021q garp stp mrp llc pktgen lockd sunrpc]
        Pid: 23, comm: migration/2 Tainted: G         C   3.9.4+ #11
        Call Trace:
         <NMI>   warn_slowpath_common+0x85/0x9f
          warn_slowpath_fmt+0x46/0x48
          watchdog_overflow_callback+0x9c/0xa7
          __perf_event_overflow+0x137/0x1cb
          perf_event_overflow+0x14/0x16
          intel_pmu_handle_irq+0x2dc/0x359
          perf_event_nmi_handler+0x19/0x1b
          nmi_handle+0x7f/0xc2
          do_nmi+0xbc/0x304
          end_repeat_nmi+0x1e/0x2e
         <<EOE>>
          cpu_stopper_thread+0xae/0x162
          smpboot_thread_fn+0x258/0x260
          kthread+0xc7/0xcf
          ret_from_fork+0x7c/0xb0
        ---[ end trace 4947dfa9b0a4cec3 ]---
        BUG: soft lockup - CPU#1 stuck for 22s! [migration/1:17]
        Modules linked in: ath9k ath9k_common ath9k_hw ath mac80211 cfg80211 nfsv4 auth_rpcgss nfs fscache nf_nat_ipv4 nf_nat veth 8021q garp stp mrp llc pktgen lockd sunrpc]
        irq event stamp: 835637905
        hardirqs last  enabled at (835637904): __do_softirq+0x9f/0x257
        hardirqs last disabled at (835637905): apic_timer_interrupt+0x6d/0x80
        softirqs last  enabled at (5654720): __do_softirq+0x1ff/0x257
        softirqs last disabled at (5654725): irq_exit+0x5f/0xbb
        CPU 1
        Pid: 17, comm: migration/1 Tainted: G        WC   3.9.4+ #11 To be filled by O.E.M. To be filled by O.E.M./To be filled by O.E.M.
        RIP: tasklet_hi_action+0xf0/0xf0
        Process migration/1
        Call Trace:
         <IRQ>
          __do_softirq+0x117/0x257
          irq_exit+0x5f/0xbb
          smp_apic_timer_interrupt+0x8a/0x98
          apic_timer_interrupt+0x72/0x80
         <EOI>
          printk+0x4d/0x4f
          stop_machine_cpu_stop+0x22c/0x274
          cpu_stopper_thread+0xae/0x162
          smpboot_thread_fn+0x258/0x260
          kthread+0xc7/0xcf
          ret_from_fork+0x7c/0xb0
    
    Signed-off-by: Ben Greear <greearb@candelatech.com>
    Acked-by: Tejun Heo <tj@kernel.org>
    Acked-by: Pekka Riikonen <priikone@iki.fi>
    Cc: Eric Dumazet <eric.dumazet@gmail.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    [xr: Backported to 3.4: Adjust context]
    Signed-off-by: Rui Xiang <rui.xiang@huawei.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 8c9c6ffb188714b7d22261c029ec9fbc065bb5d1
Author: Eric Dumazet <edumazet@google.com>
Date:   Thu Jan 10 15:26:34 2013 -0800

    softirq: reduce latencies
    
    commit c10d73671ad30f54692f7f69f0e09e75d3a8926a upstream.
    
    In various network workloads, __do_softirq() latencies can be up
    to 20 ms if HZ=1000, and 200 ms if HZ=100.
    
    This is because we iterate 10 times in the softirq dispatcher,
    and some actions can consume a lot of cycles.
    
    This patch changes the fallback to ksoftirqd condition to :
    
    - A time limit of 2 ms.
    - need_resched() being set on current task
    
    When one of this condition is met, we wakeup ksoftirqd for further
    softirq processing if we still have pending softirqs.
    
    Using need_resched() as the only condition can trigger RCU stalls,
    as we can keep BH disabled for too long.
    
    I ran several benchmarks and got no significant difference in
    throughput, but a very significant reduction of latencies (one order
    of magnitude) :
    
    In following bench, 200 antagonist "netperf -t TCP_RR" are started in
    background, using all available cpus.
    
    Then we start one "netperf -t TCP_RR", bound to the cpu handling the NIC
    IRQ (hard+soft)
    
    Before patch :
    
    # netperf -H 7.7.7.84 -t TCP_RR -T2,2 -- -k
    RT_LATENCY,MIN_LATENCY,MAX_LATENCY,P50_LATENCY,P90_LATENCY,P99_LATENCY,MEAN_LATENCY,STDDEV_LATENCY
    MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET
    to 7.7.7.84 () port 0 AF_INET : first burst 0 : cpu bind
    RT_LATENCY=550110.424
    MIN_LATENCY=146858
    MAX_LATENCY=997109
    P50_LATENCY=305000
    P90_LATENCY=550000
    P99_LATENCY=710000
    MEAN_LATENCY=376989.12
    STDDEV_LATENCY=184046.92
    
    After patch :
    
    # netperf -H 7.7.7.84 -t TCP_RR -T2,2 -- -k
    RT_LATENCY,MIN_LATENCY,MAX_LATENCY,P50_LATENCY,P90_LATENCY,P99_LATENCY,MEAN_LATENCY,STDDEV_LATENCY
    MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET
    to 7.7.7.84 () port 0 AF_INET : first burst 0 : cpu bind
    RT_LATENCY=40545.492
    MIN_LATENCY=9834
    MAX_LATENCY=78366
    P50_LATENCY=33583
    P90_LATENCY=59000
    P99_LATENCY=69000
    MEAN_LATENCY=38364.67
    STDDEV_LATENCY=12865.26
    
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Cc: David Miller <davem@davemloft.net>
    Cc: Tom Herbert <therbert@google.com>
    Cc: Ben Hutchings <bhutchings@solarflare.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    [xr: Backported to 3.4: Adjust context]
    Signed-off-by: Rui Xiang <rui.xiang@huawei.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit b9909d5051722bf87a05895fd56517419914136e
Author: Feng Tang <feng.tang@intel.com>
Date:   Wed May 30 23:15:41 2012 +0800

    x86/reboot: Fix a warning message triggered by stop_other_cpus()
    
    commit 55c844a4dd16a4d1fdc0cf2a283ec631a02ec448 upstream.
    
    When rebooting our 24 CPU Westmere servers with 3.4-rc6, we
    always see this warning msg:
    
    Restarting system.
    machine restart
    ------------[ cut here ]------------
    WARNING: at arch/x86/kernel/smp.c:125
    native_smp_send_reschedule+0x74/0xa7() Hardware name: X8DTN
    Modules linked in: igb [last unloaded: scsi_wait_scan]
    Pid: 1, comm: systemd-shutdow Not tainted 3.4.0-rc6+ #22
    Call Trace:
     <IRQ>  [<ffffffff8102a41f>] warn_slowpath_common+0x7e/0x96
     [<ffffffff8102a44c>] warn_slowpath_null+0x15/0x17
     [<ffffffff81018cf7>] native_smp_send_reschedule+0x74/0xa7
     [<ffffffff810561c1>] trigger_load_balance+0x279/0x2a6
     [<ffffffff81050112>] scheduler_tick+0xe0/0xe9
     [<ffffffff81036768>] update_process_times+0x60/0x70
     [<ffffffff81062f2f>] tick_sched_timer+0x68/0x92
     [<ffffffff81046e33>] __run_hrtimer+0xb3/0x13c
     [<ffffffff81062ec7>] ? tick_nohz_handler+0xd0/0xd0
     [<ffffffff810474f2>] hrtimer_interrupt+0xdb/0x198
     [<ffffffff81019a35>] smp_apic_timer_interrupt+0x81/0x94
     [<ffffffff81655187>] apic_timer_interrupt+0x67/0x70
     <EOI>  [<ffffffff8101a3c4>] ? default_send_IPI_mask_allbutself_phys+0xb4/0xc4
     [<ffffffff8101c680>] physflat_send_IPI_allbutself+0x12/0x14
     [<ffffffff81018db4>] native_nmi_stop_other_cpus+0x8a/0xd6
     [<ffffffff810188ba>] native_machine_shutdown+0x50/0x67
     [<ffffffff81018926>] machine_shutdown+0xa/0xc
     [<ffffffff8101897e>] native_machine_restart+0x20/0x32
     [<ffffffff810189b0>] machine_restart+0xa/0xc
     [<ffffffff8103b196>] kernel_restart+0x47/0x4c
     [<ffffffff8103b2e6>] sys_reboot+0x13e/0x17c
     [<ffffffff8164e436>] ? _raw_spin_unlock_bh+0x10/0x12
     [<ffffffff810fcac9>] ? bdi_queue_work+0xcf/0xd8
     [<ffffffff810fe82f>] ? __bdi_start_writeback+0xae/0xb7
     [<ffffffff810e0d64>] ? iterate_supers+0xa3/0xb7
     [<ffffffff816547a2>] system_call_fastpath+0x16/0x1b
    ---[ end trace 320af5cb1cb60c5b ]---
    
    The root cause seems to be the
    default_send_IPI_mask_allbutself_phys() takes quite some time (I
    measured it could be several ms) to complete sending NMIs to all
    the other 23 CPUs, and for HZ=250/1000 system, the time is long
    enough for a timer interrupt to happen, which will in turn
    trigger to kick load balance to a stopped CPU and cause this
    warning in native_smp_send_reschedule().
    
    So disabling the local irq before stop_other_cpu() can fix this
    problem (tested 25 times reboot ok), and it is fine as there
    should be nobody caring the timer interrupt in such reboot
    stage.
    
    The latest 3.4 kernel slightly changes this behavior by sending
    REBOOT_VECTOR first and only send NMI_VECTOR if the REBOOT_VCTOR
    fails, and this patch is still needed to prevent the problem.
    
    Signed-off-by: Feng Tang <feng.tang@intel.com>
    Acked-by: Don Zickus <dzickus@redhat.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Link: http://lkml.kernel.org/r/20120530231541.4c13433a@feng-i7
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Cc: Vinson Lee <vlee@twopensource.com>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 3f371d05625f60061f94723f9126617439e6376e
Author: Dmitry M. Fedin <dmitry.fedin@gmail.com>
Date:   Thu Apr 9 17:37:03 2015 +0300

    ALSA: usb - Creative USB X-Fi Pro SB1095 volume knob support
    
    commit 3dc8523fa7412e731441c01fb33f003eb3cfece1 upstream.
    
    Adds an entry for Creative USB X-Fi to the rc_config array in
    mixer_quirks.c to allow use of volume knob on the device.
    Adds support for newer X-Fi Pro card, known as "Model No. SB1095"
    with USB ID "041e:3237"
    
    Signed-off-by: Dmitry M. Fedin <dmitry.fedin@gmail.com>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit dfd04b4f2744170085f2dfcc66b7888fb130e0cc
Author: Al Viro <viro@zeniv.linux.org.uk>
Date:   Wed Apr 8 17:00:32 2015 -0400

    ocfs2: _really_ sync the right range
    
    commit 64b4e2526d1cf6e6a4db6213d6e2b6e6ab59479a upstream.
    
    "ocfs2 syncs the wrong range" had been broken; prior to it the
    code was doing the wrong thing in case of O_APPEND, all right,
    but _after_ it we were syncing the wrong range in 100% cases.
    *ppos, aka iocb->ki_pos is incremented prior to that point,
    so we are always doing sync on the area _after_ the one we'd
    written to.
    
    Spotted by Joseph Qi <joseph.qi@huawei.com> back in January;
    unfortunately, I'd missed his mail back then ;-/
    
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 419d4c989459c5fa2d3fa42c061c097e53dcaf19
Author: Bart Van Assche <bart.vanassche@sandisk.com>
Date:   Wed Mar 4 10:31:47 2015 +0100

    Defer processing of REQ_PREEMPT requests for blocked devices
    
    commit bba0bdd7ad4713d82338bcd9b72d57e9335a664b upstream.
    
    SCSI transport drivers and SCSI LLDs block a SCSI device if the
    transport layer is not operational. This means that in this state
    no requests should be processed, even if the REQ_PREEMPT flag has
    been set. This patch avoids that a rescan shortly after a cable
    pull sporadically triggers the following kernel oops:
    
    BUG: unable to handle kernel paging request at ffffc9001a6bc084
    IP: [<ffffffffa04e08f2>] mlx4_ib_post_send+0xd2/0xb30 [mlx4_ib]
    Process rescan-scsi-bus (pid: 9241, threadinfo ffff88053484a000, task ffff880534aae100)
    Call Trace:
     [<ffffffffa0718135>] srp_post_send+0x65/0x70 [ib_srp]
     [<ffffffffa071b9df>] srp_queuecommand+0x1cf/0x3e0 [ib_srp]
     [<ffffffffa0001ff1>] scsi_dispatch_cmd+0x101/0x280 [scsi_mod]
     [<ffffffffa0009ad1>] scsi_request_fn+0x411/0x4d0 [scsi_mod]
     [<ffffffff81223b37>] __blk_run_queue+0x27/0x30
     [<ffffffff8122a8d2>] blk_execute_rq_nowait+0x82/0x110
     [<ffffffff8122a9c2>] blk_execute_rq+0x62/0xf0
     [<ffffffffa000b0e8>] scsi_execute+0xe8/0x190 [scsi_mod]
     [<ffffffffa000b2f3>] scsi_execute_req+0xa3/0x130 [scsi_mod]
     [<ffffffffa000c1aa>] scsi_probe_lun+0x17a/0x450 [scsi_mod]
     [<ffffffffa000ce86>] scsi_probe_and_add_lun+0x156/0x480 [scsi_mod]
     [<ffffffffa000dc2f>] __scsi_scan_target+0xdf/0x1f0 [scsi_mod]
     [<ffffffffa000dfa3>] scsi_scan_host_selected+0x183/0x1c0 [scsi_mod]
     [<ffffffffa000edfb>] scsi_scan+0xdb/0xe0 [scsi_mod]
     [<ffffffffa000ee13>] store_scan+0x13/0x20 [scsi_mod]
     [<ffffffff811c8d9b>] sysfs_write_file+0xcb/0x160
     [<ffffffff811589de>] vfs_write+0xce/0x140
     [<ffffffff81158b53>] sys_write+0x53/0xa0
     [<ffffffff81464592>] system_call_fastpath+0x16/0x1b
     [<00007f611c9d9300>] 0x7f611c9d92ff
    
    Reported-by: Max Gurtuvoy <maxg@mellanox.com>
    Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
    Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
    Signed-off-by: James Bottomley <JBottomley@Odin.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 9796d87a38b95a9550f6a22d933f7354ab966748
Author: John Soni Jose <sony.john-n@emulex.com>
Date:   Thu Feb 12 06:45:47 2015 +0530

    be2iscsi: Fix kernel panic when device initialization fails
    
    commit 2e7cee027b26cbe7e6685a7a14bd2850bfe55d33 upstream.
    
    Kernel panic was happening as iscsi_host_remove() was called on
    a host which was not yet added.
    
    Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
    Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
    Signed-off-by: James Bottomley <JBottomley@Odin.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit ffaa96c795bea7ae75e8b76cbd2cc57a5df32808
Author: Shachar Raindel <raindel@mellanox.com>
Date:   Wed Mar 18 17:39:08 2015 +0000

    IB/uverbs: Prevent integer overflow in ib_umem_get address arithmetic
    
    commit 8494057ab5e40df590ef6ef7d66324d3ae33356b upstream.
    
    Properly verify that the resulting page aligned end address is larger
    than both the start address and the length of the memory area requested.
    
    Both the start and length arguments for ib_umem_get are controlled by
    the user. A misbehaving user can provide values which will cause an
    integer overflow when calculating the page aligned end address.
    
    This overflow can cause also miscalculation of the number of pages
    mapped, and additional logic issues.
    
    Addresses: CVE-2014-8159
    Signed-off-by: Shachar Raindel <raindel@mellanox.com>
    Signed-off-by: Jack Morgenstein <jackm@mellanox.com>
    Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit ffabd89ce6ef3b0f3d4e05375f00f81dd66b2d83
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Wed Apr 1 14:20:42 2015 +0200

    mac80211: fix RX A-MPDU session reorder timer deletion
    
    commit 788211d81bfdf9b6a547d0530f206ba6ee76b107 upstream.
    
    There's an issue with the way the RX A-MPDU reorder timer is
    deleted that can cause a kernel crash like this:
    
     * tid_rx is removed - call_rcu(ieee80211_free_tid_rx)
     * station is destroyed
     * reorder timer fires before ieee80211_free_tid_rx() runs,
       accessing the station, thus potentially crashing due to
       the use-after-free
    
    The station deletion is protected by synchronize_net(), but
    that isn't enough -- ieee80211_free_tid_rx() need not have
    run when that returns (it deletes the timer.) We could use
    rcu_barrier() instead of synchronize_net(), but that's much
    more expensive.
    
    Instead, to fix this, add a field tracking that the session
    is being deleted. In this case, the only re-arming of the
    timer happens with the reorder spinlock held, so make that
    code not rearm it if the session is being deleted and also
    delete the timer after setting that field. This ensures the
    timer cannot fire after ___ieee80211_stop_rx_ba_session()
    returns, which fixes the problem.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 8b2ec3c0b62aed195979a26b1e3eecb53c66c34c
Author: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Date:   Mon Mar 30 22:44:27 2015 +0200

    x86/reboot: Add ASRock Q1900DC-ITX mainboard reboot quirk
    
    commit 80313b3078fcd2ca51970880d90757f05879a193 upstream.
    
    The ASRock Q1900DC-ITX mainboard (Baytrail-D) hangs randomly in
    both BIOS and UEFI mode while rebooting unless reboot=pci is
    used. Add a quirk to reboot via the pci method.
    
    The problem is very intermittent and hard to debug, it might succeed
    rebooting just fine 40 times in a row - but fails half a dozen times
    the next day. It seems to be slightly less common in BIOS CSM mode
    than native UEFI (with the CSM disabled), but it does happen in either
    mode. Since I've started testing this patch in late january, rebooting
    has been 100% reliable.
    
    Most of the time it already hangs during POST, but occasionally it
    might even make it through the bootloader and the kernel might even
    start booting, but then hangs before the mode switch. The same symptoms
    occur with grub-efi, gummiboot and grub-pc, just as well as (at least)
    kernel 3.16-3.19 and 4.0-rc6 (I haven't tried older kernels than 3.16).
    Upgrading to the most current mainboard firmware of the ASRock
    Q1900DC-ITX, version 1.20, does not improve the situation.
    
    ( Searching the web seems to suggest that other Bay Trail-D mainboards
      might be affected as well. )
    --
    Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
    Cc: Matt Fleming <matt.fleming@intel.com>
    Link: http://lkml.kernel.org/r/20150330224427.0fb58e42@mir
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 89d95707daf87321ba95372e4cabcfffb50cf4e4
Author: David Miller <davem@davemloft.net>
Date:   Wed Mar 18 23:18:40 2015 -0400

    radeon: Do not directly dereference pointers to BIOS area.
    
    commit f2c9e560b406f2f6b14b345c7da33467dee9cdf2 upstream.
    
    Use readb() and memcpy_fromio() accessors instead.
    
    Reviewed-by: Christian König <christian.koenig@amd.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 6ada5dde688154c93178ba118d113be84e7df433
Author: Doug Goldstein <cardoe@cardoe.com>
Date:   Mon Mar 23 20:34:48 2015 -0500

    USB: ftdi_sio: Use jtag quirk for SNAP Connect E10
    
    commit b229a0f840f774d29d8fedbf5deb344ca36b7f1a upstream.
    
    This patch uses the existing CALAO Systems ftdi_8u2232c_probe in order
    to avoid attaching a TTY to the JTAG port as this board is based on the
    CALAO Systems reference design and needs the same fix up.
    
    Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
    [johan: clean up probe logic ]
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit f10c969c1fd328323f45ac953c992b756b25f31b
Author: WANG Cong <xiyou.wangcong@gmail.com>
Date:   Mon Mar 23 16:31:09 2015 -0700

    net: use for_each_netdev_safe() in rtnl_group_changelink()
    
    commit d079535d5e1bf5e2e7c856bae2483414ea21e137 upstream.
    
    In case we move the whole dev group to another netns,
    we should call for_each_netdev_safe(), otherwise we get
    a soft lockup:
    
     NMI watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [ip:798]
     irq event stamp: 255424
     hardirqs last  enabled at (255423): [<ffffffff81a2aa95>] restore_args+0x0/0x30
     hardirqs last disabled at (255424): [<ffffffff81a2ad5a>] apic_timer_interrupt+0x6a/0x80
     softirqs last  enabled at (255422): [<ffffffff81079ebc>] __do_softirq+0x2c1/0x3a9
     softirqs last disabled at (255417): [<ffffffff8107a190>] irq_exit+0x41/0x95
     CPU: 0 PID: 798 Comm: ip Not tainted 4.0.0-rc4+ #881
     Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
     task: ffff8800d1b88000 ti: ffff880119530000 task.ti: ffff880119530000
     RIP: 0010:[<ffffffff810cad11>]  [<ffffffff810cad11>] debug_lockdep_rcu_enabled+0x28/0x30
     RSP: 0018:ffff880119533778  EFLAGS: 00000246
     RAX: ffff8800d1b88000 RBX: 0000000000000002 RCX: 0000000000000038
     RDX: 0000000000000000 RSI: ffff8800d1b888c8 RDI: ffff8800d1b888c8
     RBP: ffff880119533778 R08: 0000000000000000 R09: 0000000000000000
     R10: 0000000000000000 R11: 000000000000b5c2 R12: 0000000000000246
     R13: ffff880119533708 R14: 00000000001d5a40 R15: ffff88011a7d5a40
     FS:  00007fc01315f740(0000) GS:ffff88011a600000(0000) knlGS:0000000000000000
     CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
     CR2: 00007f367a120988 CR3: 000000011849c000 CR4: 00000000000007f0
     Stack:
      ffff880119533798 ffffffff811ac868 ffffffff811ac831 ffffffff811ac828
      ffff8801195337c8 ffffffff811ac8c9 ffff8801195339b0 ffff8801197633e0
      0000000000000000 ffff8801195339b0 ffff8801195337d8 ffffffff811ad2d7
     Call Trace:
      [<ffffffff811ac868>] rcu_read_lock+0x37/0x6e
      [<ffffffff811ac831>] ? rcu_read_unlock+0x5f/0x5f
      [<ffffffff811ac828>] ? rcu_read_unlock+0x56/0x5f
      [<ffffffff811ac8c9>] __fget+0x2a/0x7a
      [<ffffffff811ad2d7>] fget+0x13/0x15
      [<ffffffff811be732>] proc_ns_fget+0xe/0x38
      [<ffffffff817c7714>] get_net_ns_by_fd+0x11/0x59
      [<ffffffff817df359>] rtnl_link_get_net+0x33/0x3e
      [<ffffffff817df3d7>] do_setlink+0x73/0x87b
      [<ffffffff810b28ce>] ? trace_hardirqs_off+0xd/0xf
      [<ffffffff81a2aa95>] ? retint_restore_args+0xe/0xe
      [<ffffffff817e0301>] rtnl_newlink+0x40c/0x699
      [<ffffffff817dffe0>] ? rtnl_newlink+0xeb/0x699
      [<ffffffff81a29246>] ? _raw_spin_unlock+0x28/0x33
      [<ffffffff8143ed1e>] ? security_capable+0x18/0x1a
      [<ffffffff8107da51>] ? ns_capable+0x4d/0x65
      [<ffffffff817de5ce>] rtnetlink_rcv_msg+0x181/0x194
      [<ffffffff817de407>] ? rtnl_lock+0x17/0x19
      [<ffffffff817de407>] ? rtnl_lock+0x17/0x19
      [<ffffffff817de44d>] ? __rtnl_unlock+0x17/0x17
      [<ffffffff818327c6>] netlink_rcv_skb+0x4d/0x93
      [<ffffffff817de42f>] rtnetlink_rcv+0x26/0x2d
      [<ffffffff81830f18>] netlink_unicast+0xcb/0x150
      [<ffffffff8183198e>] netlink_sendmsg+0x501/0x523
      [<ffffffff8115cba9>] ? might_fault+0x59/0xa9
      [<ffffffff817b5398>] ? copy_from_user+0x2a/0x2c
      [<ffffffff817b7b74>] sock_sendmsg+0x34/0x3c
      [<ffffffff817b7f6d>] ___sys_sendmsg+0x1b8/0x255
      [<ffffffff8115c5eb>] ? handle_pte_fault+0xbd5/0xd4a
      [<ffffffff8100a2b0>] ? native_sched_clock+0x35/0x37
      [<ffffffff8109e94b>] ? sched_clock_local+0x12/0x72
      [<ffffffff8109eb9c>] ? sched_clock_cpu+0x9e/0xb7
      [<ffffffff810cadbf>] ? rcu_read_lock_held+0x3b/0x3d
      [<ffffffff811ac1d8>] ? __fcheck_files+0x4c/0x58
      [<ffffffff811ac946>] ? __fget_light+0x2d/0x52
      [<ffffffff817b8adc>] __sys_sendmsg+0x42/0x60
      [<ffffffff817b8b0c>] SyS_sendmsg+0x12/0x1c
      [<ffffffff81a29e32>] system_call_fastpath+0x12/0x17
    
    Fixes: e7ed828f10bd8 ("netlink: support setting devgroup parameters")
    Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 549c56016e551b058d9d237932266a083ee2b0f4
Author: Lu Baolu <baolu.lu@linux.intel.com>
Date:   Mon Mar 23 18:27:42 2015 +0200

    usb: xhci: apply XHCI_AVOID_BEI quirk to all Intel xHCI controllers
    
    commit 227a4fd801c8a9fa2c4700ab98ec1aec06e3b44d upstream.
    
    When a device with an isochronous endpoint is plugged into the Intel
    xHCI host controller, and the driver submits multiple frames per URB,
    the xHCI driver will set the Block Event Interrupt (BEI) flag on all
    but the last TD for the URB. This causes the host controller to place
    an event on the event ring, but not send an interrupt. When the last
    TD for the URB completes, BEI is cleared, and we get an interrupt for
    the whole URB.
    
    However, under Intel xHCI host controllers, if the event ring is full
    of events from transfers with BEI set,  an "Event Ring is Full" event
    will be posted to the last entry of the event ring,  but no interrupt
    is generated. Host will cease all transfer and command executions and
    wait until software completes handling the pending events in the event
    ring.  That means xHC stops, but event of "event ring is full" is not
    notified. As the result, the xHC looks like dead to user.
    
    This patch is to apply XHCI_AVOID_BEI quirk to Intel xHC devices. And
    it should be backported to kernels as old as 3.0, that contains the
    commit 69e848c2090a ("Intel xhci: Support EHCI/xHCI port switching.").
    
    Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
    Tested-by: Alistair Grant <akgrant0710@gmail.com>
    Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 59500793b310bdbc5676e4114f7b294f7d57d92f
Author: Lu Baolu <baolu.lu@linux.intel.com>
Date:   Mon Mar 23 18:27:41 2015 +0200

    usb: xhci: handle Config Error Change (CEC) in xhci driver
    
    commit 9425183d177aa4a2f09d01a74925124f0778b595 upstream.
    
    Linux xHCI driver doesn't report and handle port cofig error change.
    If Port Configure Error for root hub port occurs, CEC bit in PORTSC
    would be set by xHC and remains 1. This happends when the root port
    fails to configure its link partner, e.g. the port fails to exchange
    port capabilities information using Port Capability LMPs.
    
    Then the Port Status Change Events will be blocked until all status
    change bits(CEC is one of the change bits) are cleared('0') (refer to
    xHCI spec 4.19.2). Otherwise, the port status change event for this
    root port will not be generated anymore, then root port would look
    like dead for user and can't be recovered until a Host Controller
    Reset(HCRST).
    
    This patch is to check CEC bit in PORTSC in xhci_get_port_status()
    and set a Config Error in the return status if CEC is set. This will
    cause a ClearPortFeature request, where CEC bit is cleared in
    xhci_clear_port_change_bit().
    
    [The commit log is based on initial Marvell patch posted at
    http://marc.info/?l=linux-kernel&m=142323612321434&w=2]
    
    Reported-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
    Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
    Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    [lizf: Backported to 3.4:
     - adjust indentation
     - s/raw_port_status/temp/]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 266bab33dfb499c8f1219beb36c99525c70f5f52
Author: David Disseldorp <ddiss@suse.de>
Date:   Fri Mar 13 14:20:29 2015 +0100

    cifs: fix use-after-free bug in find_writable_file
    
    commit e1e9bda22d7ddf88515e8fe401887e313922823e upstream.
    
    Under intermittent network outages, find_writable_file() is susceptible
    to the following race condition, which results in a user-after-free in
    the cifs_writepages code-path:
    
    Thread 1                                        Thread 2
    ========                                        ========
    
    inv_file = NULL
    refind = 0
    spin_lock(&cifs_file_list_lock)
    
    // invalidHandle found on openFileList
    
    inv_file = open_file
    // inv_file->count currently 1
    
    cifsFileInfo_get(inv_file)
    // inv_file->count = 2
    
    spin_unlock(&cifs_file_list_lock);
    
    cifs_reopen_file()                            cifs_close()
    // fails (rc != 0)                            ->cifsFileInfo_put()
                                           spin_lock(&cifs_file_list_lock)
                                           // inv_file->count = 1
                                           spin_unlock(&cifs_file_list_lock)
    
    spin_lock(&cifs_file_list_lock);
    list_move_tail(&inv_file->flist,
          &cifs_inode->openFileList);
    spin_unlock(&cifs_file_list_lock);
    
    cifsFileInfo_put(inv_file);
    ->spin_lock(&cifs_file_list_lock)
    
      // inv_file->count = 0
      list_del(&cifs_file->flist);
      // cleanup!!
      kfree(cifs_file);
    
      spin_unlock(&cifs_file_list_lock);
    
    spin_lock(&cifs_file_list_lock);
    ++refind;
    // refind = 1
    goto refind_writable;
    
    At this point we loop back through with an invalid inv_file pointer
    and a refind value of 1. On second pass, inv_file is not overwritten on
    openFileList traversal, and is subsequently dereferenced.
    
    Signed-off-by: David Disseldorp <ddiss@suse.de>
    Reviewed-by: Jeff Layton <jlayton@samba.org>
    Signed-off-by: Steve French <smfrench@gmail.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 9117c3b78c25cf57d6a83e83acd27dfbdfa0bcf7
Author: Doug Goldstein <cardoe@cardoe.com>
Date:   Sun Mar 15 21:56:04 2015 -0500

    USB: ftdi_sio: Added custom PID for Synapse Wireless product
    
    commit 4899c054a90439477b24da8977db8d738376fe90 upstream.
    
    Synapse Wireless uses the FTDI VID with a custom PID of 0x9090 for their
    SNAP Stick 200 product.
    
    Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 4843d6362f68b984a9212a6bf5c41b2c5bd50cf1
Author: Hui Wang <hui.wang@canonical.com>
Date:   Thu Mar 26 17:14:55 2015 +0800

    ALSA: hda - Add one more node in the EAPD supporting candidate list
    
    commit af95b41426e0b58279f8ff0ebe420df49a4e96b8 upstream.
    
    We have a HP machine which use the codec node 0x17 connecting the
    internal speaker, and from the node capability, we saw the EAPD,
    if we don't set the EAPD on for this node, the internal speaker
    can't output any sound.
    
    BugLink: https://bugs.launchpad.net/bugs/1436745
    Signed-off-by: Hui Wang <hui.wang@canonical.com>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 1346295a3f729bb3705405fb69c6f6805aeb574f
Author: Sergei Antonov <saproj@gmail.com>
Date:   Wed Mar 25 15:55:34 2015 -0700

    hfsplus: fix B-tree corruption after insertion at position 0
    
    commit 98cf21c61a7f5419d82f847c4d77bf6e96a76f5f upstream.
    
    Fix B-tree corruption when a new record is inserted at position 0 in the
    node in hfs_brec_insert().  In this case a hfs_brec_update_parent() is
    called to update the parent index node (if exists) and it is passed
    hfs_find_data with a search_key containing a newly inserted key instead
    of the key to be updated.  This results in an inconsistent index node.
    The bug reproduces on my machine after an extents overflow record for
    the catalog file (CNID=4) is inserted into the extents overflow B-tree.
    Because of a low (reserved) value of CNID=4, it has to become the first
    record in the first leaf node.
    
    The resulting first leaf node is correct:
    
      ----------------------------------------------------
      | key0.CNID=4 | key1.CNID=123 | key2.CNID=456, ... |
      ----------------------------------------------------
    
    But the parent index key0 still contains the previous key CNID=123:
    
      -----------------------
      | key0.CNID=123 | ... |
      -----------------------
    
    A change in hfs_brec_insert() makes hfs_brec_update_parent() work
    correctly by preventing it from getting fd->record=-1 value from
    __hfs_brec_find().
    
    Along the way, I removed duplicate code with unification of the if
    condition.  The resulting code is equivalent to the original code
    because node is never 0.
    
    Also hfs_brec_update_parent() will now return an error after getting a
    negative fd->record value.  However, the return value of
    hfs_brec_update_parent() is not checked anywhere in the file and I'm
    leaving it unchanged by this patch.  brec.c lacks error checking after
    some other calls too, but this issue is of less importance than the one
    being fixed by this patch.
    
    Signed-off-by: Sergei Antonov <saproj@gmail.com>
    Cc: Joe Perches <joe@perches.com>
    Reviewed-by: Vyacheslav Dubeyko <slava@dubeyko.com>
    Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
    Cc: Anton Altaparmakov <aia21@cam.ac.uk>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Christoph Hellwig <hch@infradead.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit d4cd899d8665c75ebf36d4b101da5d990662281f
Author: Joe Perches <joe@perches.com>
Date:   Mon Mar 23 18:01:35 2015 -0700

    selinux: fix sel_write_enforce broken return value
    
    commit 6436a123a147db51a0b06024a8350f4c230e73ff upstream.
    
    Return a negative error value like the rest of the entries in this function.
    
    Signed-off-by: Joe Perches <joe@perches.com>
    Acked-by:  Stephen Smalley <sds@tycho.nsa.gov>
    [PM: tweaked subject line]
    Signed-off-by: Paul Moore <pmoore@redhat.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit e65b00aeda29774e3dbf18b47a0adec64469b2ff
Author: Tejun Heo <tj@kernel.org>
Date:   Mon Mar 23 00:18:48 2015 -0400

    writeback: fix possible underflow in write bandwidth calculation
    
    commit c72efb658f7c8b27ca3d0efb5cfd5ded9fcac89e upstream.
    
    From 1ebf33901ecc75d9496862dceb1ef0377980587c Mon Sep 17 00:00:00 2001
    From: Tejun Heo <tj@kernel.org>
    Date: Mon, 23 Mar 2015 00:08:19 -0400
    
    2f800fbd777b ("writeback: fix dirtied pages accounting on redirty")
    introduced account_page_redirty() which reverts stat updates for a
    redirtied page, making BDI_DIRTIED no longer monotonically increasing.
    
    bdi_update_write_bandwidth() uses the delta in BDI_DIRTIED as the
    basis for bandwidth calculation.  While unlikely, since the above
    patch, the newer value may be lower than the recorded past value and
    underflow the bandwidth calculation leading to a wild result.
    
    Fix it by subtracing min of the old and new values when calculating
    delta.  AFAIK, there hasn't been any report of it happening but the
    resulting erratic behavior would be non-critical and temporary, so
    it's possible that the issue is happening without being reported.  The
    risk of the fix is very low, so tagged for -stable.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Jens Axboe <axboe@kernel.dk>
    Cc: Jan Kara <jack@suse.cz>
    Cc: Wu Fengguang <fengguang.wu@intel.com>
    Cc: Greg Thelen <gthelen@google.com>
    Fixes: 2f800fbd777b ("writeback: fix dirtied pages accounting on redirty")
    Signed-off-by: Jens Axboe <axboe@fb.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 36cddaebe771b9476da10b724da435d5130bb0aa
Author: Brian Silverman <brian@peloton-tech.com>
Date:   Wed Feb 18 16:23:56 2015 -0800

    sched: Fix RLIMIT_RTTIME when PI-boosting to RT
    
    commit 746db9443ea57fd9c059f62c4bfbf41cf224fe13 upstream.
    
    When non-realtime tasks get priority-inheritance boosted to a realtime
    scheduling class, RLIMIT_RTTIME starts to apply to them. However, the
    counter used for checking this (the same one used for SCHED_RR
    timeslices) was not getting reset. This meant that tasks running with a
    non-realtime scheduling class which are repeatedly boosted to a realtime
    one, but never block while they are running realtime, eventually hit the
    timeout without ever running for a time over the limit. This patch
    resets the realtime timeslice counter when un-PI-boosting from an RT to
    a non-RT scheduling class.
    
    I have some test code with two threads and a shared PTHREAD_PRIO_INHERIT
    mutex which induces priority boosting and spins while boosted that gets
    killed by a SIGXCPU on non-fixed kernels but doesn't with this patch
    applied. It happens much faster with a CONFIG_PREEMPT_RT kernel, and
    does happen eventually with PREEMPT_VOLUNTARY kernels.
    
    Signed-off-by: Brian Silverman <brian@peloton-tech.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Cc: austin@peloton-tech.com
    Link: http://lkml.kernel.org/r/1424305436-6716-1-git-send-email-brian@peloton-tech.com
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    [lizf: Backported to 3.4: adjust contest]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 7afc45bbf2c761175211a41feb5766a56c2f189a
Author: Peter Zijlstra <peterz@infradead.org>
Date:   Thu Feb 19 18:03:11 2015 +0100

    perf: Fix irq_work 'tail' recursion
    
    commit d525211f9d1be8b523ec7633f080f2116f5ea536 upstream.
    
    Vince reported a watchdog lockup like:
    
    	[<ffffffff8115e114>] perf_tp_event+0xc4/0x210
    	[<ffffffff810b4f8a>] perf_trace_lock+0x12a/0x160
    	[<ffffffff810b7f10>] lock_release+0x130/0x260
    	[<ffffffff816c7474>] _raw_spin_unlock_irqrestore+0x24/0x40
    	[<ffffffff8107bb4d>] do_send_sig_info+0x5d/0x80
    	[<ffffffff811f69df>] send_sigio_to_task+0x12f/0x1a0
    	[<ffffffff811f71ce>] send_sigio+0xae/0x100
    	[<ffffffff811f72b7>] kill_fasync+0x97/0xf0
    	[<ffffffff8115d0b4>] perf_event_wakeup+0xd4/0xf0
    	[<ffffffff8115d103>] perf_pending_event+0x33/0x60
    	[<ffffffff8114e3fc>] irq_work_run_list+0x4c/0x80
    	[<ffffffff8114e448>] irq_work_run+0x18/0x40
    	[<ffffffff810196af>] smp_trace_irq_work_interrupt+0x3f/0xc0
    	[<ffffffff816c99bd>] trace_irq_work_interrupt+0x6d/0x80
    
    Which is caused by an irq_work generating new irq_work and therefore
    not allowing forward progress.
    
    This happens because processing the perf irq_work triggers another
    perf event (tracepoint stuff) which in turn generates an irq_work ad
    infinitum.
    
    Avoid this by raising the recursion counter in the irq_work -- which
    effectively disables all software events (including tracepoints) from
    actually triggering again.
    
    Reported-by: Vince Weaver <vincent.weaver@maine.edu>
    Tested-by: Vince Weaver <vincent.weaver@maine.edu>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Link: http://lkml.kernel.org/r/20150219170311.GH21418@twins.programming.kicks-ass.net
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit e5b3d85e53f72d0b18908a05b7366aaea3f893f5
Author: Markos Chandras <markos.chandras@imgtec.com>
Date:   Thu Mar 19 10:28:14 2015 +0000

    net: ethernet: pcnet32: Setup the SRAM and NOUFLO on Am79C97{3, 5}
    
    commit 87f966d97b89774162df04d2106c6350c8fe4cb3 upstream.
    
    On a MIPS Malta board, tons of fifo underflow errors have been observed
    when using u-boot as bootloader instead of YAMON. The reason for that
    is that YAMON used to set the pcnet device to SRAM mode but u-boot does
    not. As a result, the default Tx threshold (64 bytes) is now too small to
    keep the fifo relatively used and it can result to Tx fifo underflow errors.
    As a result of which, it's best to setup the SRAM on supported controllers
    so we can always use the NOUFLO bit.
    
    Cc: <netdev@vger.kernel.org>
    Cc: <linux-kernel@vger.kernel.org>
    Cc: Don Fry <pcnet32@frontier.com>
    Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 9a02d7b6071cbe9d3b3e65127852c97c72a7ee72
Author: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Date:   Tue Jan 27 18:08:22 2015 +0530

    nbd: fix possible memory leak
    
    commit ff6b8090e26ef7649ef0cc6b42389141ef48b0cf upstream.
    
    we have already allocated memory for nbd_dev, but we were not
    releasing that memory and just returning the error value.
    
    Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
    Acked-by: Paul Clements <Paul.Clements@SteelEye.com>
    Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 7c91ee727ecb2219cf6fbdd67d9109f4e6047f42
Author: Tejun Heo <tj@kernel.org>
Date:   Wed Mar 4 10:37:43 2015 -0500

    writeback: add missing INITIAL_JIFFIES init in global_update_bandwidth()
    
    commit 7d70e15480c0450d2bfafaad338a32e884fc215e upstream.
    
    global_update_bandwidth() uses static variable update_time as the
    timestamp for the last update but forgets to initialize it to
    INITIALIZE_JIFFIES.
    
    This means that global_dirty_limit will be 5 mins into the future on
    32bit and some large amount jiffies into the past on 64bit.  This
    isn't critical as the only effect is that global_dirty_limit won't be
    updated for the first 5 mins after booting on 32bit machines,
    especially given the auxiliary nature of global_dirty_limit's role -
    protecting against global dirty threshold's sudden dips; however, it
    does lead to unintended suboptimal behavior.  Fix it.
    
    Fixes: c42843f2f0bb ("writeback: introduce smoothed global dirty limit")
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Acked-by: Jan Kara <jack@suse.cz>
    Cc: Wu Fengguang <fengguang.wu@intel.com>
    Cc: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 444edcfc0bd195209594087dbe78a5dc8ef962b0
Author: Nicholas Bellinger <nab@linux-iscsi.org>
Date:   Fri Feb 27 03:54:13 2015 -0800

    target/pscsi: Fix NULL pointer dereference in get_device_type
    
    commit 215a8fe4198f607f34ecdbc9969dae783d8b5a61 upstream.
    
    This patch fixes a NULL pointer dereference OOPs with pSCSI backends
    within target_core_stat.c code.  The bug is caused by a configfs attr
    read if no pscsi_dev_virt->pdv_sd has been configured.
    
    Reported-by: Olaf Hering <olaf@aepfle.de>
    Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit cac6fdb55e69d678a38cfdcb89412bcb66e4a665
Author: Dan Carpenter <dan.carpenter@oracle.com>
Date:   Wed Feb 25 16:21:03 2015 +0300

    tcm_fc: missing curly braces in ft_invl_hw_context()
    
    commit d556546e7ecd9fca199df4698943024d40044f8e upstream.
    
    This patch adds a missing set of conditional check braces in
    ft_invl_hw_context() originally introduced by commit dcd998ccd
    when handling DDP failures in ft_recv_write_data() code.
    
     commit dcd998ccdbf74a7d8fe0f0a44e85da1ed5975946
     Author: Kiran Patil <kiran.patil@intel.com>
     Date:   Wed Aug 3 09:20:01 2011 +0000
    
        tcm_fc: Handle DDP/SW fc_frame_payload_get failures in ft_recv_write_data
    
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Cc: Kiran Patil <kiran.patil@intel.com>
    Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit f878cbf4ab7d50bda468ad70802431b010449550
Author: Majd Dibbiny <majd@mellanox.com>
Date:   Wed Mar 18 16:51:37 2015 +0200

    IB/mlx4: Saturate RoCE port PMA counters in case of overflow
    
    commit 61a3855bb726cbb062ef02a31a832dea455456e0 upstream.
    
    For RoCE ports, we set the u32 PMA values based on u64 HCA counters. In case of
    overflow, according to the IB spec, we have to saturate a counter to its
    max value, do that.
    
    Fixes: c37791349cc7 ('IB/mlx4: Support PMA counters for IBoE')
    Signed-off-by: Majd Dibbiny <majd@mellanox.com>
    Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
    Signed-off-by: Hadar Hen Zion <hadarh@mellanox.com>
    Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    [lizf: Backported to 3.4:
     - adjust context
     - open-code U32_MAX]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 10b5044ed46fcc002fec8e9f11c45f1edd2a75ae
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Thu Mar 12 08:53:27 2015 +0200

    nl80211: ignore HT/VHT capabilities without QoS/WMM
    
    commit 496fcc294daab18799e190c0264863d653588d1f upstream.
    
    As HT/VHT depend heavily on QoS/WMM, it's not a good idea to
    let userspace add clients that have HT/VHT but not QoS/WMM.
    Since it does so in certain cases we've observed (client is
    using HT IEs but not QoS/WMM) just ignore the HT/VHT info at
    this point and don't pass it down to the drivers which might
    unconditionally use it.
    
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    [lizf: Backported to 3.4:
     - adjust context
     - 3.4 doesn't support VHT]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit c87f72368ab73d50e88f6ef8b686a0f47d1398fe
Author: Stephan Mueller <smueller@chronox.de>
Date:   Thu Mar 12 09:17:51 2015 +0100

    crypto: aesni - fix memory usage in GCM decryption
    
    commit ccfe8c3f7e52ae83155cb038753f4c75b774ca8a upstream.
    
    The kernel crypto API logic requires the caller to provide the
    length of (ciphertext || authentication tag) as cryptlen for the
    AEAD decryption operation. Thus, the cipher implementation must
    calculate the size of the plaintext output itself and cannot simply use
    cryptlen.
    
    The RFC4106 GCM decryption operation tries to overwrite cryptlen memory
    in req->dst. As the destination buffer for decryption only needs to hold
    the plaintext memory but cryptlen references the input buffer holding
    (ciphertext || authentication tag), the assumption of the destination
    buffer length in RFC4106 GCM operation leads to a too large size. This
    patch simply uses the already calculated plaintext size.
    
    In addition, this patch fixes the offset calculation of the AAD buffer
    pointer: as mentioned before, cryptlen already includes the size of the
    tag. Thus, the tag does not need to be added. With the addition, the AAD
    will be written beyond the already allocated buffer.
    
    Note, this fixes a kernel crash that can be triggered from user space
    via AF_ALG(aead) -- simply use the libkcapi test application
    from [1] and update it to use rfc4106-gcm-aes.
    
    Using [1], the changes were tested using CAVS vectors to demonstrate
    that the crypto operation still delivers the right results.
    
    [1] http://www.chronox.de/libkcapi.html
    
    CC: Tadeusz Struk <tadeusz.struk@intel.com>
    Signed-off-by: Stephan Mueller <smueller@chronox.de>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit dc9279f09aa1a066bc662290c20549a700b32fa8
Author: Takashi Iwai <tiwai@suse.de>
Date:   Tue Mar 10 12:39:14 2015 +0100

    ASoC: wm8960: Fix wrong value references for boolean kctl
    
    commit b4a18c8b1af15ebfa9054a3d2aef7b0a7e6f2a05 upstream.
    
    The correct values referred by a boolean control are
    value.integer.value[], not value.enumerated.item[].
    The former is long while the latter is int, so it's even incompatible
    on 64bit architectures.
    
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 681b80cfefe4bdf81418bef0d232f6fef7125e25
Author: Takashi Iwai <tiwai@suse.de>
Date:   Tue Mar 10 12:39:13 2015 +0100

    ASoC: wm8955: Fix wrong value references for boolean kctl
    
    commit 07892b10356f17717abdc578acbef72db86c880e upstream.
    
    The correct values referred by a boolean control are
    value.integer.value[], not value.enumerated.item[].
    The former is long while the latter is int, so it's even incompatible
    on 64bit architectures.
    
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit e23ae32c0b757940ea7c8b5c83052b2ebec4c22a
Author: Takashi Iwai <tiwai@suse.de>
Date:   Tue Mar 10 12:39:12 2015 +0100

    ASoC: wm8904: Fix wrong value references for boolean kctl
    
    commit eaddf6fd959074f6a6e71deffe079c71eef35da6 upstream.
    
    The correct values referred by a boolean control are
    value.integer.value[], not value.enumerated.item[].
    The former is long while the latter is int, so it's even incompatible
    on 64bit architectures.
    
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 649ca93edf429f7b9dfef059dc3f6836f22f81d9
Author: Takashi Iwai <tiwai@suse.de>
Date:   Tue Mar 10 12:39:11 2015 +0100

    ASoC: wm8903: Fix wrong value references for boolean kctl
    
    commit 24cc883c1fd16df34211ae41624aa6d3cd906693 upstream.
    
    The correct values referred by a boolean control are
    value.integer.value[], not value.enumerated.item[].
    The former is long while the latter is int, so it's even incompatible
    on 64bit architectures.
    
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 41b86a1960a09af7e4808c13e57701e7b4720b5b
Author: Takashi Iwai <tiwai@suse.de>
Date:   Tue Mar 10 12:39:10 2015 +0100

    ASoC: wm8731: Fix wrong value references for boolean kctl
    
    commit bd14016fbf31aa199026f1e2358eab695f374eb1 upstream.
    
    The correct values referred by a boolean control are
    value.integer.value[], not value.enumerated.item[].
    The former is long while the latter is int, so it's even incompatible
    on 64bit architectures.
    
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 4285caa07eb6429662af0ccdcc10c7df80b5872b
Author: Takashi Iwai <tiwai@suse.de>
Date:   Tue Mar 10 12:39:09 2015 +0100

    ASoC: wm2000: Fix wrong value references for boolean kctl
    
    commit 00a14c2968e3d55817e0fa35c78106ca840537bf upstream.
    
    The correct values referred by a boolean control are
    value.integer.value[], not value.enumerated.item[].
    The former is long while the latter is int, so it's even incompatible
    on 64bit architectures.
    
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 8f1b8242742f192e71243c8eb34a86be442fcf42
Author: Takashi Iwai <tiwai@suse.de>
Date:   Tue Mar 10 12:39:05 2015 +0100

    ASoC: cs4271: Fix wrong value references for boolean kctl
    
    commit e8371aa0fecb73fb8a4b2e0296b025b11e7d6229 upstream.
    
    The correct values referred by a boolean control are
    value.integer.value[], not value.enumerated.item[].
    The former is long while the latter is int, so it's even incompatible
    on 64bit architectures.
    
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit f32ffd06be2018ec75702c22611d249decaecf8e
Author: Takashi Iwai <tiwai@suse.de>
Date:   Tue Mar 10 12:39:04 2015 +0100

    ASoC: ak4641: Fix wrong value references for boolean kctl
    
    commit 08641d9b7bf915144a57a736b42642e13eb1167f upstream.
    
    The correct values referred by a boolean control are
    value.integer.value[], not value.enumerated.item[].
    The former is long while the latter is int, so it's even incompatible
    on 64bit architectures.
    
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 7b3ed23dd24039c08634dd6a10bbc1e0eafa2a6d
Author: Takashi Iwai <tiwai@suse.de>
Date:   Tue Mar 10 12:39:03 2015 +0100

    ASoC: adav80x: Fix wrong value references for boolean kctl
    
    commit 2bf4c1d483d911cda5dd385527194d23e5cea73d upstream.
    
    The correct values referred by a boolean control are
    value.integer.value[], not value.enumerated.item[].
    The former is long while the latter is int, so it's even incompatible
    on 64bit architectures.
    
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Acked-by: Lars-Peter Clausen <lars@metafoo.de>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit f424765a01e1a0b6d4000c6917506f7f6a0ea63c
Author: Andy Lutomirski <luto@amacapital.net>
Date:   Mon Mar 9 17:42:31 2015 -0700

    x86/asm/entry/32: Fix user_mode() misuses
    
    commit 394838c96013ba414a24ffe7a2a593a9154daadf upstream.
    
    The one in do_debug() is probably harmless, but better safe than sorry.
    
    Signed-off-by: Andy Lutomirski <luto@amacapital.net>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Link: http://lkml.kernel.org/r/d67deaa9df5458363623001f252d1aee3215d014.1425948056.git.luto@amacapital.net
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    [lizf: Backported to 3.4: drop the change to do_bounds()]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 04fd27635f9f9df20381dfd692f6069a7a8156e7
Author: Malcolm Priestley <tvboxspy@gmail.com>
Date:   Sat Mar 7 17:04:54 2015 +0000

    vt6655: RFbSetPower fix missing rate RATE_12M
    
    commit 40c8790bcb7ac74f3038153cd09310e220c6a1df upstream.
    
    When the driver sets this rate a power of zero value is set causing
    data flow stoppage until another rate is tried.
    
    Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    [lizf: Backported to 3.4: adjust indentation]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 13f2db83510a5fec40e5cefefe1369a632165e74
Author: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Date:   Sun Mar 8 22:32:43 2015 -0700

    Input: synaptics - handle spurious release of trackstick buttons
    
    commit ebc80840b850db72f7ae84fbcf77630ae5409629 upstream.
    
    The Fimware 8.1 has a bug in which the extra buttons are only sent when the
    ExtBit is 1.  This should be fixed in a future FW update which should have
    a bump of the minor version.
    
    Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
    Acked-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 154e0eca0bf43d289fffa96b116702ab7377e75d
Author: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date:   Sun Mar 8 22:30:43 2015 -0700

    Input: synaptics - fix middle button on Lenovo 2015 products
    
    commit dc5465dc8a6d5cae8a0e1d8826bdcb2e4cb261ab upstream.
    
    On the X1 Carbon 3rd gen (with a 2015 broadwell cpu), the physical middle
    button of the trackstick (attached to the touchpad serio device, of course)
    seems to get lost.
    
    Actually, the touchpads reports 3 extra buttons, which falls in the switch
    below to the '2' case. Let's handle the case of odd numbers also, so that
    the middle button finds its way back.
    
    Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
    Acked-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    [lizf: Backported to 3.4: open-code GENMASK]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit f88bb391b79b7c3b79399ca1434a0e2bf3b9d7ef
Author: Daniel Martin <consume.noise@gmail.com>
Date:   Sun Mar 8 22:28:40 2015 -0700

    Input: synaptics - query min dimensions for fw v8.1
    
    commit ac097930f0730a9b777737de2b51e0fc49d2be7a upstream.
    
    Query the min dimensions even if the check
    SYN_EXT_CAP_REQUESTS(priv->capabilities) >= 7 fails, but we know that the
    firmware version 8.1 is safe.
    
    With that we don't need quirks for post-2013 models anymore as they expose
    correct min and max dimensions.
    
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=91541
    
    Signed-off-by: Daniel Martin <consume.noise@gmail.com>
      re-order the tests to check SYN_CAP_MIN_DIMENSIONS even on FW 8.1
    Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
    Acked-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 1ca948cd3bc67f810f3ec9ecea257172296f112c
Author: Eric Nelson <eric.nelson@boundarydevices.com>
Date:   Fri Feb 27 08:06:45 2015 -0700

    ASoC: sgtl5000: remove useless register write clearing CHRGPUMP_POWERUP
    
    commit c7d910b87d3c8e9fcf4077089ca4327c12eee099 upstream.
    
    The SGTL5000_CHIP_ANA_POWER register is cached. Update the cached
    value instead of writing it directly.
    
    Patch inspired by Russell King's more colorful remarks in this
    patch:
    	https://github.com/SolidRun/linux-imx6-3.14/commit/dd4bf6a
    
    Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 8418031d0806fa49e1732714a44fb41d4b75b60b
Author: Jiri Slaby <jslaby@suse.cz>
Date:   Thu Mar 5 09:13:31 2015 +0100

    x86/vdso: Fix the build on GCC5
    
    commit e893286918d2cde3a94850d8f7101cd1039e0c62 upstream.
    
    On gcc5 the kernel does not link:
    
      ld: .eh_frame_hdr table[4] FDE at 0000000000000648 overlaps table[5] FDE at 0000000000000670.
    
    Because prior GCC versions always emitted NOPs on ALIGN directives, but
    gcc5 started omitting them.
    
    .LSTARTFDEDLSI1 says:
    
            /* HACK: The dwarf2 unwind routines will subtract 1 from the
               return address to get an address in the middle of the
               presumed call instruction.  Since we didn't get here via
               a call, we need to include the nop before the real start
               to make up for it.  */
            .long .LSTART_sigreturn-1-.     /* PC-relative start address */
    
    But commit 69d0627a7f6e ("x86 vDSO: reorder vdso32 code") from 2.6.25
    replaced .org __kernel_vsyscall+32,0x90 by ALIGN right before
    __kernel_sigreturn.
    
    Of course, ALIGN need not generate any NOP in there. Esp. gcc5 collapses
    vclock_gettime.o and int80.o together with no generated NOPs as "ALIGN".
    
    So fix this by adding to that point at least a single NOP and make the
    function ALIGN possibly with more NOPs then.
    
    Kudos for reporting and diagnosing should go to Richard.
    
    Reported-by: Richard Biener <rguenther@suse.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>
    Acked-by: Andy Lutomirski <luto@amacapital.net>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Link: http://lkml.kernel.org/r/1425543211-12542-1-git-send-email-jslaby@suse.cz
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit c1c04e785012d1f8deab4a5537d4688dd97013e9
Author: Michael S. Tsirkin <mst@redhat.com>
Date:   Thu Mar 5 10:45:49 2015 +1030

    virtio_console: avoid config access from irq
    
    commit eeb8a7e8bb123e84daeef84f5a2eab99ad2839a2 upstream.
    
    when multiport is off, virtio console invokes config access from irq
    context, config access is blocking on s390.
    Fix this up by scheduling work from config irq - similar to what we do
    for multiport configs.
    
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Reviewed-by: Amit Shah <amit.shah@redhat.com>
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 0a1429620345f77cbbfb3adc8522d7d212a84d50
Author: Michael S. Tsirkin <mst@redhat.com>
Date:   Thu Mar 5 10:45:30 2015 +1030

    virtio_console: init work unconditionally
    
    commit 4f6e24ed9de8634d6471ef86b382cba6d4e57ca8 upstream.
    
    when multiport is off, we don't initialize config work,
    but we then cancel uninitialized control_work on freeze.
    
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Reviewed-by: Amit Shah <amit.shah@redhat.com>
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit da2379f2e5fdba4e46b48c381b17cd51dd4299b7
Author: Michal Kazior <michal.kazior@tieto.com>
Date:   Tue Feb 10 12:48:44 2015 +0100

    mac80211: disable u-APSD queues by default
    
    commit aa75ebc275b2a91b193654a177daf900ad6703f0 upstream.
    
    Some APs experience problems when working with
    U-APSD. Decreasing the probability of that
    happening by using legacy mode for all ACs but VO
    isn't enough.
    
    Cisco 4410N originally forced us to enable VO by
    default only because it treated non-VO ACs as
    legacy.
    
    However some APs (notably Netgear R7000) silently
    reclassify packets to different ACs. Since u-APSD
    ACs require trigger frames for frame retrieval
    clients would never see some frames (e.g. ARP
    responses) or would fetch them accidentally after
    a long time.
    
    It makes little sense to enable u-APSD queues by
    default because it needs userspace applications to
    be aware of it to actually take advantage of the
    possible additional powersavings. Implicitly
    depending on driver autotrigger frame support
    doesn't make much sense.
    
    Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 1a19f7fa25f62c74503c461a9a793547d4a4a74e
Author: Arik Nemtsov <arik@wizery.com>
Date:   Mon Jun 18 10:43:50 2012 +0300

    mac80211: set only VO as a U-APSD enabled AC
    
    commit d6a4ed6fe0a0d4790941e7f13e56630b8b9b053d upstream.
    
    Some APs experience problems when working with U-APSD. Decrease the
    probability of that happening by using legacy mode for all ACs but VO.
    
    The AP that caused us troubles was a Cisco 4410N. It ignores our
    setting, and always treats non-VO ACs as legacy.
    
    Signed-off-by: Arik Nemtsov <arik@wizery.com>
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 590f3a306dc71ffa6d2c9ea564e49f59c9b5a8d8
Author: Bob Copeland <me@bobcopeland.com>
Date:   Mon Mar 2 14:28:52 2015 -0500

    mac80211: drop unencrypted frames in mesh fwding
    
    commit d0c22119f574b851e63360c6b8660fe9593bbc3c upstream.
    
    The mesh forwarding path was not checking that data
    frames were protected when running an encrypted network;
    add the necessary check.
    
    Reported-by: Johannes Berg <johannes@sipsolutions.net>
    Signed-off-by: Bob Copeland <me@bobcopeland.com>
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit cfa57ab03e240ce51a32f7009dfbbcde26b27d5e
Author: Darrick J. Wong <darrick.wong@oracle.com>
Date:   Fri Feb 27 10:44:38 2015 -0800

    dm io: deal with wandering queue limits when handling REQ_DISCARD and REQ_WRITE_SAME
    
    commit e5db29806b99ce2b2640d2e4d4fcb983cea115c5 upstream.
    
    Since it's possible for the discard and write same queue limits to
    change while the upper level command is being sliced and diced, fix up
    both of them (a) to reject IO if the special command is unsupported at
    the start of the function and (b) read the limits once and let the
    commands error out on their own if the status happens to change.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
    Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@redhat.com>
    [lizf: Backported to 3.4:
     - adjust context
     - 3.4 doesn't support REQ_WRITE_SAME]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit fe9af155b3346f1236dd442d8f770de52cda4bf5
Author: Mikulas Patocka <mpatocka@redhat.com>
Date:   Fri Feb 27 14:04:27 2015 -0500

    dm: hold suspend_lock while suspending device during device deletion
    
    commit ab7c7bb6f4ab95dbca96fcfc4463cd69843e3e24 upstream.
    
    __dm_destroy() must take the suspend_lock so that its presuspend and
    postsuspend calls do not race with an internal suspend.
    
    Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@redhat.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 182420b6521f728e1eb052c5659847d41b041682
Author: Miklos Szeredi <mszeredi@suse.cz>
Date:   Thu Feb 26 11:45:47 2015 +0100

    fuse: set stolen page uptodate
    
    commit aa991b3b267e24f578bac7b09cc57579b660304b upstream.
    
    Regular pipe buffers' ->steal method (generic_pipe_buf_steal()) doesn't set
    PG_uptodate.
    
    Don't warn on this condition, just set the uptodate flag.
    
    Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 4ff89df0641aba81907245ba2caff741c6535fad
Author: Miklos Szeredi <mszeredi@suse.cz>
Date:   Thu Feb 26 11:45:47 2015 +0100

    fuse: notify: don't move pages
    
    commit 0d2783626a53d4c922f82d51fa675cb5d13f0d36 upstream.
    
    fuse_try_move_page() is not prepared for replacing pages that have already
    been read.
    
    Reported-by: Al Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 7b96cea2eb026957c042a5cf6785e60e25674709
Author: Daniel Mack <daniel@zonque.org>
Date:   Thu Mar 12 09:41:32 2015 +0100

    ALSA: snd-usb: add quirks for Roland UA-22
    
    commit fcdcd1dec6d2c7b718385ec743ae5a9a233edad4 upstream.
    
    The device complies to the UAC1 standard but hides that fact with
    proprietary descriptors. The autodetect quirk for Roland devices
    catches the audio interface but misses the MIDI part, so a specific
    quirk is needed.
    
    Signed-off-by: Daniel Mack <daniel@zonque.org>
    Reported-by: Rafa Lafuente <rafalafuente@gmail.com>
    Tested-by: Raphaël Doursenaud <raphael@doursenaud.fr>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 29311e6caba6c292885756049184f5a44f4607f5
Author: Takashi Iwai <tiwai@suse.de>
Date:   Wed Mar 11 18:12:49 2015 +0100

    ALSA: control: Add sanity checks for user ctl id name string
    
    commit be3bb8236db2d0fcd705062ae2e2a9d75131222f upstream.
    
    There was no check about the id string of user control elements, so we
    accepted even a control element with an empty string, which is
    obviously bogus.  This patch adds more sanity checks of id strings.
    
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 9d4c7de290a5e01e9ef5294199f5b3eceee431fd
Author: Thomas Hellstrom <thellstrom@vmware.com>
Date:   Thu Mar 5 02:33:24 2015 -0800

    drm/vmwgfx: Reorder device takedown somewhat
    
    commit 3458390b9f0ba784481d23134798faee27b5f16f upstream.
    
    To take down the MOB and GMR memory types, the driver may have to issue
    fence objects and thus make sure that the fence manager is taken down
    after those memory types.
    Reorder device init accordingly.
    
    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
    Reviewed-by: Sinclair Yeh <syeh@vmware.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 2f4e074bfbce6c43cf523f24b20fbf83f3292b72
Author: Jan Beulich <JBeulich@suse.com>
Date:   Wed Mar 11 13:51:17 2015 +0000

    xen-pciback: limit guest control of command register
    
    commit af6fc858a35b90e89ea7a7ee58e66628c55c776b upstream.
    
    Otherwise the guest can abuse that control to cause e.g. PCIe
    Unsupported Request responses by disabling memory and/or I/O decoding
    and subsequently causing (CPU side) accesses to the respective address
    ranges, which (depending on system configuration) may be fatal to the
    host.
    
    Note that to alter any of the bits collected together as
    PCI_COMMAND_GUEST permissive mode is now required to be enabled
    globally or on the specific device.
    
    This is CVE-2015-2150 / XSA-120.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
    Signed-off-by: David Vrabel <david.vrabel@citrix.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit cf46e6e7354fb1b0d5c39797b60270a88778999e
Author: Steven Rostedt (Red Hat) <rostedt@goodmis.org>
Date:   Fri Mar 6 19:55:13 2015 -0500

    ftrace: Fix ftrace enable ordering of sysctl ftrace_enabled
    
    commit 524a38682573b2e15ab6317ccfe50280441514be upstream.
    
    Some archs (specifically PowerPC), are sensitive with the ordering of
    the enabling of the calls to function tracing and setting of the
    function to use to be traced.
    
    That is, update_ftrace_function() sets what function the ftrace_caller
    trampoline should call. Some archs require this to be set before
    calling ftrace_run_update_code().
    
    Another bug was discovered, that ftrace_startup_sysctl() called
    ftrace_run_update_code() directly. If the function the ftrace_caller
    trampoline changes, then it will not be updated. Instead a call
    to ftrace_startup_enable() should be called because it tests to see
    if the callback changed since the code was disabled, and will
    tell the arch to update appropriately. Most archs do not need this
    notification, but PowerPC does.
    
    The problem could be seen by the following commands:
    
     # echo 0 > /proc/sys/kernel/ftrace_enabled
     # echo function > /sys/kernel/debug/tracing/current_tracer
     # echo 1 > /proc/sys/kernel/ftrace_enabled
     # cat /sys/kernel/debug/tracing/trace
    
    The trace will show that function tracing was not active.
    
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 2d4293a85d30bd669f6bf7578689618cd454a2c8
Author: Pratyush Anand <panand@redhat.com>
Date:   Fri Mar 6 23:58:06 2015 +0530

    ftrace: Fix en(dis)able graph caller when en(dis)abling record via sysctl
    
    commit 1619dc3f8f555ee1cdd3c75db3885d5715442b12 upstream.
    
    When ftrace is enabled globally through the proc interface, we must check if
    ftrace_graph_active is set. If it is set, then we should also pass the
    FTRACE_START_FUNC_RET command to ftrace_run_update_code(). Similarly, when
    ftrace is disabled globally through the proc interface, we must check if
    ftrace_graph_active is set. If it is set, then we should also pass the
    FTRACE_STOP_FUNC_RET command to ftrace_run_update_code().
    
    Consider the following situation.
    
     # echo 0 > /proc/sys/kernel/ftrace_enabled
    
    After this ftrace_enabled = 0.
    
     # echo function_graph > /sys/kernel/debug/tracing/current_tracer
    
    Since ftrace_enabled = 0, ftrace_enable_ftrace_graph_caller() is never
    called.
    
     # echo 1 > /proc/sys/kernel/ftrace_enabled
    
    Now ftrace_enabled will be set to true, but still
    ftrace_enable_ftrace_graph_caller() will not be called, which is not
    desired.
    
    Further if we execute the following after this:
      # echo nop > /sys/kernel/debug/tracing/current_tracer
    
    Now since ftrace_enabled is set it will call
    ftrace_disable_ftrace_graph_caller(), which causes a kernel warning on
    the ARM platform.
    
    On the ARM platform, when ftrace_enable_ftrace_graph_caller() is called,
    it checks whether the old instruction is a nop or not. If it's not a nop,
    then it returns an error. If it is a nop then it replaces instruction at
    that address with a branch to ftrace_graph_caller.
    ftrace_disable_ftrace_graph_caller() behaves just the opposite. Therefore,
    if generic ftrace code ever calls either ftrace_enable_ftrace_graph_caller()
    or ftrace_disable_ftrace_graph_caller() consecutively two times in a row,
    then it will return an error, which will cause the generic ftrace code to
    raise a warning.
    
    Note, x86 does not have an issue with this because the architecture
    specific code for ftrace_enable_ftrace_graph_caller() and
    ftrace_disable_ftrace_graph_caller() does not check the previous state,
    and calling either of these functions twice in a row has no ill effect.
    
    Link: http://lkml.kernel.org/r/e4fbe64cdac0dd0e86a3bf914b0f83c0b419f146.1425666454.git.panand@redhat.com
    
    Signed-off-by: Pratyush Anand <panand@redhat.com>
    [
      removed extra if (ftrace_start_up) and defined ftrace_graph_active as 0
      if CONFIG_FUNCTION_GRAPH_TRACER is not set.
    ]
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 2932a0a1abaaab014a5698c26dc95956618b4286
Author: Oliver Hartkopp <socketcan@hartkopp.net>
Date:   Mon Feb 23 20:37:54 2015 +0100

    can: add missing initialisations in CAN related skbuffs
    
    commit 969439016d2cf61fef53a973d7e6d2061c3793b1 upstream.
    
    When accessing CAN network interfaces with AF_PACKET sockets e.g. by dhclient
    this can lead to a skb_under_panic due to missing skb initialisations.
    
    Add the missing initialisations at the CAN skbuff creation times on driver
    level (rx path) and in the network layer (tx path).
    
    Reported-by: Austin Schuh <austin@peloton-tech.com>
    Reported-by: Daniel Steer <daniel.steer@mclaren.com>
    Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    [lizf: Backported to 3.4:
     - adjust context
     - drop changes to alloc_canfd_skb(), as there's no such function]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 1c45b5d6a53edcadc1f600a93d8775b78f4e3b8f
Author: James Bottomley <JBottomley@Parallels.com>
Date:   Wed Mar 4 16:18:33 2015 -0800

    libsas: Fix Kernel Crash in smp_execute_task
    
    commit 6302ce4d80aa82b3fdb5c5cd68e7268037091b47 upstream.
    
    This crash was reported:
    
    [  366.947370] sd 3:0:1:0: [sdb] Spinning up disk....
    [  368.804046] BUG: unable to handle kernel NULL pointer dereference at           (null)
    [  368.804072] IP: [<ffffffff81358457>] __mutex_lock_common.isra.7+0x9c/0x15b
    [  368.804098] PGD 0
    [  368.804114] Oops: 0002 [#1] SMP
    [  368.804143] CPU 1
    [  368.804151] Modules linked in: sg netconsole s3g(PO) uinput joydev hid_multitouch usbhid hid snd_hda_codec_via cpufreq_userspace cpufreq_powersave cpufreq_stats uhci_hcd cpufreq_conservative snd_hda_intel snd_hda_codec snd_hwdep snd_pcm sdhci_pci snd_page_alloc sdhci snd_timer snd psmouse evdev serio_raw pcspkr soundcore xhci_hcd shpchp s3g_drm(O) mvsas mmc_core ahci libahci drm i2c_core acpi_cpufreq mperf video processor button thermal_sys dm_dmirror exfat_fs exfat_core dm_zcache dm_mod padlock_aes aes_generic padlock_sha iscsi_target_mod target_core_mod configfs sswipe libsas libata scsi_transport_sas picdev via_cputemp hwmon_vid fuse parport_pc ppdev lp parport autofs4 ext4 crc16 mbcache jbd2 sd_mod crc_t10dif usb_storage scsi_mod ehci_hcd usbcore usb_common
    [  368.804749]
    [  368.804764] Pid: 392, comm: kworker/u:3 Tainted: P        W  O 3.4.87-logicube-ng.22 #1 To be filled by O.E.M. To be filled by O.E.M./EPIA-M920
    [  368.804802] RIP: 0010:[<ffffffff81358457>]  [<ffffffff81358457>] __mutex_lock_common.isra.7+0x9c/0x15b
    [  368.804827] RSP: 0018:ffff880117001cc0  EFLAGS: 00010246
    [  368.804842] RAX: 0000000000000000 RBX: ffff8801185030d0 RCX: ffff88008edcb420
    [  368.804857] RDX: 0000000000000000 RSI: 0000000000000002 RDI: ffff8801185030d4
    [  368.804873] RBP: ffff8801181531c0 R08: 0000000000000020 R09: 00000000fffffffe
    [  368.804885] R10: 0000000000000000 R11: 0000000000000000 R12: ffff8801185030d4
    [  368.804899] R13: 0000000000000002 R14: ffff880117001fd8 R15: ffff8801185030d8
    [  368.804916] FS:  0000000000000000(0000) GS:ffff88011fc80000(0000) knlGS:0000000000000000
    [  368.804931] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    [  368.804946] CR2: 0000000000000000 CR3: 000000000160b000 CR4: 00000000000006e0
    [  368.804962] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [  368.804978] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    [  368.804995] Process kworker/u:3 (pid: 392, threadinfo ffff880117000000, task ffff8801181531c0)
    [  368.805009] Stack:
    [  368.805017]  ffff8801185030d8 0000000000000000 ffffffff8161ddf0 ffffffff81056f7c
    [  368.805062]  000000000000b503 ffff8801185030d0 ffff880118503000 0000000000000000
    [  368.805100]  ffff8801185030d0 ffff8801188b8000 ffff88008edcb420 ffffffff813583ac
    [  368.805135] Call Trace:
    [  368.805153]  [<ffffffff81056f7c>] ? up+0xb/0x33
    [  368.805168]  [<ffffffff813583ac>] ? mutex_lock+0x16/0x25
    [  368.805194]  [<ffffffffa018c414>] ? smp_execute_task+0x4e/0x222 [libsas]
    [  368.805217]  [<ffffffffa018ce1c>] ? sas_find_bcast_dev+0x3c/0x15d [libsas]
    [  368.805240]  [<ffffffffa018ce4f>] ? sas_find_bcast_dev+0x6f/0x15d [libsas]
    [  368.805264]  [<ffffffffa018e989>] ? sas_ex_revalidate_domain+0x37/0x2ec [libsas]
    [  368.805280]  [<ffffffff81355a2a>] ? printk+0x43/0x48
    [  368.805296]  [<ffffffff81359a65>] ? _raw_spin_unlock_irqrestore+0xc/0xd
    [  368.805318]  [<ffffffffa018b767>] ? sas_revalidate_domain+0x85/0xb6 [libsas]
    [  368.805336]  [<ffffffff8104e5d9>] ? process_one_work+0x151/0x27c
    [  368.805351]  [<ffffffff8104f6cd>] ? worker_thread+0xbb/0x152
    [  368.805366]  [<ffffffff8104f612>] ? manage_workers.isra.29+0x163/0x163
    [  368.805382]  [<ffffffff81052c4e>] ? kthread+0x79/0x81
    [  368.805399]  [<ffffffff8135fea4>] ? kernel_thread_helper+0x4/0x10
    [  368.805416]  [<ffffffff81052bd5>] ? kthread_flush_work_fn+0x9/0x9
    [  368.805431]  [<ffffffff8135fea0>] ? gs_change+0x13/0x13
    [  368.805442] Code: 83 7d 30 63 7e 04 f3 90 eb ab 4c 8d 63 04 4c 8d 7b 08 4c 89 e7 e8 fa 15 00 00 48 8b 43 10 4c 89 3c 24 48 89 63 10 48 89 44 24 08 <48> 89 20 83 c8 ff 48 89 6c 24 10 87 03 ff c8 74 35 4d 89 ee 41
    [  368.805851] RIP  [<ffffffff81358457>] __mutex_lock_common.isra.7+0x9c/0x15b
    [  368.805877]  RSP <ffff880117001cc0>
    [  368.805886] CR2: 0000000000000000
    [  368.805899] ---[ end trace b720682065d8f4cc ]---
    
    It's directly caused by 89d3cf6 [SCSI] libsas: add mutex for SMP task
    execution, but shows a deeper cause: expander functions expect to be able to
    cast to and treat domain devices as expanders.  The correct fix is to only do
    expander discover when we know we've got an expander device to avoid wrongly
    casting a non-expander device.
    
    Reported-by: Praveen Murali <pmurali@logicube.com>
    Tested-by: Praveen Murali <pmurali@logicube.com>
    Signed-off-by: James Bottomley <JBottomley@Parallels.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 89cd766595ba9f5f87f75962c065ecd287e0792d
Author: Brian King <brking@linux.vnet.ibm.com>
Date:   Wed Mar 4 08:09:44 2015 -0600

    bnx2x: Force fundamental reset for EEH recovery
    
    commit da293700568ed3d96fcf062ac15d7d7c41377f11 upstream.
    
    EEH recovery for bnx2x based adapters is not reliable on all Power
    systems using the default hot reset, which can result in an
    unrecoverable EEH error. Forcing the use of fundamental reset
    during EEH recovery fixes this.
    
    Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit ec3be97f93fce5d56ecfdba46c1fc392fb564c90
Author: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Date:   Tue Mar 3 19:58:22 2015 +0100

    ARM: at91: pm: fix at91rm9200 standby
    
    commit 84e871660bebfddb9a62ebd6f19d02536e782f0a upstream.
    
    at91rm9200 standby and suspend to ram has been broken since
    00482a4078f4. It is wrongly using AT91_BASE_SYS which is a physical address
    and actually doesn't correspond to any register on at91rm9200.
    
    Use the correct at91_ramc_base[0] instead.
    
    Fixes: 00482a4078f4 (ARM: at91: implement the standby function for pm/cpuidle)
    
    Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
    Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit bd637e58a1e3605bea04d6b503576765d2e3c7c5
Author: Julian Anastasov <ja@ssi.bg>
Date:   Sat Feb 21 21:03:10 2015 +0200

    ipvs: add missing ip_vs_pe_put in sync code
    
    commit 528c943f3bb919aef75ab2fff4f00176f09a4019 upstream.
    
    ip_vs_conn_fill_param_sync() gets in param.pe a module
    reference for persistence engine from __ip_vs_pe_getbyname()
    but forgets to put it. Problem occurs in backup for
    sync protocol v1 (2.6.39).
    
    Also, pe_data usually comes in sync messages for
    connection templates and ip_vs_conn_new() copies
    the pointer only in this case. Make sure pe_data
    is not leaked if it comes unexpectedly for normal
    connections. Leak can happen only if bogus messages
    are sent to backup server.
    
    Fixes: fe5e7a1efb66 ("IPVS: Backup, Adding Version 1 receive capability")
    Signed-off-by: Julian Anastasov <ja@ssi.bg>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 0b4b4c305e98a1feb94f4b0d2909f9e338ac0941
Author: Al Viro <viro@zeniv.linux.org.uk>
Date:   Fri Feb 6 02:07:45 2015 -0500

    gadgetfs: use-after-free in ->aio_read()
    
    commit f01d35a15fa04162a58b95970fc01fa70ec9dacd upstream.
    
    AIO_PREAD requests call ->aio_read() with iovec on caller's stack, so if
    we are going to access it asynchronously, we'd better get ourselves
    a copy - the one on kernel stack of aio_run_iocb() won't be there
    anymore.  function/f_fs.c take care of doing that, legacy/inode.c
    doesn't...
    
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    [lizf: Backproted to 3.4:
     - adjust context
     - need kfree() after calling get_ready_ep()]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 464e503591a5172ff7a70d58b00c2ba2c2498c06
Author: Al Viro <viro@ZenIV.linux.org.uk>
Date:   Sat Mar 7 21:08:46 2015 +0000

    sunrpc: fix braino in ->poll()
    
    commit 1711fd9addf214823b993468567cab1f8254fc51 upstream.
    
    POLL_OUT isn't what callers of ->poll() are expecting to see; it's
    actually __SI_POLL | 2 and it's a siginfo code, not a poll bitmap
    bit...
    
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Bruce Fields <bfields@fieldses.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 9d3cfbba07feda2b160d778aa21f81ad65dbd076
Author: Johan Hovold <johan@kernel.org>
Date:   Wed Mar 4 10:39:06 2015 +0100

    TTY: fix tty_wait_until_sent on 64-bit machines
    
    commit 79fbf4a550ed6a22e1ae1516113e6c7fa5d56a53 upstream.
    
    Fix overflow bug in tty_wait_until_sent on 64-bit machines, where an
    infinite timeout (0) would be passed to the underlying tty-driver's
    wait_until_sent-operation as a negative timeout (-1), causing it to
    return immediately.
    
    This manifests itself for example as tcdrain() returning immediately,
    drivers not honouring the drain flags when setting terminal attributes,
    or even dropped data on close as a requested infinite closing-wait
    timeout would be ignored.
    
    The first symptom  was reported by Asier LLANO who noted that tcdrain()
    returned prematurely when using the ftdi_sio usb-serial driver.
    
    Fix this by passing 0 rather than MAX_SCHEDULE_TIMEOUT (LONG_MAX) to the
    underlying tty driver.
    
    Note that the serial-core wait_until_sent-implementation is not affected
    by this bug due to a lucky chance (comparison to an unsigned maximum
    timeout), and neither is the cyclades one that had an explicit check for
    negative timeouts, but all other tty drivers appear to be affected.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Reported-by: ZIV-Asier Llano Palacios <asier.llano@cgglobal.com>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 974de0a75be69498648e831cb42c61cd9098e4de
Author: Johan Hovold <johan@kernel.org>
Date:   Wed Mar 4 10:39:03 2015 +0100

    net: irda: fix wait_until_sent poll timeout
    
    commit 2c3fbe3cf28fbd7001545a92a83b4f8acfd9fa36 upstream.
    
    In case an infinite timeout (0) is requested, the irda wait_until_sent
    implementation would use a zero poll timeout rather than the default
    200ms.
    
    Note that wait_until_sent is currently never called with a 0-timeout
    argument due to a bug in tty_wait_until_sent.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 7ebae41be6d18aa63ea086f3522243d090a8fc8d
Author: Peter Hurley <peter@hurleysoftware.com>
Date:   Sun Mar 1 10:11:05 2015 -0500

    console: Fix console name size mismatch
    
    commit 30a22c215a0007603ffc08021f2e8b64018517dd upstream.
    
    commit 6ae9200f2cab7 ("enlarge console.name") increased the storage
    for the console name to 16 bytes, but not the corresponding
    struct console_cmdline::name storage. Console names longer than
    8 bytes cause read beyond end-of-string and failure to match
    console; I'm not sure if there are other unexpected consequences.
    
    Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    [lizf: Backported to 3.4:
     - adjust filename
     - s/c->name/console_cmdline[i].name/]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit f835912a7be0ac4f06f3e5995e29726af45a3095
Author: Jiri Slaby <jslaby@suse.cz>
Date:   Fri Feb 27 18:40:31 2015 +0100

    tty: fix up atime/mtime mess, take four
    
    commit f0bf0bd07943bfde8f5ac39a32664810a379c7d3 upstream.
    
    This problem was taken care of three times already in
    * b0de59b5733d18b0d1974a060860a8b5c1b36a2e (TTY: do not update
      atime/mtime on read/write),
    * 37b7f3c76595e23257f61bd80b223de8658617ee (TTY: fix atime/mtime
      regression), and
    * b0b885657b6c8ef63a46bc9299b2a7715d19acde (tty: fix up atime/mtime
      mess, take three)
    
    But it still misses one point. As John Paul correctly points out, we
    do not care about setting date. If somebody ever changes wall
    time backwards (by mistake for example), tty timestamps are never
    updated until the original wall time passes.
    
    So check the absolute difference of times and if it large than "8
    seconds or so", always update the time. That means we will update
    immediatelly when changing time. Ergo, CAP_SYS_TIME can foul the
    check, but it was always that way.
    
    Thanks John for serving me this so nicely debugged.
    
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>
    Reported-by: John Paul Perry <john_paul.perry@alcatel-lucent.com>
    Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 23e1d762ffad241242759e454ff61334d99707ff
Author: Russell King <rmk+kernel@arm.linux.org.uk>
Date:   Fri Mar 6 10:49:21 2015 +0000

    Change email address for 8250_pci
    
    commit f2e0ea861117bda073d1d7ffbd3120c07c0d5d34 upstream.
    
    I'm still receiving reports to my email address, so let's point this
    at the linux-serial mailing list instead.
    
    Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 6f82bf68f2b5d4332df1abe5069acf377c60d55f
Author: Mathias Nyman <mathias.nyman@linux.intel.com>
Date:   Fri Mar 6 17:23:19 2015 +0200

    xhci: Workaround for PME stuck issues in Intel xhci
    
    commit b8cb91e058cd0c0f02059c1207293c5b31d350fa upstream.
    
    The xhci in Intel Sunrisepoint and Cherryview platforms need a driver
    workaround for a Stuck PME that might either block PME events in suspend,
    or create spurious PME events preventing runtime suspend.
    
    Workaround is to clear a internal PME flag, BIT(28) in a vendor specific
    PMCTRL register at offset 0x80a4, in both suspend resume callbacks
    
    Without this, xhci connected usb devices might never be able to wake up the
    system from suspend, or prevent device from going to suspend (xhci d3)
    
    Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 1038be676ed526abb0c9148431a4cd7ad97af9d5
Author: Aleksander Morgado <aleksander@aleksander.es>
Date:   Fri Mar 6 17:14:21 2015 +0200

    xhci: fix reporting of 0-sized URBs in control endpoint
    
    commit 45ba2154d12fc43b70312198ec47085f10be801a upstream.
    
    When a control transfer has a short data stage, the xHCI controller generates
    two transfer events: a COMP_SHORT_TX event that specifies the untransferred
    amount, and a COMP_SUCCESS event. But when the data stage is not short, only the
    COMP_SUCCESS event occurs. Therefore, xhci-hcd must set urb->actual_length to
    urb->transfer_buffer_length while processing the COMP_SUCCESS event, unless
    urb->actual_length was set already by a previous COMP_SHORT_TX event.
    
    The driver checks this by seeing whether urb->actual_length == 0, but this alone
    is the wrong test, as it is entirely possible for a short transfer to have an
    urb->actual_length = 0.
    
    This patch changes the xhci driver to rely on a new td->urb_length_set flag,
    which is set to true when a COMP_SHORT_TX event is received and the URB length
    updated at that stage.
    
    This fixes a bug which affected the HSO plugin, which relies on URBs with
    urb->actual_length == 0 to halt re-submitting the RX URB in the control
    endpoint.
    
    Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
    Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 55864668ed619c38cf632b5d4cea2dcded249b49
Author: Andy Lutomirski <luto@amacapital.net>
Date:   Thu Mar 5 01:09:44 2015 +0100

    x86/asm/entry/64: Remove a bogus 'ret_from_fork' optimization
    
    commit 956421fbb74c3a6261903f3836c0740187cf038b upstream.
    
    'ret_from_fork' checks TIF_IA32 to determine whether 'pt_regs' and
    the related state make sense for 'ret_from_sys_call'.  This is
    entirely the wrong check.  TS_COMPAT would make a little more
    sense, but there's really no point in keeping this optimization
    at all.
    
    This fixes a return to the wrong user CS if we came from int
    0x80 in a 64-bit task.
    
    Signed-off-by: Andy Lutomirski <luto@amacapital.net>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Denys Vlasenko <dvlasenk@redhat.com>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Link: http://lkml.kernel.org/r/4710be56d76ef994ddf59087aad98c000fbab9a4.1424989793.git.luto@amacapital.net
    [ Backported from tip:x86/asm. ]
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 95f6ecf4162e79fda556abae1df5088beb06ca05
Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
Date:   Tue Mar 3 13:38:14 2015 +0200

    ASoC: omap-pcm: Correct dma mask
    
    commit d51199a83a2cf82a291d19ee852c44caa511427d upstream.
    
    DMA_BIT_MASK of 64 is not valid dma address mask for OMAPs, it should be
    set to 32.
    The 64 was introduced by commit (in 2009):
    a152ff24b978 ASoC: OMAP: Make DMA 64 aligned
    
    But the dma_mask and coherent_dma_mask can not be used to specify alignment.
    
    Fixes: a152ff24b978 (ASoC: OMAP: Make DMA 64 aligned)
    Reported-by: Grygorii Strashko <Grygorii.Strashko@linaro.org>
    Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    [lizf: Backported to 3.4: there's no dma_coerce_mask_and_coherent()]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 4863cbc4c74d59556fc62c34fa8526becfc68aa3
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Mar 1 10:41:37 2015 +0000

    ACPI / video: Load the module even if ACPI is disabled
    
    commit 6e17cb12881ba8d5e456b89f072dc6b70048af36 upstream.
    
    i915.ko depends upon the acpi/video.ko module and so refuses to load if
    ACPI is disabled at runtime if for example the BIOS is broken beyond
    repair. acpi/video provides an optional service for i915.ko and so we
    should just allow the modules to load, but do no nothing in order to let
    the machines boot correctly.
    
    Reported-by: Bill Augur <bill-auger@programmer.net>
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
    Cc: Jani Nikula <jani.nikula@intel.com>
    Acked-by: Aaron Lu <aaron.lu@intel.com>
    [ rjw: Fixed up the new comment in acpi_video_init() ]
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 96aded1687b855b58f0277b3e6c1d6d3c73c2535
Author: Tommi Rantala <tt.rantala@gmail.com>
Date:   Mon Mar 2 21:36:07 2015 +0200

    drm/radeon: fix DRM_IOCTL_RADEON_CS oops
    
    commit a28b2a47edcd0cb7c051b445f71a426000394606 upstream.
    
    Passing zeroed drm_radeon_cs struct to DRM_IOCTL_RADEON_CS produces the
    following oops.
    
    Fix by always calling INIT_LIST_HEAD() to avoid the crash in list_sort().
    
    ----------------------------------
    
     #include <stdint.h>
     #include <fcntl.h>
     #include <unistd.h>
     #include <sys/ioctl.h>
     #include <drm/radeon_drm.h>
    
     static const struct drm_radeon_cs cs;
    
     int main(int argc, char **argv)
     {
             return ioctl(open(argv[1], O_RDWR), DRM_IOCTL_RADEON_CS, &cs);
     }
    
    ----------------------------------
    
    [ttrantal@test2 ~]$ ./main /dev/dri/card0
    [   46.904650] BUG: unable to handle kernel NULL pointer dereference at           (null)
    [   46.905022] IP: [<ffffffff814d6df2>] list_sort+0x42/0x240
    [   46.905022] PGD 68f29067 PUD 688b5067 PMD 0
    [   46.905022] Oops: 0002 [#1] SMP
    [   46.905022] CPU: 0 PID: 2413 Comm: main Not tainted 4.0.0-rc1+ #58
    [   46.905022] Hardware name: Hewlett-Packard HP Compaq dc5750 Small Form Factor/0A64h, BIOS 786E3 v02.10 01/25/2007
    [   46.905022] task: ffff880058e2bcc0 ti: ffff880058e64000 task.ti: ffff880058e64000
    [   46.905022] RIP: 0010:[<ffffffff814d6df2>]  [<ffffffff814d6df2>] list_sort+0x42/0x240
    [   46.905022] RSP: 0018:ffff880058e67998  EFLAGS: 00010246
    [   46.905022] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
    [   46.905022] RDX: ffffffff81644410 RSI: ffff880058e67b40 RDI: ffff880058e67a58
    [   46.905022] RBP: ffff880058e67a88 R08: 0000000000000000 R09: 0000000000000000
    [   46.905022] R10: ffff880058e2bcc0 R11: ffffffff828e6ca0 R12: ffffffff81644410
    [   46.905022] R13: ffff8800694b8018 R14: 0000000000000000 R15: ffff880058e679b0
    [   46.905022] FS:  00007fdc65a65700(0000) GS:ffff88006d600000(0000) knlGS:0000000000000000
    [   46.905022] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [   46.905022] CR2: 0000000000000000 CR3: 0000000058dd9000 CR4: 00000000000006f0
    [   46.905022] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [   46.905022] DR3: 0000000000000000 DR6: 00000000ffff4ff0 DR7: 0000000000000400
    [   46.905022] Stack:
    [   46.905022]  ffff880058e67b40 ffff880058e2bcc0 ffff880058e67a78 0000000000000000
    [   46.905022]  0000000000000000 0000000000000000 0000000000000000 0000000000000000
    [   46.905022]  0000000000000000 0000000000000000 0000000000000000 0000000000000000
    [   46.905022] Call Trace:
    [   46.905022]  [<ffffffff81644a65>] radeon_cs_parser_fini+0x195/0x220
    [   46.905022]  [<ffffffff81645069>] radeon_cs_ioctl+0xa9/0x960
    [   46.905022]  [<ffffffff815e1f7c>] drm_ioctl+0x19c/0x640
    [   46.905022]  [<ffffffff810f8fdd>] ? trace_hardirqs_on_caller+0xfd/0x1c0
    [   46.905022]  [<ffffffff810f90ad>] ? trace_hardirqs_on+0xd/0x10
    [   46.905022]  [<ffffffff8160c066>] radeon_drm_ioctl+0x46/0x80
    [   46.905022]  [<ffffffff81211868>] do_vfs_ioctl+0x318/0x570
    [   46.905022]  [<ffffffff81462ef6>] ? selinux_file_ioctl+0x56/0x110
    [   46.905022]  [<ffffffff81211b41>] SyS_ioctl+0x81/0xa0
    [   46.905022]  [<ffffffff81dc6312>] system_call_fastpath+0x12/0x17
    [   46.905022] Code: 48 89 b5 10 ff ff ff 0f 84 03 01 00 00 4c 8d bd 28 ff ff
    ff 31 c0 48 89 fb b9 15 00 00 00 49 89 d4 4c 89 ff f3 48 ab 48 8b 46 08 <48> c7
    00 00 00 00 00 48 8b 0e 48 85 c9 0f 84 7d 00 00 00 c7 85
    [   46.905022] RIP  [<ffffffff814d6df2>] list_sort+0x42/0x240
    [   46.905022]  RSP <ffff880058e67998>
    [   46.905022] CR2: 0000000000000000
    [   47.149253] ---[ end trace 09576b4e8b2c20b8 ]---
    
    Reviewed-by: Christian König <christian.koenig@amd.com>
    Signed-off-by: Tommi Rantala <tt.rantala@gmail.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 63a445d34e5edc8e59d9888e9837c34b02d51b91
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Mon Mar 2 20:43:53 2015 -0500

    drm/radeon: do a posting read in si_set_irq
    
    commit 0586915ec10d0ae60de5cd3381ad25a704760402 upstream.
    
    To make sure the writes go through the pci bridge.
    
    bug:
    https://bugzilla.kernel.org/show_bug.cgi?id=90741
    
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 0c354d6abb5433f488ed14add656279f4898eed1
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Mon Mar 2 20:42:53 2015 -0500

    drm/radeon: do a posting read in evergreen_set_irq
    
    commit c320bb5f6dc0cb88a811cbaf839303e0a3916a92 upstream.
    
    To make sure the writes go through the pci bridge.
    
    bug:
    https://bugzilla.kernel.org/show_bug.cgi?id=90741
    
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 7758b16f963296296384c654a4842fa50912ed97
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Mon Mar 2 20:41:31 2015 -0500

    drm/radeon: do a posting read in r600_set_irq
    
    commit 9d1393f23d5656cdd5f368efd60694d4aeed81d3 upstream.
    
    To make sure the writes go through the pci bridge.
    
    bug:
    https://bugzilla.kernel.org/show_bug.cgi?id=90741
    
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 81b100817a053ffe2189e11597b7365272f1c264
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Mon Mar 2 20:39:56 2015 -0500

    drm/radeon: do a posting read in rs600_set_irq
    
    commit 54acf107e4e66d1f4a697e08a7f60dba9fcf07c3 upstream.
    
    To make sure the writes go through the pci bridge.
    
    bug:
    https://bugzilla.kernel.org/show_bug.cgi?id=90741
    
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit e653b3ede2c327db4310f8053286521e471c9c0a
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Mon Mar 2 20:36:26 2015 -0500

    drm/radeon: do a posting read in r100_set_irq
    
    commit f957063fee6392bb9365370db6db74dc0b2dce0a upstream.
    
    To make sure the writes go through the pci bridge.
    
    bug:
    https://bugzilla.kernel.org/show_bug.cgi?id=90741
    
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit ba4e25ac180d5903320c42e4ef792e86c406fbfb
Author: Tyler Hicks <tyhicks@canonical.com>
Date:   Tue Feb 24 19:28:10 2015 -0600

    eCryptfs: don't pass fs-specific ioctl commands through
    
    commit 6d65261a09adaa374c05de807f73a144d783669e upstream.
    
    eCryptfs can't be aware of what to expect when after passing an
    arbitrary ioctl command through to the lower filesystem. The ioctl
    command may trigger an action in the lower filesystem that is
    incompatible with eCryptfs.
    
    One specific example is when one attempts to use the Btrfs clone
    ioctl command when the source file is in the Btrfs filesystem that
    eCryptfs is mounted on top of and the destination fd is from a new file
    created in the eCryptfs mount. The ioctl syscall incorrectly returns
    success because the command is passed down to Btrfs which thinks that it
    was able to do the clone operation. However, the result is an empty
    eCryptfs file.
    
    This patch allows the trim, {g,s}etflags, and {g,s}etversion ioctl
    commands through and then copies up the inode metadata from the lower
    inode to the eCryptfs inode to catch any changes made to the lower
    inode's metadata. Those five ioctl commands are mostly common across all
    filesystems but the whitelist may need to be further pruned in the
    future.
    
    https://bugzilla.kernel.org/show_bug.cgi?id=93691
    https://launchpad.net/bugs/1305335
    
    Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
    Cc: Rocko <rockorequin@hotmail.com>
    Cc: Colin Ian King <colin.king@canonical.com>
    [lizf: Backported to 3.4:
     - adjust context
     - there's no file_inode(), so open-code it]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit eeaab591c8b308c2a0a0d94abd0e717cae7e8bd4
Author: Max Mansfield <max.m.mansfield@gmail.com>
Date:   Mon Mar 2 18:38:02 2015 -0700

    usb: ftdi_sio: Add jtag quirk support for Cyber Cortex AV boards
    
    commit c7d373c3f0da2b2b78c4b1ce5ae41485b3ef848c upstream.
    
    This patch integrates Cyber Cortex AV boards with the existing
    ftdi_jtag_quirk in order to use serial port 0 with JTAG which is
    required by the manufacturers' software.
    
    Steps: 2
    
    [ftdi_sio_ids.h]
    1. Defined the device PID
    
    [ftdi_sio.c]
    2. Added a macro declaration to the ids array, in order to enable the
    jtag quirk for the device.
    
    Signed-off-by: Max Mansfield <max.m.mansfield@gmail.com>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit deee5f87a9f1f8d1d99fd6d0d30b56ac5aa839ad
Author: Trond Myklebust <trond.myklebust@primarydata.com>
Date:   Thu Feb 26 12:54:46 2015 -0500

    NFSv4: Don't call put_rpccred() under the rcu_read_lock()
    
    commit 7c0af9ffb7bb4e5355470fa60b3eb711ddf226fa upstream.
    
    put_rpccred() can sleep.
    
    Fixes: 8f649c3762547 ("NFSv4: Fix the locking in nfs_inode_reclaim_delegation()")
    Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit c7ef03ccf7dfaea06e75ef68c7b021f95ad2868b
Author: Michiel vd Garde <mgparser@gmail.com>
Date:   Fri Feb 27 02:08:29 2015 +0100

    USB: serial: cp210x: Adding Seletek device id's
    
    commit 675af70856d7cc026be8b6ea7a8b9db10b8b38a1 upstream.
    
    These device ID's are not associated with the cp210x module currently,
    but should be. This patch allows the devices to operate upon connecting
    them to the usb bus as intended.
    
    Signed-off-by: Michiel van de Garde <mgparser@gmail.com>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 29bc71242f47ac050e4d3d60b80e96f695a84d36
Author: Jouni Malinen <jouni@qca.qualcomm.com>
Date:   Thu Feb 26 15:50:50 2015 +0200

    mac80211: Send EAPOL frames at lowest rate
    
    commit 9c1c98a3bb7b7593b60264b9a07e001e68b46697 upstream.
    
    The current minstrel_ht rate control behavior is somewhat optimistic in
    trying to find optimum TX rate. While this is usually fine for normal
    Data frames, there are cases where a more conservative set of retry
    parameters would be beneficial to make the connection more robust.
    
    EAPOL frames are critical to the authentication and especially the
    EAPOL-Key message 4/4 (the last message in the 4-way handshake) is
    important to get through to the AP. If that message is lost, the only
    recovery mechanism in many cases is to reassociate with the AP and start
    from scratch. This can often be avoided by trying to send the frame with
    more conservative rate and/or with more link layer retries.
    
    In most cases, minstrel_ht is currently using the initial EAPOL-Key
    frames for probing higher rates and this results in only five link layer
    transmission attempts (one at high(ish) MCS and four at MCS0). While
    this works with most APs, it looks like there are some deployed APs that
    may have issues with the EAPOL frames using HT MCS immediately after
    association. Similarly, there may be issues in cases where the signal
    strength or radio environment is not good enough to be able to get
    frames through even at couple of MCS 0 tries.
    
    The best approach for this would likely to be to reduce the TX rate for
    the last rate (3rd rate parameter in the set) to a low basic rate (say,
    6 Mbps on 5 GHz and 2 or 5.5 Mbps on 2.4 GHz), but doing that cleanly
    requires some more effort. For now, we can start with a simple one-liner
    that forces the minimum rate to be used for EAPOL frames similarly how
    the TX rate is selected for the IEEE 802.11 Management frames. This does
    result in a small extra latency added to the cases where the AP would be
    able to receive the higher rate, but taken into account how small number
    of EAPOL frames are used, this is likely to be insignificant. A future
    optimization in the minstrel_ht design can also allow this patch to be
    reverted to get back to the more optimized initial TX rate.
    
    It should also be noted that many drivers that do not use minstrel as
    the rate control algorithm are already doing similar workarounds by
    forcing the lowest TX rate to be used for EAPOL frames.
    
    Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
    Tested-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    [lizf: Backported to 3.4: adjust the if statement]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit ba5369ce52554a2242b60faf3259f297018e4c7d
Author: Johan Hovold <johan@kernel.org>
Date:   Wed Feb 18 10:34:51 2015 +0700

    USB: serial: fix tty-device error handling at probe
    
    commit ca4383a3947a83286bc9b9c598a1f55e867871d7 upstream.
    
    Add missing error handling when registering the tty device at port
    probe. This avoids trying to remove an uninitialised character device
    when the port device is removed.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Reported-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Acked-by: Greg Kroah-Hartman <greg@kroah.com>
    [lizf: Backported to 3.4:
     - adjust context
     - s/goto exit_with_autopm/goto exit]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 97d0aa6b49d5c27495061a7a10c5f743f5c5209e
Author: Johan Hovold <johan@kernel.org>
Date:   Wed Feb 18 10:34:50 2015 +0700

    USB: serial: fix potential use-after-free after failed probe
    
    commit 07fdfc5e9f1c966be8722e8fa927e5ea140df5ce upstream.
    
    Fix return value in probe error path, which could end up returning
    success (0) on errors. This could in turn lead to use-after-free or
    double free (e.g. in port_remove) when the port device is removed.
    
    Fixes: c706ebdfc895 ("USB: usb-serial: call port_probe and port_remove
    at the right times")
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Acked-by: Greg Kroah-Hartman <greg@kroah.com>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit a10ca36cd94e92f3fc6e5702f5d5e09d94a6e073
Author: Mark Glover <mark@actisense.com>
Date:   Fri Feb 13 09:04:39 2015 +0000

    USB: ftdi_sio: add PIDs for Actisense USB devices
    
    commit f6950344d3cf4a1e231b5828b50c4ac168db3886 upstream.
    
    These product identifiers (PID) all deal with marine NMEA format data
    used on motor boats and yachts. We supply the programmed devices to
    Chetco, for use inside their equipment. The PIDs are a direct copy of
    our Windows device drivers (FTDI drivers with altered PIDs).
    
    Signed-off-by: Mark Glover <mark@actisense.com>
    [johan: edit commit message slightly ]
    Signed-off-by: Johan Hovold <johan@kernel.org>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 43cc8e41c1dd958895732b57a7d7429a4f71b8cf
Author: Alan Stern <stern@rowland.harvard.edu>
Date:   Fri Feb 13 10:54:53 2015 -0500

    USB: usbfs: don't leak kernel data in siginfo
    
    commit f0c2b68198589249afd2b1f2c4e8de8c03e19c16 upstream.
    
    When a signal is delivered, the information in the siginfo structure
    is copied to userspace.  Good security practice dicatates that the
    unused fields in this structure should be initialized to 0 so that
    random kernel stack data isn't exposed to the user.  This patch adds
    such an initialization to the two places where usbfs raises signals.
    
    Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
    Reported-by: Dave Mielke <dave@mielke.cc>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit ab4676b693f168645bd78926efb982750378e7b4
Author: Mathias Nyman <mathias.nyman@linux.intel.com>
Date:   Tue Feb 24 18:27:01 2015 +0200

    xhci: Allocate correct amount of scratchpad buffers
    
    commit 6596a926b0b6c80b730a1dd2fa91908e0a539c37 upstream.
    
    Include the high order bit fields for Max scratchpad buffers when
    calculating how many scratchpad buffers are needed.
    
    I'm suprised this hasn't caused more issues, we never allocated more than
    32 buffers even if xhci needed more. Either we got lucky and xhci never
    really used past that area, or then we got enough zeroed dma memory anyway.
    
    Should be backported as far back as possible
    
    Reported-by: Tim Chen <tim.c.chen@linux.intel.com>
    Tested-by: Tim Chen <tim.c.chen@linux.intel.com>
    Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit fac9501744c7451c3dac92e533c1cfd54898f3f3
Author: Paolo Bonzini <pbonzini@redhat.com>
Date:   Thu Feb 12 17:04:47 2015 +0100

    KVM: emulate: fix CMPXCHG8B on 32-bit hosts
    
    commit 4ff6f8e61eb7f96d3ca535c6d240f863ccd6fb7d upstream.
    
    This has been broken for a long time: it broke first in 2.6.35, then was
    almost fixed in 2.6.36 but this one-liner slipped through the cracks.
    The bug shows up as an infinite loop in Windows 7 (and newer) boot on
    32-bit hosts without EPT.
    
    Windows uses CMPXCHG8B to write to page tables, which causes a
    page fault if running without EPT; the emulator is then called from
    kvm_mmu_page_fault.  The loop then happens if the higher 4 bytes are
    not 0; the common case for this is that the NX bit (bit 63) is 1.
    
    Fixes: 6550e1f165f384f3a46b60a1be9aba4bc3c2adad
    Fixes: 16518d5ada690643453eb0aef3cc7841d3623c2d
    Reported-by: Erik Rull <erik.rull@rdsoftware.de>
    Tested-by: Erik Rull <erik.rull@rdsoftware.de>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit c5f69b5aa71551830e142f0897e27ea7b749ed3f
Author: Jiri Pirko <jiri@resnulli.us>
Date:   Mon Feb 23 14:02:54 2015 +0100

    team: fix possible null pointer dereference in team_handle_frame
    
    commit 57e595631904c827cfa1a0f7bbd7cc9a49da5745 upstream.
    
    Currently following race is possible in team:
    
    CPU0                                        CPU1
                                                team_port_del
                                                  team_upper_dev_unlink
                                                    priv_flags &= ~IFF_TEAM_PORT
    team_handle_frame
      team_port_get_rcu
        team_port_exists
          priv_flags & IFF_TEAM_PORT == 0
        return NULL (instead of port got
                     from rx_handler_data)
                                                  netdev_rx_handler_unregister
    
    The thing is that the flag is removed before rx_handler is unregistered.
    If team_handle_frame is called in between, team_port_exists returns 0
    and team_port_get_rcu will return NULL.
    So do not check the flag here. It is guaranteed by netdev_rx_handler_unregister
    that team_handle_frame will always see valid rx_handler_data pointer.
    
    Signed-off-by: Jiri Pirko <jiri@resnulli.us>
    Fixes: 3d249d4ca7d0 ("net: introduce ethernet teaming device")
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit cea9eddd391dcdee27449ba212b2d89832f108ce
Author: Eric Dumazet <edumazet@google.com>
Date:   Sun Feb 15 19:03:45 2015 -0800

    netfilter: xt_socket: fix a stack corruption bug
    
    commit 78296c97ca1fd3b104f12e1f1fbc06c46635990b upstream.
    
    As soon as extract_icmp6_fields() returns, its local storage (automatic
    variables) is deallocated and can be overwritten.
    
    Lets add an additional parameter to make sure storage is valid long
    enough.
    
    While we are at it, adds some const qualifiers.
    
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Fixes: b64c9256a9b76 ("tproxy: added IPv6 support to the socket match")
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 3dc8cc469f67f13128d65493b051bfeeb9178696
Author: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Date:   Fri Feb 27 15:51:56 2015 -0800

    nilfs2: fix potential memory overrun on inode
    
    commit 957ed60b53b519064a54988c4e31e0087e47d091 upstream.
    
    Each inode of nilfs2 stores a root node of a b-tree, and it turned out to
    have a memory overrun issue:
    
    Each b-tree node of nilfs2 stores a set of key-value pairs and the number
    of them (in "bn_nchildren" member of nilfs_btree_node struct), as well as
    a few other "bn_*" members.
    
    Since the value of "bn_nchildren" is used for operations on the key-values
    within the b-tree node, it can cause memory access overrun if a large
    number is incorrectly set to "bn_nchildren".
    
    For instance, nilfs_btree_node_lookup() function determines the range of
    binary search with it, and too large "bn_nchildren" leads
    nilfs_btree_node_get_key() in that function to overrun.
    
    As for intermediate b-tree nodes, this is prevented by a sanity check
    performed when each node is read from a drive, however, no sanity check
    has been done for root nodes stored in inodes.
    
    This patch fixes the issue by adding missing sanity check against b-tree
    root nodes so that it's called when on-memory inodes are read from ifile,
    inode metadata file.
    
    Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 7ea0e7edc3045ee48b962e2fe5444f325f3d8c47
Author: Takashi Iwai <tiwai@suse.de>
Date:   Thu Dec 18 10:02:41 2014 +0100

    ALSA: pcm: Don't leave PREPARED state after draining
    
    commit 70372a7566b5e552dbe48abdac08c275081d8558 upstream.
    
    When a PCM draining is performed to an empty stream that has been
    already in PREPARED state, the current code just ignores and leaves as
    it is, although the drain is supposed to set all such streams to SETUP
    state.  This patch covers that overlooked case.
    
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 1df722f5eca4d75256f4bee1c495f14f0c10892f
Author: Nicolas Saenz Julienne <nicolassaenzj@gmail.com>
Date:   Thu Feb 19 01:52:25 2015 +0000

    gpio: tps65912: fix wrong container_of arguments
    
    commit 2f97c20e5f7c3582c7310f65a04465bfb0fd0e85 upstream.
    
    The gpio_chip operations receive a pointer the gpio_chip struct which is
    contained in the driver's private struct, yet the container_of call in those
    functions point to the mfd struct defined in include/linux/mfd/tps65912.h.
    
    Signed-off-by: Nicolas Saenz Julienne <nicolassaenzj@gmail.com>
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 1519e726ad227cb0823d8965e115bc98d066c172
Author: Al Viro <viro@zeniv.linux.org.uk>
Date:   Sat Feb 21 22:19:57 2015 -0500

    autofs4 copy_dev_ioctl(): keep the value of ->size we'd used for allocation
    
    commit 0a280962dc6e117e0e4baa668453f753579265d9 upstream.
    
    X-Coverup: just ask spender
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 3f02b323742bb69a1ff9b73bc17d88fb63fb64ed
Author: Al Viro <viro@zeniv.linux.org.uk>
Date:   Sat Feb 21 22:05:11 2015 -0500

    debugfs: leave freeing a symlink body until inode eviction
    
    commit 0db59e59299f0b67450c5db21f7f316c8fb04e84 upstream.
    
    As it is, we have debugfs_remove() racing with symlink traversals.
    Supply ->evict_inode() and do freeing there - inode will remain
    pinned until we are done with the symlink body.
    
    And rip the idiocy with checking if dentry is positive right after
    we'd verified debugfs_positive(), which is a stronger check...
    
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    [lizf: Backported to 3.4:
     - call end_writeback() instead of clear_inode()
     - call truncate_inode_pages() instead of truncate_inode_pages_final()]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit bcf9fe97c24187e0590536886281a120e2bfbeba
Author: Jay Lan <jlan@sgi.com>
Date:   Mon Sep 29 15:36:57 2014 -0700

    kdb: fix incorrect counts in KDB summary command output
    
    commit 146755923262037fc4c54abc28c04b1103f3cc51 upstream.
    
    The output of KDB 'summary' command should report MemTotal, MemFree
    and Buffers output in kB. Current codes report in unit of pages.
    
    A define of K(x) as
    is defined in the code, but not used.
    
    This patch would apply the define to convert the values to kB.
    Please include me on Cc on replies. I do not subscribe to linux-kernel.
    
    Signed-off-by: Jay Lan <jlan@sgi.com>
    Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit c42a6c35db2f573ab1f58c9799ea4f41b759602f
Author: Mikulas Patocka <mpatocka@redhat.com>
Date:   Tue Feb 17 14:34:00 2015 -0500

    dm snapshot: fix a possible invalid memory access on unload
    
    commit 22aa66a3ee5b61e0f4a0bfeabcaa567861109ec3 upstream.
    
    When the snapshot target is unloaded, snapshot_dtr() waits until
    pending_exceptions_count drops to zero.  Then, it destroys the snapshot.
    Therefore, the function that decrements pending_exceptions_count
    should not touch the snapshot structure after the decrement.
    
    pending_complete() calls free_pending_exception(), which decrements
    pending_exceptions_count, and then it performs up_write(&s->lock) and it
    calls retry_origin_bios() which dereferences  s->origin.  These two
    memory accesses to the fields of the snapshot may touch the dm_snapshot
    struture after it is freed.
    
    This patch moves the call to free_pending_exception() to the end of
    pending_complete(), so that the snapshot will not be destroyed while
    pending_complete() is in progress.
    
    Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@redhat.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 0a9cc6e9a5f5c91273e2a4fc9f1ce9b832e5ae03
Author: Mikulas Patocka <mpatocka@redhat.com>
Date:   Tue Feb 17 14:30:53 2015 -0500

    dm: fix a race condition in dm_get_md
    
    commit 2bec1f4a8832e74ebbe859f176d8a9cb20dd97f4 upstream.
    
    The function dm_get_md finds a device mapper device with a given dev_t,
    increases the reference count and returns the pointer.
    
    dm_get_md calls dm_find_md, dm_find_md takes _minor_lock, finds the
    device, tests that the device doesn't have DMF_DELETING or DMF_FREEING
    flag, drops _minor_lock and returns pointer to the device. dm_get_md then
    calls dm_get. dm_get calls BUG if the device has the DMF_FREEING flag,
    otherwise it increments the reference count.
    
    There is a possible race condition - after dm_find_md exits and before
    dm_get is called, there are no locks held, so the device may disappear or
    DMF_FREEING flag may be set, which results in BUG.
    
    To fix this bug, we need to call dm_get while we hold _minor_lock. This
    patch renames dm_find_md to dm_get_md and changes it so that it calls
    dm_get while holding the lock.
    
    Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@redhat.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 0dbd8b6b207f284ec35cccba7da5d7de75280406
Author: Mitko Haralanov <mitko.haralanov@intel.com>
Date:   Fri Jan 16 08:55:27 2015 -0500

    IB/qib: Do not write EEPROM
    
    commit 18c0b82a3e4501511b08d0e8676fb08ac08734a3 upstream.
    
    This changeset removes all the code that allows the driver to write to
    the EEPROM and update the recorded error counters and power on hours.
    
    These two stats are unused and writing them exposes a timing risk
    which could leave the EEPROM in a bad state preventing further normal
    operation of the HCA.
    
    Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
    Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com>
    Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
    Signed-off-by: Roland Dreier <roland@purestorage.com>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit c03ef6008ea201e87bd3d34a1a5482105b74c6d7
Author: Tony Battersby <tonyb@cybernetics.com>
Date:   Wed Feb 11 11:32:06 2015 -0500

    sg: fix read() error reporting
    
    commit 3b524a683af8991b4eab4182b947c65f0ce1421b upstream.
    
    Fix SCSI generic read() incorrectly returning success after detecting an
    error.
    
    Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
    Acked-by: Douglas Gilbert <dgilbert@interlog.com>
    Signed-off-by: James Bottomley <JBottomley@Parallels.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 015d061d3e4c9561a9041cfb5c04848ce5f2da55
Author: Minh Duc Tran <MinhDuc.Tran@Emulex.Com>
Date:   Mon Feb 9 18:54:09 2015 +0000

    fixed invalid assignment of 64bit mask to host dma_boundary for scatter gather segment boundary limit.
    
    commit f76a610a8b4b6280eaedf48f3af9d5d74e418b66 upstream.
    
    In reference to bug https://bugzilla.redhat.com/show_bug.cgi?id=1097141
    Assert is seen with AMD cpu whenever calling pci_alloc_consistent.
    
    [   29.406183] ------------[ cut here ]------------
    [   29.410505] kernel BUG at lib/iommu-helper.c:13!
    
    Signed-off-by: Minh Tran <minh.tran@emulex.com>
    Fixes: 6733b39a1301b0b020bbcbf3295852e93e624cb1
    Signed-off-by: James Bottomley <JBottomley@Parallels.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 43f5b8aa31910a2e95aa675fba8154d3741c2496
Author: Martin KaFai Lau <kafai@fb.com>
Date:   Thu Feb 12 16:14:08 2015 -0800

    ipv6: fix ipv6_cow_metrics for non DST_HOST case
    
    commit 3b4711757d7903ab6fa88a9e7ab8901b8227da60 upstream.
    
    ipv6_cow_metrics() currently assumes only DST_HOST routes require
    dynamic metrics allocation from inetpeer.  The assumption breaks
    when ndisc discovered router with RTAX_MTU and RTAX_HOPLIMIT metric.
    Refer to ndisc_router_discovery() in ndisc.c and note that dst_metric_set()
    is called after the route is created.
    
    This patch creates the metrics array (by calling dst_cow_metrics_generic) in
    ipv6_cow_metrics().
    
    Test:
    radvd.conf:
    interface qemubr0
    {
    	AdvLinkMTU 1300;
    	AdvCurHopLimit 30;
    
    	prefix fd00:face:face:face::/64
    	{
    		AdvOnLink on;
    		AdvAutonomous on;
    		AdvRouterAddr off;
    	};
    };
    
    Before:
    [root@qemu1 ~]# ip -6 r show | egrep -v unreachable
    fd00:face:face:face::/64 dev eth0  proto kernel  metric 256  expires 27sec
    fe80::/64 dev eth0  proto kernel  metric 256
    default via fe80::74df:d0ff:fe23:8ef2 dev eth0  proto ra  metric 1024  expires 27sec
    
    After:
    [root@qemu1 ~]# ip -6 r show | egrep -v unreachable
    fd00:face:face:face::/64 dev eth0  proto kernel  metric 256  expires 27sec mtu 1300
    fe80::/64 dev eth0  proto kernel  metric 256  mtu 1300
    default via fe80::74df:d0ff:fe23:8ef2 dev eth0  proto ra  metric 1024  expires 27sec mtu 1300 hoplimit 30
    
    Fixes: 8e2ec639173f325 (ipv6: don't use inetpeer to store metrics for routes.)
    Signed-off-by: Martin KaFai Lau <kafai@fb.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 5fdef42d3d22712fe8fc2ae0a389f8a95b4e2277
Author: Darrick J. Wong <darrick.wong@oracle.com>
Date:   Fri Feb 13 11:05:37 2015 -0800

    dm io: reject unsupported DISCARD requests with EOPNOTSUPP
    
    commit 37527b869207ad4c208b1e13967d69b8bba1fbf9 upstream.
    
    I created a dm-raid1 device backed by a device that supports DISCARD
    and another device that does NOT support DISCARD with the following
    dm configuration:
    
     #  echo '0 2048 mirror core 1 512 2 /dev/sda 0 /dev/sdb 0' | dmsetup create moo
     # lsblk -D
     NAME         DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO
     sda                 0        4K       1G         0
     `-moo (dm-0)        0        4K       1G         0
     sdb                 0        0B       0B         0
     `-moo (dm-0)        0        4K       1G         0
    
    Notice that the mirror device /dev/mapper/moo advertises DISCARD
    support even though one of the mirror halves doesn't.
    
    If I issue a DISCARD request (via fstrim, mount -o discard, or ioctl
    BLKDISCARD) through the mirror, kmirrord gets stuck in an infinite
    loop in do_region() when it tries to issue a DISCARD request to sdb.
    The problem is that when we call do_region() against sdb, num_sectors
    is set to zero because q->limits.max_discard_sectors is zero.
    Therefore, "remaining" never decreases and the loop never terminates.
    
    To fix this: before entering the loop, check for the combination of
    REQ_DISCARD and no discard and return -EOPNOTSUPP to avoid hanging up
    the mirror device.
    
    This bug was found by the unfortunate coincidence of pvmove and a
    discard operation in the RHEL 6.5 kernel; upstream is also affected.
    
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
    Acked-by: "Martin K. Petersen" <martin.petersen@oracle.com>
    Signed-off-by: Mike Snitzer <snitzer@redhat.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 4d9b3860290c935496407f17888f528d01335cca
Author: Mikulas Patocka <mpatocka@redhat.com>
Date:   Thu Feb 12 10:09:20 2015 -0500

    dm mirror: do not degrade the mirror on discard error
    
    commit f2ed51ac64611d717d1917820a01930174c2f236 upstream.
    
    It may be possible that a device claims discard support but it rejects
    discards with -EOPNOTSUPP.  It happens when using loopback on ext2/ext3
    filesystem driven by the ext4 driver.  It may also happen if the
    underlying devices are moved from one disk on another.
    
    If discard error happens, we reject the bio with -EOPNOTSUPP, but we do
    not degrade the array.
    
    This patch fixes failed test shell/lvconvert-repair-transient.sh in the
    lvm2 testsuite if the testsuite is extracted on an ext2 or ext3
    filesystem and it is being driven by the ext4 driver.
    
    Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
    Signed-off-by: Mike Snitzer <snitzer@redhat.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 0fd0db3abbe16d32fbf41214dca9107c4c4f01f7
Author: Chen Jie <chenjie6@huawei.com>
Date:   Tue Feb 10 12:49:48 2015 -0800

    jffs2: fix handling of corrupted summary length
    
    commit 164c24063a3eadee11b46575c5482b2f1417be49 upstream.
    
    sm->offset maybe wrong but magic maybe right, the offset do not have CRC.
    
    Badness at c00c7580 [verbose debug info unavailable]
    NIP: c00c7580 LR: c00c718c CTR: 00000014
    REGS: df07bb40 TRAP: 0700   Not tainted  (2.6.34.13-WR4.3.0.0_standard)
    MSR: 00029000 <EE,ME,CE>  CR: 22084f84  XER: 00000000
    TASK = df84d6e0[908] 'mount' THREAD: df07a000
    GPR00: 00000001 df07bbf0 df84d6e0 00000000 00000001 00000000 df07bb58 00000041
    GPR08: 00000041 c0638860 00000000 00000010 22084f88 100636c8 df814ff8 00000000
    GPR16: df84d6e0 dfa558cc c05adb90 00000048 c0452d30 00000000 000240d0 000040d0
    GPR24: 00000014 c05ae734 c05be2e0 00000000 00000001 00000000 00000000 c05ae730
    NIP [c00c7580] __alloc_pages_nodemask+0x4d0/0x638
    LR [c00c718c] __alloc_pages_nodemask+0xdc/0x638
    Call Trace:
    [df07bbf0] [c00c718c] __alloc_pages_nodemask+0xdc/0x638 (unreliable)
    [df07bc90] [c00c7708] __get_free_pages+0x20/0x48
    [df07bca0] [c00f4a40] __kmalloc+0x15c/0x1ec
    [df07bcd0] [c01fc880] jffs2_scan_medium+0xa58/0x14d0
    [df07bd70] [c01ff38c] jffs2_do_mount_fs+0x1f4/0x6b4
    [df07bdb0] [c020144c] jffs2_do_fill_super+0xa8/0x260
    [df07bdd0] [c020230c] jffs2_fill_super+0x104/0x184
    [df07be00] [c0335814] get_sb_mtd_aux+0x9c/0xec
    [df07be20] [c033596c] get_sb_mtd+0x84/0x1e8
    [df07be60] [c0201ed0] jffs2_get_sb+0x1c/0x2c
    [df07be70] [c0103898] vfs_kern_mount+0x78/0x1e8
    [df07bea0] [c0103a58] do_kern_mount+0x40/0x100
    [df07bec0] [c011fe90] do_mount+0x240/0x890
    [df07bf10] [c0120570] sys_mount+0x90/0xd8
    [df07bf40] [c00110d8] ret_from_syscall+0x0/0x4
    
    === Exception: c01 at 0xff61a34
        LR = 0x100135f0
    Instruction dump:
    38800005 38600000 48010f41 4bfffe1c 4bfc2d15 4bfffe8c 72e90200 4082fc28
    3d20c064 39298860 8809000d 68000001 <0f000000> 2f800000 419efc0c 38000001
    mount: mounting /dev/mtdblock3 on /common failed: Input/output error
    
    Signed-off-by: Chen Jie <chenjie6@huawei.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 0f86e13f61bd10a726b43120e6b0f52ca5791c22
Author: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Date:   Tue Feb 10 11:33:50 2015 +0100

    ALSA: hdspm - Constrain periods to 2 on older cards
    
    commit f0153c3d948c1764f6c920a0675d86fc1d75813e upstream.
    
    RME RayDAT and AIO use a fixed buffer size of 16384 samples. With period
    sizes of 32-4096, this translates to 4-512 periods.
    
    The older RME cards have a variable buffer size but require exactly two
    periods.
    
    This patch enforces nperiods=2 on those cards.
    
    Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 1bf24045307f7accabac0684eb7b695d3e1aa6be
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Wed Feb 11 18:34:36 2015 -0500

    drm/radeon/dp: Set EDP_CONFIGURATION_SET for bridge chips if necessary
    
    commit 66c2b84ba6256bc5399eed45582af9ebb3ba2c15 upstream.
    
    Don't restrict it to just eDP panels.  Some LVDS bridge chips require
    this.  Fixes blank panels on resume on certain laptops.  Noticed
    by mrnuke on IRC.
    
    bug:
    https://bugs.freedesktop.org/show_bug.cgi?id=42960
    
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 601391cbb6334533d6fde4e81f40b53b5f85d73b
Author: Grazvydas Ignotas <notasas@gmail.com>
Date:   Thu Feb 12 15:00:19 2015 -0800

    mm/memory.c: actually remap enough memory
    
    commit 9cb12d7b4ccaa976f97ce0c5fd0f1b6a83bc2a75 upstream.
    
    For whatever reason, generic_access_phys() only remaps one page, but
    actually allows to access arbitrary size.  It's quite easy to trigger
    large reads, like printing out large structure with gdb, which leads to a
    crash.  Fix it by remapping correct size.
    
    Fixes: 28b2ee20c7cb ("access_process_vm device memory infrastructure")
    Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
    Cc: 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: Zefan Li <lizefan@huawei.com>

commit 0484ec07d706577b751c58dbb4df662761d098c6
Author: Nicholas Bellinger <nab@linux-iscsi.org>
Date:   Thu Jan 22 00:56:53 2015 -0800

    iscsi-target: Drop problematic active_ts_list usage
    
    commit 3fd7b60f2c7418239d586e359e0c6d8503e10646 upstream.
    
    This patch drops legacy active_ts_list usage within iscsi_target_tq.c
    code.  It was originally used to track the active thread sets during
    iscsi-target shutdown, and is no longer used by modern upstream code.
    
    Two people have reported list corruption using traditional iscsi-target
    and iser-target with the following backtrace, that appears to be related
    to iscsi_thread_set->ts_list being used across both active_ts_list and
    inactive_ts_list.
    
    [   60.782534] ------------[ cut here ]------------
    [   60.782543] WARNING: CPU: 0 PID: 9430 at lib/list_debug.c:53 __list_del_entry+0x63/0xd0()
    [   60.782545] list_del corruption, ffff88045b00d180->next is LIST_POISON1 (dead000000100100)
    [   60.782546] Modules linked in: ib_srpt tcm_qla2xxx qla2xxx tcm_loop tcm_fc libfc scsi_transport_fc scsi_tgt ib_isert rdma_cm iw_cm ib_addr iscsi_target_mod target_core_pscsi target_core_file target_core_iblock target_core_mod configfs ebtable_nat ebtables ipt_MASQUERADE iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 ipt_REJECT xt_CHECKSUM iptable_mangle iptable_filter ip_tables bridge stp llc autofs4 sunrpc ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables ipv6 ib_ipoib ib_cm ib_uverbs ib_umad mlx4_en mlx4_ib ib_sa ib_mad ib_core mlx4_core dm_mirror dm_region_hash dm_log dm_mod vhost_net macvtap macvlan vhost tun kvm_intel kvm uinput iTCO_wdt iTCO_vendor_support microcode serio_raw pcspkr sb_edac edac_core sg i2c_i801 lpc_ich mfd_core mtip32xx igb i2c_algo_bit i2c_core ptp pps_core ioatdma dca wmi ext3(F) jbd(F) mbcache(F) sd_mod(F) crc_t10dif(F) crct10dif_common(F) ahci(F) libahci(F) isci(F) libsas(F) scsi_transport_sas(F) [last unloaded: speedstep_lib]
    [   60.782597] CPU: 0 PID: 9430 Comm: iscsi_ttx Tainted: GF 3.12.19+ #2
    [   60.782598] Hardware name: Supermicro X9DRX+-F/X9DRX+-F, BIOS 3.00 07/09/2013
    [   60.782599]  0000000000000035 ffff88044de31d08 ffffffff81553ae7 0000000000000035
    [   60.782602]  ffff88044de31d58 ffff88044de31d48 ffffffff8104d1cc 0000000000000002
    [   60.782605]  ffff88045b00d180 ffff88045b00d0c0 ffff88045b00d0c0 ffff88044de31e58
    [   60.782607] Call Trace:
    [   60.782611]  [<ffffffff81553ae7>] dump_stack+0x49/0x62
    [   60.782615]  [<ffffffff8104d1cc>] warn_slowpath_common+0x8c/0xc0
    [   60.782618]  [<ffffffff8104d2b6>] warn_slowpath_fmt+0x46/0x50
    [   60.782620]  [<ffffffff81280933>] __list_del_entry+0x63/0xd0
    [   60.782622]  [<ffffffff812809b1>] list_del+0x11/0x40
    [   60.782630]  [<ffffffffa06e7cf9>] iscsi_del_ts_from_active_list+0x29/0x50 [iscsi_target_mod]
    [   60.782635]  [<ffffffffa06e87b1>] iscsi_tx_thread_pre_handler+0xa1/0x180 [iscsi_target_mod]
    [   60.782642]  [<ffffffffa06fb9ae>] iscsi_target_tx_thread+0x4e/0x220 [iscsi_target_mod]
    [   60.782647]  [<ffffffffa06fb960>] ? iscsit_handle_snack+0x190/0x190 [iscsi_target_mod]
    [   60.782652]  [<ffffffffa06fb960>] ? iscsit_handle_snack+0x190/0x190 [iscsi_target_mod]
    [   60.782655]  [<ffffffff8106f99e>] kthread+0xce/0xe0
    [   60.782657]  [<ffffffff8106f8d0>] ? kthread_freezable_should_stop+0x70/0x70
    [   60.782660]  [<ffffffff8156026c>] ret_from_fork+0x7c/0xb0
    [   60.782662]  [<ffffffff8106f8d0>] ? kthread_freezable_should_stop+0x70/0x70
    [   60.782663] ---[ end trace 9662f4a661d33965 ]---
    
    Since this code is no longer used, go ahead and drop the problematic usage
    all-together.
    
    Reported-by: Gavin Guo <gavin.guo@canonical.com>
    Reported-by: Moussa Ba <moussaba@micron.com>
    Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit edc438c180faa9053f94f9ea5149c2be20c5126c
Author: Roman Gushchin <klamm@yandex-team.ru>
Date:   Wed Feb 11 15:28:42 2015 -0800

    mm/nommu.c: fix arithmetic overflow in __vm_enough_memory()
    
    commit 8138a67a5557ffea3a21dfd6f037842d4e748513 upstream.
    
    I noticed that "allowed" can easily overflow by falling below 0, because
    (total_vm / 32) can be larger than "allowed".  The problem occurs in
    OVERCOMMIT_NONE mode.
    
    In this case, a huge allocation can success and overcommit the system
    (despite OVERCOMMIT_NONE mode).  All subsequent allocations will fall
    (system-wide), so system become unusable.
    
    The problem was masked out by commit c9b1d0981fcc
    ("mm: limit growth of 3% hardcoded other user reserve"),
    but it's easy to reproduce it on older kernels:
    1) set overcommit_memory sysctl to 2
    2) mmap() large file multiple times (with VM_SHARED flag)
    3) try to malloc() large amount of memory
    
    It also can be reproduced on newer kernels, but miss-configured
    sysctl_user_reserve_kbytes is required.
    
    Fix this issue by switching to signed arithmetic here.
    
    Signed-off-by: Roman Gushchin <klamm@yandex-team.ru>
    Cc: Andrew Shewmaker <agshew@gmail.com>
    Cc: Rik van Riel <riel@redhat.com>
    Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    [lizf: Backported to 3.4:
     - adjust context
     - there's no variable reserve]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit dcdcb2bd6bc0e49f1d38f25b729bf51ea743569d
Author: Roman Gushchin <klamm@yandex-team.ru>
Date:   Wed Feb 11 15:28:39 2015 -0800

    mm/mmap.c: fix arithmetic overflow in __vm_enough_memory()
    
    commit 5703b087dc8eaf47bfb399d6cf512d471beff405 upstream.
    
    I noticed, that "allowed" can easily overflow by falling below 0,
    because (total_vm / 32) can be larger than "allowed".  The problem
    occurs in OVERCOMMIT_NONE mode.
    
    In this case, a huge allocation can success and overcommit the system
    (despite OVERCOMMIT_NONE mode).  All subsequent allocations will fall
    (system-wide), so system become unusable.
    
    The problem was masked out by commit c9b1d0981fcc
    ("mm: limit growth of 3% hardcoded other user reserve"),
    but it's easy to reproduce it on older kernels:
    1) set overcommit_memory sysctl to 2
    2) mmap() large file multiple times (with VM_SHARED flag)
    3) try to malloc() large amount of memory
    
    It also can be reproduced on newer kernels, but miss-configured
    sysctl_user_reserve_kbytes is required.
    
    Fix this issue by switching to signed arithmetic here.
    
    [akpm@linux-foundation.org: use min_t]
    Signed-off-by: Roman Gushchin <klamm@yandex-team.ru>
    Cc: Andrew Shewmaker <agshew@gmail.com>
    Cc: Rik van Riel <riel@redhat.com>
    Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
    Reviewed-by: Michal Hocko <mhocko@suse.cz>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    [lizf: Backported to 3.4:
     - adjust context
     - there's no variable reserve]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 2a4edc62b38380cd464fc4b65524f626bf76fb1f
Author: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Date:   Wed Feb 11 15:25:32 2015 -0800

    mm/hugetlb: add migration entry check in __unmap_hugepage_range
    
    commit 9fbc1f635fd0bd28cb32550211bf095753ac637a upstream.
    
    If __unmap_hugepage_range() tries to unmap the address range over which
    hugepage migration is on the way, we get the wrong page because pte_page()
    doesn't work for migration entries.  This patch simply clears the pte for
    migration entries as we do for hwpoison entries.
    
    Fixes: 290408d4a2 ("hugetlb: hugepage migration core")
    Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
    Cc: Hugh Dickins <hughd@google.com>
    Cc: James Hogan <james.hogan@imgtec.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Mel Gorman <mel@csn.ul.ie>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Michal Hocko <mhocko@suse.cz>
    Cc: Rik van Riel <riel@redhat.com>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Cc: Luiz Capitulino <lcapitulino@redhat.com>
    Cc: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
    Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
    Cc: Steve Capper <steve.capper@linaro.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    [lizf: Backported to 3.4:
     - adjust context
     - update the comment that we doesn't clear pte here]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 13645c4a38db7bedb1e8cbb08ec861648507c448
Author: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Date:   Wed Feb 11 15:25:28 2015 -0800

    mm/hugetlb: add migration/hwpoisoned entry check in hugetlb_change_protection
    
    commit a8bda28d87c38c6aa93de28ba5d30cc18e865a11 upstream.
    
    There is a race condition between hugepage migration and
    change_protection(), where hugetlb_change_protection() doesn't care about
    migration entries and wrongly overwrites them.  That causes unexpected
    results like kernel crash.  HWPoison entries also can cause the same
    problem.
    
    This patch adds is_hugetlb_entry_(migration|hwpoisoned) check in this
    function to do proper actions.
    
    Fixes: 290408d4a2 ("hugetlb: hugepage migration core")
    Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
    Cc: Hugh Dickins <hughd@google.com>
    Cc: James Hogan <james.hogan@imgtec.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Mel Gorman <mel@csn.ul.ie>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Michal Hocko <mhocko@suse.cz>
    Cc: Rik van Riel <riel@redhat.com>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Cc: Luiz Capitulino <lcapitulino@redhat.com>
    Cc: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
    Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
    Cc: Steve Capper <steve.capper@linaro.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    [lizf: Backported to 3.4:
     - remove locking of ptl
     - remove counting of pages]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 027d8328b2d76be08e8e6b716f403ef917fdc8ec
Author: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Date:   Wed Feb 11 15:25:25 2015 -0800

    mm/hugetlb: fix getting refcount 0 page in hugetlb_fault()
    
    commit 0f792cf949a0be506c2aa8bfac0605746b146dda upstream.
    
    When running the test which causes the race as shown in the previous patch,
    we can hit the BUG "get_page() on refcount 0 page" in hugetlb_fault().
    
    This race happens when pte turns into migration entry just after the first
    check of is_hugetlb_entry_migration() in hugetlb_fault() passed with false.
    To fix this, we need to check pte_present() again after huge_ptep_get().
    
    This patch also reorders taking ptl and doing pte_page(), because
    pte_page() should be done in ptl.  Due to this reordering, we need use
    trylock_page() in page != pagecache_page case to respect locking order.
    
    Fixes: 66aebce747ea ("hugetlb: fix race condition in hugetlb_fault()")
    Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
    Cc: Hugh Dickins <hughd@google.com>
    Cc: James Hogan <james.hogan@imgtec.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Mel Gorman <mel@csn.ul.ie>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Michal Hocko <mhocko@suse.cz>
    Cc: Rik van Riel <riel@redhat.com>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Cc: Luiz Capitulino <lcapitulino@redhat.com>
    Cc: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
    Cc: Lee Schermerhorn <lee.schermerhorn@hp.com>
    Cc: Steve Capper <steve.capper@linaro.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    [lizf: Backported to 3.4:
     - adjust context
     - there's no huge_pte_lock, so lock mm->page_table_lock directly
     - the lable should be out_page_table_lock instead of out_ptl]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 73cee5a80cb8cc1f093e57a62c3b7ca9196a547b
Author: Mikulas Patocka <mpatocka@redhat.com>
Date:   Mon Feb 9 13:38:17 2015 -0500

    cpufreq: speedstep-smi: enable interrupts when waiting
    
    commit d4d4eda23794c701442e55129dd4f8f2fefd5e4d upstream.
    
    On Dell Latitude C600 laptop with Pentium 3 850MHz processor, the
    speedstep-smi driver sometimes loads and sometimes doesn't load with
    "change to state X failed" message.
    
    The hardware sometimes refuses to change frequency and in this case, we
    need to retry later. I found out that we need to enable interrupts while
    waiting. When we enable interrupts, the hardware blockage that prevents
    frequency transition resolves and the transition is possible. With
    disabled interrupts, the blockage doesn't resolve (no matter how long do
    we wait). The exact reasons for this hardware behavior are unknown.
    
    This patch enables interrupts in the function speedstep_set_state that can
    be called with disabled interrupts. However, this function is called with
    disabled interrupts only from speedstep_get_freqs, so it shouldn't cause
    any problem.
    
    Signed-off-by: Mikulas Patocka <mpatocka@redhat.com
    Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 9c71f4c287aeedfe75efa7280537c1368b5a9e13
Author: Trond Myklebust <trond.myklebust@primarydata.com>
Date:   Wed Feb 11 17:27:55 2015 -0500

    NFSv4.1: Fix a kfree() of uninitialised pointers in decode_cb_sequence_args
    
    commit d8ba1f971497c19cf80da1ea5391a46a5f9fbd41 upstream.
    
    If the call to decode_rc_list() fails due to a memory allocation error,
    then we need to truncate the array size to ensure that we only call
    kfree() on those pointer that were allocated.
    
    Reported-by: David Ramos <daramos@stanford.edu>
    Fixes: 4aece6a19cf7f ("nfs41: cb_sequence xdr implementation")
    Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit c93fc8932e95ace45c35fe7a7220acd866bc5ae0
Author: Jan Kara <jack@suse.cz>
Date:   Tue Feb 10 14:08:32 2015 -0800

    fsnotify: fix handling of renames in audit
    
    commit 6ee8e25fc3e916193bce4ebb43d5439e1e2144ab upstream.
    
    Commit e9fd702a58c4 ("audit: convert audit watches to use fsnotify
    instead of inotify") broke handling of renames in audit.  Audit code
    wants to update inode number of an inode corresponding to watched name
    in a directory.  When something gets renamed into a directory to a
    watched name, inotify previously passed moved inode to audit code
    however new fsnotify code passes directory inode where the change
    happened.  That confuses audit and it starts watching parent directory
    instead of a file in a directory.
    
    This can be observed for example by doing:
    
      cd /tmp
      touch foo bar
      auditctl -w /tmp/foo
      touch foo
      mv bar foo
      touch foo
    
    In audit log we see events like:
    
      type=CONFIG_CHANGE msg=audit(1423563584.155:90): auid=1000 ses=2 op="updated rules" path="/tmp/foo" key=(null) list=4 res=1
      ...
      type=PATH msg=audit(1423563584.155:91): item=2 name="bar" inode=1046884 dev=08:0 2 mode=0100644 ouid=0 ogid=0 rdev=00:00 nametype=DELETE
      type=PATH msg=audit(1423563584.155:91): item=3 name="foo" inode=1046842 dev=08:0 2 mode=0100644 ouid=0 ogid=0 rdev=00:00 nametype=DELETE
      type=PATH msg=audit(1423563584.155:91): item=4 name="foo" inode=1046884 dev=08:0 2 mode=0100644 ouid=0 ogid=0 rdev=00:00 nametype=CREATE
      ...
    
    and that's it - we see event for the first touch after creating the
    audit rule, we see events for rename but we don't see any event for the
    last touch.  However we start seeing events for unrelated stuff
    happening in /tmp.
    
    Fix the problem by passing moved inode as data in the FS_MOVED_FROM and
    FS_MOVED_TO events instead of the directory where the change happens.
    This doesn't introduce any new problems because noone besides
    audit_watch.c cares about the passed value:
    
      fs/notify/fanotify/fanotify.c cares only about FSNOTIFY_EVENT_PATH events.
      fs/notify/dnotify/dnotify.c doesn't care about passed 'data' value at all.
      fs/notify/inotify/inotify_fsnotify.c uses 'data' only for FSNOTIFY_EVENT_PATH.
      kernel/audit_tree.c doesn't care about passed 'data' at all.
      kernel/audit_watch.c expects moved inode as 'data'.
    
    Fixes: e9fd702a58c49db ("audit: convert audit watches to use fsnotify instead of inotify")
    Signed-off-by: Jan Kara <jack@suse.cz>
    Cc: Paul Moore <paul@paul-moore.com>
    Cc: Eric Paris <eparis@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 26ea9e4d43a01bb161276648b6e306322ed1da1c
Author: Dan Carpenter <dan.carpenter@oracle.com>
Date:   Mon Feb 9 16:51:40 2015 +0300

    ALSA: off by one bug in snd_riptide_joystick_probe()
    
    commit e4940626defdf6c92da1052ad3f12741c1a28c90 upstream.
    
    The problem here is that we check:
    
    	if (dev >= SNDRV_CARDS)
    
    Then we increment "dev".
    
           if (!joystick_port[dev++])
    
    Then we use it as an offset into a array with SNDRV_CARDS elements.
    
    	if (!request_region(joystick_port[dev], 8, "Riptide gameport")) {
    
    This has 3 effects:
    1) If you use the module option to specify the joystick port then it has
       to be shifted one space over.
    2) The wrong error message will be printed on failure if you have over
       32 cards.
    3) Static checkers will correctly complain that are off by one.
    
    Fixes: db1005ec6ff8 ('ALSA: riptide - Fix joystick resource handling')
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 1f18b8072286b6fea3d5d2ac938d7631586b14c6
Author: Daniel Borkmann <daniel@iogearbox.net>
Date:   Thu Feb 5 18:44:04 2015 +0100

    rtnetlink: ifla_vf_policy: fix misuses of NLA_BINARY
    
    commit 364d5716a7adb91b731a35765d369602d68d2881 upstream.
    
    ifla_vf_policy[] is wrong in advertising its individual member types as
    NLA_BINARY since .type = NLA_BINARY in combination with .len declares the
    len member as *max* attribute length [0, len].
    
    The issue is that when do_setvfinfo() is being called to set up a VF
    through ndo handler, we could set corrupted data if the attribute length
    is less than the size of the related structure itself.
    
    The intent is exactly the opposite, namely to make sure to pass at least
    data of minimum size of len.
    
    Fixes: ebc08a6f47ee ("rtnetlink: Add VF config code to rtnetlink")
    Cc: Mitch Williams <mitch.a.williams@intel.com>
    Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Acked-by: Thomas Graf <tgraf@suug.ch>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    [lizf: Backported to 3.4: drop changes to IFLA_VF_RATE and IFLA_VF_LINK_STATE]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 328f3cf196cdc78283fd7a7b2d6b7c7449a956f4
Author: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Date:   Wed Feb 4 00:21:13 2015 +0300

    ath5k: fix spontaneus AR5312 freezes
    
    commit 8bfae4f9938b6c1f033a5159febe97e441d6d526 upstream.
    
    Sometimes while CPU have some load and ath5k doing the wireless
    interface reset the whole WiSoC completely freezes. Set of tests shows
    that using atomic delay function while we wait interface reset helps to
    avoid such freezes.
    
    The easiest way to reproduce this issue: create a station interface,
    start continous scan with wpa_supplicant and load CPU by something. Or
    just create multiple station interfaces and put them all in continous
    scan.
    
    This patch partially reverts the commit 1846ac3dbec0 ("ath5k: Use
    usleep_range where possible"), which replaces initial udelay()
    by usleep_range().
    
    I do not know actual source of this issue, but all looks like that HW
    freeze is caused by transaction on internal SoC bus, while wireless
    block is in reset state.
    
    Also I should note that I do not know how many chips are affected, but I
    did not see this issue with chips, other than AR5312.
    
    CC: Jiri Slaby <jirislaby@gmail.com>
    CC: Nick Kossifidis <mickflemm@gmail.com>
    CC: Luis R. Rodriguez <mcgrof@do-not-panic.com>
    Fixes: 1846ac3dbec0 ("ath5k: Use usleep_range where possible")
    Reported-by: Christophe Prevotaux <c.prevotaux@rural-networks.com>
    Tested-by: Christophe Prevotaux <c.prevotaux@rural-networks.com>
    Tested-by: Eric Bree <ebree@nltinc.com>
    Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
    Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 39343b59730f4559577f03992cf2763fd1043469
Author: Peter Hurley <peter@hurleysoftware.com>
Date:   Mon Jan 19 13:05:03 2015 -0500

    tty: Prevent untrappable signals from malicious program
    
    commit 37480a05685ed5b8e1b9bf5e5c53b5810258b149 upstream.
    
    Commit 26df6d13406d1a5 ("tty: Add EXTPROC support for LINEMODE")
    allows a process which has opened a pty master to send _any_ signal
    to the process group of the pty slave. Although potentially
    exploitable by a malicious program running a setuid program on
    a pty slave, it's unknown if this exploit currently exists.
    
    Limit to signals actually used.
    
    Cc: Theodore Ts'o <tytso@mit.edu>
    Cc: Howard Chu <hyc@symas.com>
    Cc: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
    Cc: Jiri Slaby <jslaby@suse.cz>
    Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 68e9176bf7429cce8ed93859a1995f2d0f3ca209
Author: Nicolas Pitre <nicolas.pitre@linaro.org>
Date:   Fri Jan 23 17:07:21 2015 -0500

    vt: provide notifications on selection changes
    
    commit 19e3ae6b4f07a87822c1c9e7ed99d31860e701af upstream.
    
    The vcs device's poll/fasync support relies on the vt notifier to signal
    changes to the screen content.  Notifier invocations were missing for
    changes that comes through the selection interface though.  Fix that.
    
    Tested with BRLTTY 5.2.
    
    Signed-off-by: Nicolas Pitre <nico@linaro.org>
    Cc: Dave Mielke <dave@mielke.cc>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit c415c7ab984b1bc1f0fd760784e436df1b6d3132
Author: Alan Stern <stern@rowland.harvard.edu>
Date:   Fri Jan 30 12:58:26 2015 -0500

    USB: fix use-after-free bug in usb_hcd_unlink_urb()
    
    commit c99197902da284b4b723451c1471c45b18537cde upstream.
    
    The usb_hcd_unlink_urb() routine in hcd.c contains two possible
    use-after-free errors.  The dev_dbg() statement at the end of the
    routine dereferences urb and urb->dev even though both structures may
    have been deallocated.
    
    This patch fixes the problem by storing urb->dev in a local variable
    (avoiding the dereference of urb) and moving the dev_dbg() up before
    the usb_put_dev() call.
    
    Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
    Reported-by: Joe Lawrence <joe.lawrence@stratus.com>
    Tested-by: Joe Lawrence <joe.lawrence@stratus.com>
    Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 019b694fbccafebc550a7b1fcb3bb13e9b32ae03
Author: Alan Stern <stern@rowland.harvard.edu>
Date:   Thu Jan 29 15:05:04 2015 -0500

    USB: add flag for HCDs that can't receive wakeup requests (isp1760-hcd)
    
    commit 074f9dd55f9cab1b82690ed7e44bcf38b9616ce0 upstream.
    
    Currently the USB stack assumes that all host controller drivers are
    capable of receiving wakeup requests from downstream devices.
    However, this isn't true for the isp1760-hcd driver, which means that
    it isn't safe to do a runtime suspend of any device attached to a
    root-hub port if the device requires wakeup.
    
    This patch adds a "cant_recv_wakeups" flag to the usb_hcd structure
    and sets the flag in isp1760-hcd.  The core is modified to prevent a
    direct child of the root hub from being put into runtime suspend with
    wakeup enabled if the flag is set.
    
    Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
    Tested-by: Nicolas Pitre <nico@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit a54c78b91ad0058aef14fd4804e5d6f8e253cf2b
Author: Oliver Neukum <oneukum@suse.de>
Date:   Wed Jan 28 11:14:55 2015 +0100

    cdc-acm: add sanity checks
    
    commit 7e860a6e7aa62b337a61110430cd633db5b0d2dd upstream.
    
    Check the special CDC headers for a plausible minimum length.
    Another big operating systems ignores such garbage.
    
    Signed-off-by: Oliver Neukum <oneukum@suse.de>
    Reviewed-by: Adam Lee <adam8157@gmail.com>
    Tested-by: Adam Lee <adam8157@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit b13026256c16200b53d251ab27f610712407721f
Author: Chuck Lever <chuck.lever@oracle.com>
Date:   Wed Jan 21 11:03:19 2015 -0500

    xprtrdma: Free the pd if ib_query_qp() fails
    
    commit 5ae711a24601257f395c1f8746ac95be0cbd75e5 upstream.
    
    If ib_query_qp() fails or the memory registration mode isn't
    supported, don't leak the PD. An orphaned IB/core resource will
    cause IB module removal to hang.
    
    Fixes: bd7ed1d13304 ("RPC/RDMA: check selected memory registration ...")
    Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
    Reviewed-by: Steve Wise <swise@opengridcomputing.com>
    Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
    [lizf: Backported to 3.4: only two goto statements need to be changed]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 16d67beba92a80d8c766834ea01cdd040d9ff6df
Author: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Date:   Thu Jan 15 03:06:22 2015 +0100

    ARM: 8284/1: sa1100: clear RCSR_SMR on resume
    
    commit e461894dc2ce7778ccde1c3483c9b15a85a7fc5f upstream.
    
    StrongARM core uses RCSR SMR bit to tell to bootloader that it was reset
    by entering the sleep mode. After we have resumed, there is little point
    in having that bit enabled. Moreover, if this bit is set before reboot,
    the bootloader can become confused. Thus clear the SMR bit on resume
    just before clearing the scratchpad (resume address) register.
    
    Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
    Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit d2848d647b5ac1be9dfd46c634bcd667ea76ed7e
Author: Ian Abbott <abbotti@mev.co.uk>
Date:   Tue Jan 27 18:16:51 2015 +0000

    staging: comedi: comedi_compat32.c: fix COMEDI_CMD copy back
    
    commit 42b8ce6f55facfa101462e694d33fc6bca471138 upstream.
    
    `do_cmd_ioctl()` in "comedi_fops.c" handles the `COMEDI_CMD` ioctl.
    This returns `-EAGAIN` if it has copied a modified `struct comedi_cmd`
    back to user-space.  (This occurs when the low-level Comedi driver's
    `do_cmdtest()` handler returns non-zero to indicate a problem with the
    contents of the `struct comedi_cmd`, or when the `struct comedi_cmd` has
    the `CMDF_BOGUS` flag set.)
    
    `compat_cmd()` in "comedi_compat32.c" handles the 32-bit compatible
    version of the `COMEDI_CMD` ioctl.  Currently, it never copies a 32-bit
    compatible version of `struct comedi_cmd` back to user-space, which is
    at odds with the way the regular `COMEDI_CMD` ioctl is handled.  To fix
    it, change `compat_cmd()` to copy a 32-bit compatible version of the
    `struct comedi_cmd` back to user-space when the main ioctl handler
    returns `-EAGAIN`.
    
    Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
    Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 71ff678d407c318017a92e24da14e01a989814c0
Author: Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
Date:   Wed Jan 21 15:24:27 2015 -0500

    USB: cp210x: add ID for RUGGEDCOM USB Serial Console
    
    commit a6f0331236fa75afba14bbcf6668d42cebb55c43 upstream.
    
    Added the USB serial console device ID for Siemens Ruggedcom devices
    which have a USB port for their serial console.
    
    Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit af6d6d92b456cd35261299bfe5380267fa5593a9
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Jan 19 17:53:20 2015 +0900

    PCI: Fix infinite loop with ROM image of size 0
    
    commit 16b036af31e1456cb69243a5a0c9ef801ecd1f17 upstream.
    
    If the image size would ever read as 0, pci_get_rom_size() could keep
    processing the same image over and over again.  Exit the loop if we ever
    read a length of zero.
    
    This fixes a soft lockup on boot when the radeon driver calls
    pci_get_rom_size() on an AMD Radeon R7 250X PCIe discrete graphics card.
    
    [bhelgaas: changelog, reference]
    Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1386973
    Reported-by: Federico <federicotg@gmail.com>
    Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 8de2a8d9accf7d20eb69e55717455c4753104bb6
Author: David Hildenbrand <dahi@linux.vnet.ibm.com>
Date:   Fri Dec 12 15:17:31 2014 +0100

    KVM: s390: base hrtimer on a monotonic clock
    
    commit 0ac96caf0f9381088c673a16d910b1d329670edf upstream.
    
    The hrtimer that handles the wait with enabled timer interrupts
    should not be disturbed by changes of the host time.
    
    This patch changes our hrtimer to be based on a monotonic clock.
    
    Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
    Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
    Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 6b962632ba4bdae071db35520e3dbb5e2d50e780
Author: Andrey Ryabinin <a.ryabinin@samsung.com>
Date:   Tue Jan 13 18:52:40 2015 +0300

    smack: fix possible use after frees in task_security() callers
    
    commit 6d1cff2a885850b78b40c34777b46cf5da5d1050 upstream.
    
    We hit use after free on dereferncing pointer to task_smack struct in
    smk_of_task() called from smack_task_to_inode().
    
    task_security() macro uses task_cred_xxx() to get pointer to the task_smack.
    task_cred_xxx() could be used only for non-pointer members of task's
    credentials. It cannot be used for pointer members since what they point
    to may disapper after dropping RCU read lock.
    
    Mainly task_security() used this way:
    	smk_of_task(task_security(p))
    
    Intead of this introduce function smk_of_task_struct() which
    takes task_struct as argument and returns pointer to smk_known struct
    and do this under RCU read lock.
    Bogus task_security() macro is not used anymore, so remove it.
    
    KASan's report for this:
    
    	AddressSanitizer: use after free in smack_task_to_inode+0x50/0x70 at addr c4635600
    	=============================================================================
    	BUG kmalloc-64 (Tainted: PO): kasan error
    	-----------------------------------------------------------------------------
    
    	Disabling lock debugging due to kernel taint
    	INFO: Allocated in new_task_smack+0x44/0xd8 age=39 cpu=0 pid=1866
    		kmem_cache_alloc_trace+0x88/0x1bc
    		new_task_smack+0x44/0xd8
    		smack_cred_prepare+0x48/0x21c
    		security_prepare_creds+0x44/0x4c
    		prepare_creds+0xdc/0x110
    		smack_setprocattr+0x104/0x150
    		security_setprocattr+0x4c/0x54
    		proc_pid_attr_write+0x12c/0x194
    		vfs_write+0x1b0/0x370
    		SyS_write+0x5c/0x94
    		ret_fast_syscall+0x0/0x48
    	INFO: Freed in smack_cred_free+0xc4/0xd0 age=27 cpu=0 pid=1564
    		kfree+0x270/0x290
    		smack_cred_free+0xc4/0xd0
    		security_cred_free+0x34/0x3c
    		put_cred_rcu+0x58/0xcc
    		rcu_process_callbacks+0x738/0x998
    		__do_softirq+0x264/0x4cc
    		do_softirq+0x94/0xf4
    		irq_exit+0xbc/0x120
    		handle_IRQ+0x104/0x134
    		gic_handle_irq+0x70/0xac
    		__irq_svc+0x44/0x78
    		_raw_spin_unlock+0x18/0x48
    		sync_inodes_sb+0x17c/0x1d8
    		sync_filesystem+0xac/0xfc
    		vdfs_file_fsync+0x90/0xc0
    		vfs_fsync_range+0x74/0x7c
    	INFO: Slab 0xd3b23f50 objects=32 used=31 fp=0xc4635600 flags=0x4080
    	INFO: Object 0xc4635600 @offset=5632 fp=0x  (null)
    
    	Bytes b4 c46355f0: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
    	Object c4635600: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
    	Object c4635610: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
    	Object c4635620: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b  kkkkkkkkkkkkkkkk
    	Object c4635630: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b a5  kkkkkkkkkkkkkkk.
    	Redzone c4635640: bb bb bb bb                                      ....
    	Padding c46356e8: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a  ZZZZZZZZZZZZZZZZ
    	Padding c46356f8: 5a 5a 5a 5a 5a 5a 5a 5a                          ZZZZZZZZ
    	CPU: 5 PID: 834 Comm: launchpad_prelo Tainted: PBO 3.10.30 #1
    	Backtrace:
    	[<c00233a4>] (dump_backtrace+0x0/0x158) from [<c0023dec>] (show_stack+0x20/0x24)
    	 r7:c4634010 r6:d3b23f50 r5:c4635600 r4:d1002140
    	[<c0023dcc>] (show_stack+0x0/0x24) from [<c06d6d7c>] (dump_stack+0x20/0x28)
    	[<c06d6d5c>] (dump_stack+0x0/0x28) from [<c01c1d50>] (print_trailer+0x124/0x144)
    	[<c01c1c2c>] (print_trailer+0x0/0x144) from [<c01c1e88>] (object_err+0x3c/0x44)
    	 r7:c4635600 r6:d1002140 r5:d3b23f50 r4:c4635600
    	[<c01c1e4c>] (object_err+0x0/0x44) from [<c01cac18>] (kasan_report_error+0x2b8/0x538)
    	 r6:d1002140 r5:d3b23f50 r4:c6429cf8 r3:c09e1aa7
    	[<c01ca960>] (kasan_report_error+0x0/0x538) from [<c01c9430>] (__asan_load4+0xd4/0xf8)
    	[<c01c935c>] (__asan_load4+0x0/0xf8) from [<c031e168>] (smack_task_to_inode+0x50/0x70)
    	 r5:c4635600 r4:ca9da000
    	[<c031e118>] (smack_task_to_inode+0x0/0x70) from [<c031af64>] (security_task_to_inode+0x3c/0x44)
    	 r5:cca25e80 r4:c0ba9780
    	[<c031af28>] (security_task_to_inode+0x0/0x44) from [<c023d614>] (pid_revalidate+0x124/0x178)
    	 r6:00000000 r5:cca25e80 r4:cbabe3c0 r3:00008124
    	[<c023d4f0>] (pid_revalidate+0x0/0x178) from [<c01db98c>] (lookup_fast+0x35c/0x43y4)
    	 r9:c6429efc r8:00000101 r7:c079d940 r6:c6429e90 r5:c6429ed8 r4:c83c4148
    	[<c01db630>] (lookup_fast+0x0/0x434) from [<c01deec8>] (do_last.isra.24+0x1c0/0x1108)
    	[<c01ded08>] (do_last.isra.24+0x0/0x1108) from [<c01dff04>] (path_openat.isra.25+0xf4/0x648)
    	[<c01dfe10>] (path_openat.isra.25+0x0/0x648) from [<c01e1458>] (do_filp_open+0x3c/0x88)
    	[<c01e141c>] (do_filp_open+0x0/0x88) from [<c01ccb28>] (do_sys_open+0xf0/0x198)
    	 r7:00000001 r6:c0ea2180 r5:0000000b r4:00000000
    	[<c01cca38>] (do_sys_open+0x0/0x198) from [<c01ccc00>] (SyS_open+0x30/0x34)
    	[<c01ccbd0>] (SyS_open+0x0/0x34) from [<c001db80>] (ret_fast_syscall+0x0/0x48)
    	Read of size 4 by thread T834:
    	Memory state around the buggy address:
    	 c4635380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    	 c4635400: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
    	 c4635480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    	 c4635500: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc
    	 c4635580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    	>c4635600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
    	           ^
    	 c4635680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
    	 c4635700: 00 00 00 00 04 fc fc fc fc fc fc fc fc fc fc fc
    	 c4635780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    	 c4635800: 00 00 00 00 00 00 04 fc fc fc fc fc fc fc fc fc
    	 c4635880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    	==================================================================
    
    Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com>
    [lizf: Backported to 3.4:
     - smk_of_task() returns char* instead of smack_known *
     - replace task_security() with smk_of_task() with smk_of_task_struct()
       manually]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit de2a293c9b4cfda94aeb5572383beaa6493dd96d
Author: Dmitry Tunin <hanipouspilot@gmail.com>
Date:   Sun Jan 18 00:16:51 2015 +0300

    Bluetooth: ath3k: Add support of AR3012 bluetooth 13d3:3423 device
    
    commit 033efa920a7f22a8caf7a38d851a2f451781bbf7 upstream.
    
    Add support of 13d3:3423 device.
    
    BugLink: https://bugs.launchpad.net/bugs/1411193
    
    T: Bus=01 Lev=02 Prnt=03 Port=00 Cnt=01 Dev#= 5 Spd=12 MxCh= 0
    D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
    P: Vendor=13d3 ProdID=3423 Rev= 0.01
    C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
    A: FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=01
    I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms
    E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
    E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
    I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms
    E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms
    I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms
    E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms
    I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms
    E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms
    I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms
    E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms
    I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms
    E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms
    I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
    E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms
    E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms
    
    Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit b24c9cfb7c8c72e74ec1b8c5bcf3e26e20c56e77
Author: Matthew Wilcox <matthew.r.wilcox@intel.com>
Date:   Wed Jan 7 18:04:18 2015 +0200

    axonram: Fix bug in direct_access
    
    commit 91117a20245b59f70b563523edbf998a62fc6383 upstream.
    
    The 'pfn' returned by axonram was completely bogus, and has been since
    2008.
    
    Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
    Reviewed-by: Jan Kara <jack@suse.cz>
    Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
    Signed-off-by: Jens Axboe <axboe@fb.com>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit aef29c3576fb89843193a2a026719a0fdb4145ab
Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date:   Fri Dec 5 15:13:54 2014 +0100

    usb: core: buffer: smallest buffer should start at ARCH_DMA_MINALIGN
    
    commit 5efd2ea8c9f4f12916ffc8ba636792ce052f6911 upstream.
    
    the following error pops up during "testusb -a -t 10"
    | musb-hdrc musb-hdrc.1.auto: dma_pool_free buffer-128,	f134e000/be842000 (bad dma)
    hcd_buffer_create() creates a few buffers, the smallest has 32 bytes of
    size. ARCH_KMALLOC_MINALIGN is set to 64 bytes. This combo results in
    hcd_buffer_alloc() returning memory which is 32 bytes aligned and it
    might by identified by buffer_offset() as another buffer. This means the
    buffer which is on a 32 byte boundary will not get freed, instead it
    tries to free another buffer with the error message.
    
    This patch fixes the issue by creating the smallest DMA buffer with the
    size of ARCH_KMALLOC_MINALIGN (or 32 in case ARCH_KMALLOC_MINALIGN is
    smaller). This might be 32, 64 or even 128 bytes. The next three pools
    will have the size 128, 512 and 2048.
    In case the smallest pool is 128 bytes then we have only three pools
    instead of four (and zero the first entry in the array).
    The last pool size is always 2048 bytes which is the assumed PAGE_SIZE /
    2 of 4096. I doubt it makes sense to continue using PAGE_SIZE / 2 where
    we would end up with 8KiB buffer in case we have 16KiB pages.
    Instead I think it makes sense to have a common size(s) and extend them
    if there is need to.
    There is a BUILD_BUG_ON() now in case someone has a minalign of more than
    128 bytes.
    
    Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
    Acked-by: Alan Stern <stern@rowland.harvard.edu>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 3274eed40faa3c0af04a78c2372ec4bd172bbe7a
Author: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Date:   Tue Dec 2 17:35:04 2014 +0100

    PCI: Generate uppercase hex for modalias var in uevent
    
    commit 145b3fe579db66fbe999a2bc3fd5b63dffe9636d upstream.
    
    Some implementations of modprobe fail to load the driver for a PCI device
    automatically because the "interface" part of the modalias from the kernel
    is lowercase, and the modalias from file2alias is uppercase.
    
    The "interface" is the low-order byte of the Class Code, defined in PCI
    r3.0, Appendix D.  Most interface types defined in the spec do not use
    alpha characters, so they won't be affected.  For example, 00h, 01h, 10h,
    20h, etc. are unaffected.
    
    Print the "interface" byte of the Class Code in uppercase hex, as we
    already do for the Vendor ID, Device ID, Class, etc.
    
    Commit 89ec3dcf17fd ("PCI: Generate uppercase hex for modalias interface
    class") fixed only half of the problem.  Some udev implementations rely on
    the uevent file and not the modalias file.
    
    Fixes: d1ded203adf1 ("PCI: add MODALIAS to hotplug event for pci devices")
    Fixes: 89ec3dcf17fd ("PCI: Generate uppercase hex for modalias interface class")
    Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
    Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    [lizf: Backported to 3.4: adjust filename]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 0d51bca9808936920dd6042743b002a4d85c6fec
Author: Martin Vajnar <martin.vajnar@gmail.com>
Date:   Wed Dec 24 00:27:57 2014 +0100

    hx4700: regulator: declare full constraints
    
    commit a52d209336f8fc7483a8c7f4a8a7d2a8e1692a6c upstream.
    
    Since the removal of CONFIG_REGULATOR_DUMMY option, the touchscreen stopped
    working. This patch enables the "replacement" for REGULATOR_DUMMY and
    allows the touchscreen to work even though there is no regulator for "vcc".
    
    Signed-off-by: Martin Vajnar <martin.vajnar@gmail.com>
    Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 3df3cce4efd1004907d1abd75f34465ae62c9954
Author: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Date:   Thu Dec 4 14:10:02 2014 +0300

    ARM: pxa: add regulator_has_full_constraints to spitz board file
    
    commit baad2dc49c5d970ea881d92981a1b76c94a7b7a1 upstream.
    
    Add regulator_has_full_constraints() call to spitz board file to let
    regulator core know that we do not have any additional regulators left.
    This lets it substitute unprovided regulators with dummy ones.
    
    This fixes the following warnings that can be seen on spitz if
    regulators are enabled:
    
    ads7846 spi2.0: unable to get regulator: -517
    spi spi2.0: Driver ads7846 requests probe deferral
    
    Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
    Acked-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
    [lizf: Backported to 3.4: adjust context]
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 6c6b1b293e549de440fa5229cf2153c8c7960243
Author: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Date:   Thu Dec 4 14:10:01 2014 +0300

    ARM: pxa: add regulator_has_full_constraints to poodle board file
    
    commit 9bc78f32c2e430aebf6def965b316aa95e37a20c upstream.
    
    Add regulator_has_full_constraints() call to poodle board file to let
    regulator core know that we do not have any additional regulators left.
    This lets it substitute unprovided regulators with dummy ones.
    
    This fixes the following warnings that can be seen on poodle if
    regulators are enabled:
    
    ads7846 spi1.0: unable to get regulator: -517
    spi spi1.0: Driver ads7846 requests probe deferral
    wm8731 0-001b: Failed to get supply 'AVDD': -517
    wm8731 0-001b: Failed to request supplies: -517
    wm8731 0-001b: ASoC: failed to probe component -517
    
    Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
    Acked-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
    Signed-off-by: Zefan Li <lizefan@huawei.com>

commit 830f883662666d396a4633a8492843b1de6044f7
Author: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Date:   Thu Dec 4 14:10:00 2014 +0300

    ARM: pxa: add regulator_has_full_constraints to corgi board file
    
    commit 271e80176aae4e5b481f4bb92df9768c6075bbca upstream.
    
    Add regulator_has_full_constraints() call to corgi board file to let
    regulator core know that we do not have any additional regulators left.
    This lets it substitute unprovided regulators with dummy ones.
    
    This fixes the following warnings that can be seen on corgi if
    regulators are enabled:
    
    ads7846 spi1.0: unable to get regulator: -517
    spi spi1.0: Driver ads7846 requests probe deferral
    wm8731 0-001b: Failed to get supply 'AVDD': -517
    wm8731 0-001b: Failed to request supplies: -517
    wm8731 0-001b: ASoC: failed to probe component -517
    corgi-audio corgi-audio: ASoC: failed to instantiate card -517
    
    Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
    Acked-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
    Signed-off-by: Zefan Li <lizefan@huawei.com>