commit d038b9c4a0d288d1fd56e37cdbe310b69a4c1a05
Author: Jiri Slaby <jslaby@suse.cz>
Date:   Wed May 18 11:11:57 2016 +0200

    Linux 3.12.60

commit ca76e51ed3b56af681e0623956a6c2481cfc8900
Author: Antonio Alecrim Jr <antonio.alecrim@gmail.com>
Date:   Mon Sep 16 11:04:54 2013 -0300

    X.509: remove possible code fragility: enumeration values not handled
    
    commit eb8948a03704f3dbbfc7e83090e20e93c6c476d2 upstream.
    
    Signed-off-by: Antonio Alecrim Jr <antonio.alecrim@gmail.com>
    Signed-off-by: David Howells <dhowells@redhat.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit a1178cc54d48ba39b84bc61eccc30dc92a6b13f6
Author: Kirill Tkhai <ktkhai@parallels.com>
Date:   Tue Oct 28 08:24:34 2014 +0300

    sched: Remove lockdep check in sched_move_task()
    
    commit f7b8a47da17c9ee4998f2ca2018fcc424e953c0e upstream.
    
    sched_move_task() is the only interface to change sched_task_group:
    cpu_cgrp_subsys methods and autogroup_move_group() use it.
    
    Everything is synchronized by task_rq_lock(), so cpu_cgroup_attach()
    is ordered with other users of sched_move_task(). This means we do no
    need RCU here: if we've dereferenced a tg here, the .attach method
    hasn't been called for it yet.
    
    Thus, we should pass "true" to task_css_check() to silence lockdep
    warnings.
    
    Fixes: eeb61e53ea19 ("sched: Fix race between task_group and sched_task_group")
    Reported-by: Oleg Nesterov <oleg@redhat.com>
    Reported-by: Fengguang Wu <fengguang.wu@intel.com>
    Signed-off-by: Kirill Tkhai <ktkhai@parallels.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Link: http://lkml.kernel.org/r/1414473874.8574.2.camel@tkhai
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 012d81589afb85807b7ebe72f3505d90f34aa265
Author: David Howells <dhowells@redhat.com>
Date:   Tue Feb 23 11:03:12 2016 +0000

    KEYS: Fix ASN.1 indefinite length object parsing
    
    commit 23c8a812dc3c621009e4f0e5342aa4e2ede1ceaa upstream.
    
    This fixes CVE-2016-0758.
    
    In the ASN.1 decoder, when the length field of an ASN.1 value is extracted,
    it isn't validated against the remaining amount of data before being added
    to the cursor.  With a sufficiently large size indicated, the check:
    
    	datalen - dp < 2
    
    may then fail due to integer overflow.
    
    Fix this by checking the length indicated against the amount of remaining
    data in both places a definite length is determined.
    
    Whilst we're at it, make the following changes:
    
     (1) Check the maximum size of extended length does not exceed the capacity
         of the variable it's being stored in (len) rather than the type that
         variable is assumed to be (size_t).
    
     (2) Compare the EOC tag to the symbolic constant ASN1_EOC rather than the
         integer 0.
    
     (3) To reduce confusion, move the initialisation of len outside of:
    
    	for (len = 0; n > 0; n--) {
    
         since it doesn't have anything to do with the loop counter n.
    
    Signed-off-by: David Howells <dhowells@redhat.com>
    Reviewed-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
    Acked-by: David Woodhouse <David.Woodhouse@intel.com>
    Acked-by: Peter Jones <pjones@redhat.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit abce15380084050ccfb9326ce1bcf10b7b83d2c9
Author: David Howells <dhowells@redhat.com>
Date:   Wed Aug 5 12:54:46 2015 +0100

    ASN.1: Fix non-match detection failure on data overrun
    
    commit 0d62e9dd6da45bbf0f33a8617afc5fe774c8f45f upstream.
    
    If the ASN.1 decoder is asked to parse a sequence of objects, non-optional
    matches get skipped if there's no more data to be had rather than a
    data-overrun error being reported.
    
    This is due to the code segment that decides whether to skip optional
    matches (ie. matches that could get ignored because an element is marked
    OPTIONAL in the grammar) due to a lack of data also skips non-optional
    elements if the data pointer has reached the end of the buffer.
    
    This can be tested with the data decoder for the new RSA akcipher algorithm
    that takes three non-optional integers.  Currently, it skips the last
    integer if there is insufficient data.
    
    Without the fix, #defining DEBUG in asn1_decoder.c will show something
    like:
    
    	next_op: pc=0/13 dp=0/270 C=0 J=0
    	- match? 30 30 00
    	- TAG: 30 266 CONS
    	next_op: pc=2/13 dp=4/270 C=1 J=0
    	- match? 02 02 00
    	- TAG: 02 257
    	- LEAF: 257
    	next_op: pc=5/13 dp=265/270 C=1 J=0
    	- match? 02 02 00
    	- TAG: 02 3
    	- LEAF: 3
    	next_op: pc=8/13 dp=270/270 C=1 J=0
    	next_op: pc=11/13 dp=270/270 C=1 J=0
    	- end cons t=4 dp=270 l=270/270
    
    The next_op line for pc=8/13 should be followed by a match line.
    
    This is not exploitable for X.509 certificates by means of shortening the
    message and fixing up the ASN.1 CONS tags because:
    
     (1) The relevant records being built up are cleared before use.
    
     (2) If the message is shortened sufficiently to remove the public key, the
         ASN.1 parse of the RSA key will fail quickly due to a lack of data.
    
     (3) Extracted signature data is either turned into MPIs (which cope with a
         0 length) or is simpler integers specifying algoritms and suchlike
         (which can validly be 0); and
    
     (4) The AKID and SKID extensions are optional and their removal is handled
         without risking passing a NULL to asymmetric_key_generate_id().
    
     (5) If the certificate is truncated sufficiently to remove the subject,
         issuer or serialNumber then the ASN.1 decoder will fail with a 'Cons
         stack underflow' return.
    
    This is not exploitable for PKCS#7 messages by means of removal of elements
    from such a message from the tail end of a sequence:
    
     (1) Any shortened X.509 certs embedded in the PKCS#7 message are survivable
         as detailed above.
    
     (2) The message digest content isn't used if it shows a NULL pointer,
         similarly, the authattrs aren't used if that shows a NULL pointer.
    
     (3) A missing signature results in a NULL MPI - which the MPI routines deal
         with.
    
     (4) If data is NULL, it is expected that the message has detached content and
         that is handled appropriately.
    
     (5) If the serialNumber is excised, the unconditional action associated
         with it will pick up the containing SEQUENCE instead, so no NULL
         pointer will be seen here.
    
         If both the issuer and the serialNumber are excised, the ASN.1 decode
         will fail with an 'Unexpected tag' return.
    
         In either case, there's no way to get to asymmetric_key_generate_id()
         with a NULL pointer.
    
     (6) Other fields are decoded to simple integers.  Shortening the message
         to omit an algorithm ID field will cause checks on this to fail early
         in the verification process.
    
    This can also be tested by snipping objects off of the end of the ASN.1 stream
    such that mandatory tags are removed - or even from the end of internal
    SEQUENCEs.  If any mandatory tag is missing, the error EBADMSG *should* be
    produced.  Without this patch ERANGE or ENOPKG might be produced or the parse
    may apparently succeed, perhaps with ENOKEY or EKEYREJECTED being produced
    later, depending on what gets snipped.
    
    Just snipping off the final BIT_STRING or OCTET_STRING from either sample
    should be a start since both are mandatory and neither will cause an EBADMSG
    without the patches
    
    Reported-by: Marcel Holtmann <marcel@holtmann.org>
    Signed-off-by: David Howells <dhowells@redhat.com>
    Tested-by: Marcel Holtmann <marcel@holtmann.org>
    Reviewed-by: David Woodhouse <David.Woodhouse@intel.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit aeb14f1738e3c6a703213cb103e0f89f143bd276
Author: Kangjie Lu <kangjielu@gmail.com>
Date:   Sun May 8 12:10:14 2016 -0400

    net: fix a kernel infoleak in x25 module
    
    [ Upstream commit 79e48650320e6fba48369fccf13fd045315b19b8 ]
    
    Stack object "dte_facilities" is allocated in x25_rx_call_request(),
    which is supposed to be initialized in x25_negotiate_facilities.
    However, 5 fields (8 bytes in total) are not initialized. This
    object is then copied to userland via copy_to_user, thus infoleak
    occurs.
    
    Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit cf5ae3f3cf73cf5112e1912d9d0d2dedcbf15e08
Author: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Date:   Wed May 4 16:18:45 2016 +0200

    net: bridge: fix old ioctl unlocked net device walk
    
    [ Upstream commit 31ca0458a61a502adb7ed192bf9716c6d05791a5 ]
    
    get_bridge_ifindices() is used from the old "deviceless" bridge ioctl
    calls which aren't called with rtnl held. The comment above says that it is
    called with rtnl but that is not really the case.
    Here's a sample output from a test ASSERT_RTNL() which I put in
    get_bridge_ifindices and executed "brctl show":
    [  957.422726] RTNL: assertion failed at net/bridge//br_ioctl.c (30)
    [  957.422925] CPU: 0 PID: 1862 Comm: brctl Tainted: G        W  O
    4.6.0-rc4+ #157
    [  957.423009] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),
    BIOS 1.8.1-20150318_183358- 04/01/2014
    [  957.423009]  0000000000000000 ffff880058adfdf0 ffffffff8138dec5
    0000000000000400
    [  957.423009]  ffffffff81ce8380 ffff880058adfe58 ffffffffa05ead32
    0000000000000001
    [  957.423009]  00007ffec1a444b0 0000000000000400 ffff880053c19130
    0000000000008940
    [  957.423009] Call Trace:
    [  957.423009]  [<ffffffff8138dec5>] dump_stack+0x85/0xc0
    [  957.423009]  [<ffffffffa05ead32>]
    br_ioctl_deviceless_stub+0x212/0x2e0 [bridge]
    [  957.423009]  [<ffffffff81515beb>] sock_ioctl+0x22b/0x290
    [  957.423009]  [<ffffffff8126ba75>] do_vfs_ioctl+0x95/0x700
    [  957.423009]  [<ffffffff8126c159>] SyS_ioctl+0x79/0x90
    [  957.423009]  [<ffffffff8163a4c0>] entry_SYSCALL_64_fastpath+0x23/0xc1
    
    Since it only reads bridge ifindices, we can use rcu to safely walk the net
    device list. Also remove the wrong rtnl comment above.
    
    Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit fa9ba455d380badcb2688846048a65a55811f264
Author: Ian Campbell <ian.campbell@docker.com>
Date:   Wed May 4 14:21:53 2016 +0100

    VSOCK: do not disconnect socket when peer has shutdown SEND only
    
    [ Upstream commit dedc58e067d8c379a15a8a183c5db318201295bb ]
    
    The peer may be expecting a reply having sent a request and then done a
    shutdown(SHUT_WR), so tearing down the whole socket at this point seems
    wrong and breaks for me with a client which does a SHUT_WR.
    
    Looking at other socket family's stream_recvmsg callbacks doing a shutdown
    here does not seem to be the norm and removing it does not seem to have
    had any adverse effects that I can see.
    
    I'm using Stefan's RFC virtio transport patches, I'm unsure of the impact
    on the vmci transport.
    
    Signed-off-by: Ian Campbell <ian.campbell@docker.com>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Stefan Hajnoczi <stefanha@redhat.com>
    Cc: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
    Cc: Andy King <acking@vmware.com>
    Cc: Dmitry Torokhov <dtor@vmware.com>
    Cc: Jorgen Hansen <jhansen@vmware.com>
    Cc: Adit Ranadive <aditr@vmware.com>
    Cc: netdev@vger.kernel.org
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 3248734d04fe4140b66aca5ce0372d7eae093293
Author: Kangjie Lu <kangjielu@gmail.com>
Date:   Tue May 3 16:46:24 2016 -0400

    net: fix infoleak in rtnetlink
    
    [ Upstream commit 5f8e44741f9f216e33736ea4ec65ca9ac03036e6 ]
    
    The stack object “map” has a total size of 32 bytes. Its last 4
    bytes are padding generated by compiler. These padding bytes are
    not initialized and sent out via “nla_put”.
    
    Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 734b9658068b9b2ecb3aff06e125a66e02306386
Author: Kangjie Lu <kangjielu@gmail.com>
Date:   Tue May 3 16:35:05 2016 -0400

    net: fix infoleak in llc
    
    [ Upstream commit b8670c09f37bdf2847cc44f36511a53afc6161fd ]
    
    The stack object “info” has a total size of 12 bytes. Its last byte
    is padding which is not initialized and leaked via “put_cmsg”.
    
    Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 521a3b4187e1999deb63557d2d3648bc7bbf27cb
Author: Neil Horman <nhorman@tuxdriver.com>
Date:   Mon May 2 12:20:15 2016 -0400

    netem: Segment GSO packets on enqueue
    
    [ Upstream commit 6071bd1aa13ed9e41824bafad845b7b7f4df5cfd ]
    
    This was recently reported to me, and reproduced on the latest net kernel,
    when attempting to run netperf from a host that had a netem qdisc attached
    to the egress interface:
    
    [  788.073771] ---------------------[ cut here ]---------------------------
    [  788.096716] WARNING: at net/core/dev.c:2253 skb_warn_bad_offload+0xcd/0xda()
    [  788.129521] bnx2: caps=(0x00000001801949b3, 0x0000000000000000) len=2962
    data_len=0 gso_size=1448 gso_type=1 ip_summed=3
    [  788.182150] Modules linked in: sch_netem kvm_amd kvm crc32_pclmul ipmi_ssif
    ghash_clmulni_intel sp5100_tco amd64_edac_mod aesni_intel lrw gf128mul
    glue_helper ablk_helper edac_mce_amd cryptd pcspkr sg edac_core hpilo ipmi_si
    i2c_piix4 k10temp fam15h_power hpwdt ipmi_msghandler shpchp acpi_power_meter
    pcc_cpufreq nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c
    sd_mod crc_t10dif crct10dif_generic mgag200 syscopyarea sysfillrect sysimgblt
    i2c_algo_bit drm_kms_helper ahci ata_generic pata_acpi ttm libahci
    crct10dif_pclmul pata_atiixp tg3 libata crct10dif_common drm crc32c_intel ptp
    serio_raw bnx2 r8169 hpsa pps_core i2c_core mii dm_mirror dm_region_hash dm_log
    dm_mod
    [  788.465294] CPU: 16 PID: 0 Comm: swapper/16 Tainted: G        W
    ------------   3.10.0-327.el7.x86_64 #1
    [  788.511521] Hardware name: HP ProLiant DL385p Gen8, BIOS A28 12/17/2012
    [  788.542260]  ffff880437c036b8 f7afc56532a53db9 ffff880437c03670
    ffffffff816351f1
    [  788.576332]  ffff880437c036a8 ffffffff8107b200 ffff880633e74200
    ffff880231674000
    [  788.611943]  0000000000000001 0000000000000003 0000000000000000
    ffff880437c03710
    [  788.647241] Call Trace:
    [  788.658817]  <IRQ>  [<ffffffff816351f1>] dump_stack+0x19/0x1b
    [  788.686193]  [<ffffffff8107b200>] warn_slowpath_common+0x70/0xb0
    [  788.713803]  [<ffffffff8107b29c>] warn_slowpath_fmt+0x5c/0x80
    [  788.741314]  [<ffffffff812f92f3>] ? ___ratelimit+0x93/0x100
    [  788.767018]  [<ffffffff81637f49>] skb_warn_bad_offload+0xcd/0xda
    [  788.796117]  [<ffffffff8152950c>] skb_checksum_help+0x17c/0x190
    [  788.823392]  [<ffffffffa01463a1>] netem_enqueue+0x741/0x7c0 [sch_netem]
    [  788.854487]  [<ffffffff8152cb58>] dev_queue_xmit+0x2a8/0x570
    [  788.880870]  [<ffffffff8156ae1d>] ip_finish_output+0x53d/0x7d0
    ...
    
    The problem occurs because netem is not prepared to handle GSO packets (as it
    uses skb_checksum_help in its enqueue path, which cannot manipulate these
    frames).
    
    The solution I think is to simply segment the skb in a simmilar fashion to the
    way we do in __dev_queue_xmit (via validate_xmit_skb), with some minor changes.
    When we decide to corrupt an skb, if the frame is GSO, we segment it, corrupt
    the first segment, and enqueue the remaining ones.
    
    tested successfully by myself on the latest net kernel, to which this applies
    
    [js] backport to 3.12: no qdisc_qstats_drop yet, update directly. Also use
         qdisc_tree_decrease_qlen instead of qdisc_tree_reduce_backlog.
    
    Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
    CC: Jamal Hadi Salim <jhs@mojatatu.com>
    CC: "David S. Miller" <davem@davemloft.net>
    CC: netem@lists.linux-foundation.org
    CC: eric.dumazet@gmail.com
    CC: stephen@networkplumber.org
    Acked-by: Eric Dumazet <edumazet@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit c3892a66d27533817184f85d8787ba2cb8df3c63
Author: Eric Dumazet <edumazet@google.com>
Date:   Sat Apr 23 11:35:46 2016 -0700

    net/mlx4_en: fix spurious timestamping callbacks
    
    [ Upstream commit fc96256c906362e845d848d0f6a6354450059e81 ]
    
    When multiple skb are TX-completed in a row, we might incorrectly keep
    a timestamp of a prior skb and cause extra work.
    
    Fixes: ec693d47010e8 ("net/mlx4_en: Add HW timestamping (TS) support")
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Cc: Willem de Bruijn <willemb@google.com>
    Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 326671f7281f44325234b58b020e0bebaef67752
Author: Paolo Abeni <pabeni@redhat.com>
Date:   Thu Apr 21 22:23:31 2016 +0200

    ipv4/fib: don't warn when primary address is missing if in_dev is dead
    
    [ Upstream commit 391a20333b8393ef2e13014e6e59d192c5594471 ]
    
    After commit fbd40ea0180a ("ipv4: Don't do expensive useless work
    during inetdev destroy.") when deleting an interface,
    fib_del_ifaddr() can be executed without any primary address
    present on the dead interface.
    
    The above is safe, but triggers some "bug: prim == NULL" warnings.
    
    This commit avoids warning if the in_dev is dead
    
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 59e126bf0fefcc03f309d3893a921637064fc2ee
Author: Ben Hutchings <ben@decadent.org.uk>
Date:   Wed Apr 20 23:23:08 2016 +0100

    atl2: Disable unimplemented scatter/gather feature
    
    [ Upstream commit f43bfaeddc79effbf3d0fcb53ca477cca66f3db8 ]
    
    atl2 includes NETIF_F_SG in hw_features even though it has no support
    for non-linear skbs.  This bug was originally harmless since the
    driver does not claim to implement checksum offload and that used to
    be a requirement for SG.
    
    Now that SG and checksum offload are independent features, if you
    explicitly enable SG *and* use one of the rare protocols that can use
    SG without checkusm offload, this potentially leaks sensitive
    information (before you notice that it just isn't working).  Therefore
    this obscure bug has been designated CVE-2016-2117.
    
    Reported-by: Justin Yackoski <jyackoski@crypto-nite.com>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    Fixes: ec5f06156423 ("net: Kill link between CSUM and SG features.")
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 0c0e877eefd101c036189995e68f726bd0f9d03d
Author: Mathias Krause <minipli@googlemail.com>
Date:   Sun Apr 10 12:52:28 2016 +0200

    packet: fix heap info leak in PACKET_DIAG_MCLIST sock_diag interface
    
    [ Upstream commit 309cf37fe2a781279b7675d4bb7173198e532867 ]
    
    Because we miss to wipe the remainder of i->addr[] in packet_mc_add(),
    pdiag_put_mclist() leaks uninitialized heap bytes via the
    PACKET_DIAG_MCLIST netlink attribute.
    
    Fix this by explicitly memset(0)ing the remaining bytes in i->addr[].
    
    Fixes: eea68e2f1a00 ("packet: Report socket mclist info via diag module")
    Signed-off-by: Mathias Krause <minipli@googlemail.com>
    Cc: Eric W. Biederman <ebiederm@xmission.com>
    Cc: Pavel Emelyanov <xemul@parallels.com>
    Acked-by: Pavel Emelyanov <xemul@virtuozzo.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit f21407439f04668104cbf216bb195b7004b429e3
Author: Chris Friesen <chris.friesen@windriver.com>
Date:   Fri Apr 8 15:21:30 2016 -0600

    route: do not cache fib route info on local routes with oif
    
    [ Upstream commit d6d5e999e5df67f8ec20b6be45e2229455ee3699 ]
    
    For local routes that require a particular output interface we do not want
    to cache the result.  Caching the result causes incorrect behaviour when
    there are multiple source addresses on the interface.  The end result
    being that if the intended recipient is waiting on that interface for the
    packet he won't receive it because it will be delivered on the loopback
    interface and the IP_PKTINFO ipi_ifindex will be set to the loopback
    interface as well.
    
    This can be tested by running a program such as "dhcp_release" which
    attempts to inject a packet on a particular interface so that it is
    received by another program on the same board.  The receiving process
    should see an IP_PKTINFO ipi_ifndex value of the source interface
    (e.g., eth1) instead of the loopback interface (e.g., lo).  The packet
    will still appear on the loopback interface in tcpdump but the important
    aspect is that the CMSG info is correct.
    
    Sample dhcp_release command line:
    
       dhcp_release eth1 192.168.204.222 02:11:33:22:44:66
    
    Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
    Signed off-by: Chris Friesen <chris.friesen@windriver.com>
    Reviewed-by: Julian Anastasov <ja@ssi.bg>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 86f00380134811cdcf9f88af16cb5651e2e1f523
Author: David S. Miller <davem@davemloft.net>
Date:   Sun Apr 10 23:01:30 2016 -0400

    decnet: Do not build routes to devices without decnet private data.
    
    [ Upstream commit a36a0d4008488fa545c74445d69eaf56377d5d4e ]
    
    In particular, make sure we check for decnet private presence
    for loopback devices.
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 3522956c47aebf1b2e5ba62e773d5b3d8bf7d6f3
Author: Paolo Abeni <pabeni@redhat.com>
Date:   Fri May 13 18:33:41 2016 +0200

    net/route: enforce hoplimit max value
    
    [ Upstream commit 626abd59e51d4d8c6367e03aae252a8aa759ac78 ]
    
    Currently, when creating or updating a route, no check is performed
    in both ipv4 and ipv6 code to the hoplimit value.
    
    The caller can i.e. set hoplimit to 256, and when such route will
     be used, packets will be sent with hoplimit/ttl equal to 0.
    
    This commit adds checks for the RTAX_HOPLIMIT value, in both ipv4
    ipv6 route code, substituting any value greater than 255 with 255.
    
    This is consistent with what is currently done for ADVMSS and MTU
    in the ipv4 code.
    
    [js] backport to 3.12: no ip6_convert_metrics yet, fix applied to
         ip6_route_add directly.
    
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit cc07dedc633d60c59e707cd752b66dc9671036d1
Author: Tony Lindgren <tony@atomide.com>
Date:   Thu May 28 07:22:08 2015 -0700

    ARM: OMAP3: Fix booting with thumb2 kernel
    
    commit d8a50941c91a68da202aaa96a3dacd471ea9c693 upstream.
    
    We get a NULL pointer dereference on omap3 for thumb2 compiled kernels:
    
    Internal error: Oops: 80000005 [#1] SMP THUMB2
    ...
    [<c046497b>] (_raw_spin_unlock_irqrestore) from [<c0024375>]
    (omap3_enter_idle_bm+0xc5/0x178)
    [<c0024375>] (omap3_enter_idle_bm) from [<c0374e63>]
    (cpuidle_enter_state+0x77/0x27c)
    [<c0374e63>] (cpuidle_enter_state) from [<c00627f1>]
    (cpu_startup_entry+0x155/0x23c)
    [<c00627f1>] (cpu_startup_entry) from [<c06b9a47>]
    (start_kernel+0x32f/0x338)
    [<c06b9a47>] (start_kernel) from [<8000807f>] (0x8000807f)
    
    The power management related assembly on omaps needs to interact with
    ARM mode bootrom code, so we need to keep most of the related assembly
    in ARM mode.
    
    Turns out this error is because of missing ENDPROC for assembly code
    as suggested by Stephen Boyd <sboyd@codeaurora.org>. Let's fix the
    problem by adding ENDPROC in two places to sleep34xx.S.
    
    Let's also remove the now duplicate custom code for mode switching.
    This has been unnecessary since commit 6ebbf2ce437b ("ARM: convert
    all "mov.* pc, reg" to "bx reg" for ARMv6+").
    
    And let's also remove the comments about local variables, they are
    now just confusing after the ENDPROC.
    
    The reason why ENDPROC makes a difference is it sets .type and then
    the compiler knows what to do with the thumb bit as explained at:
    
    https://wiki.ubuntu.com/ARM/Thumb2PortingHowto
    
    Reported-by: Kevin Hilman <khilman@kernel.org>
    Tested-by: Kevin Hilman <khilman@linaro.org>
    Signed-off-by: Tony Lindgren <tony@atomide.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 36eb13eb4e65009cd08b3a4b7c2e99e7be1e7e1b
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue May 3 10:33:01 2016 +0200

    drm/i915: Bail out of pipe config compute loop on LPT
    
    commit 2700818ac9f935d8590715eecd7e8cadbca552b6 upstream.
    
    LPT is pch, so might run into the fdi bandwidth constraint (especially
    since it has only 2 lanes). But right now we just force pipe_bpp back
    to 24, resulting in a nice loop (which we bail out with a loud
    WARN_ON). Fix this.
    
    Cc: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    References: https://bugs.freedesktop.org/show_bug.cgi?id=93477
    Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
    Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Link: http://patchwork.freedesktop.org/patch/msgid/1462264381-7573-1-git-send-email-daniel.vetter@ffwll.ch
    (cherry picked from commit f58a1acc7e4a1f37d26124ce4c875c647fbcc61f)
    Signed-off-by: Jani Nikula <jani.nikula@intel.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit bf9d057d06b375e9764694215c5ab861f3cd701f
Author: Lucas Stach <dev@lynxeye.de>
Date:   Thu May 5 10:16:44 2016 -0400

    drm/radeon: fix PLL sharing on DCE6.1 (v2)
    
    commit e3c00d87845ab375f90fa6e10a5e72a3a5778cd3 upstream.
    
    On DCE6.1 PPLL2 is exclusively available to UNIPHYA, so it should not
    be taken into consideration when looking for an already enabled PLL
    to be shared with other outputs.
    
    This fixes the broken VGA port (TRAVIS DP->VGA bridge) on my Richland
    based laptop, where the internal display is connected to UNIPHYA through
    a TRAVIS DP->LVDS bridge.
    
    Bug:
    https://bugs.freedesktop.org/show_bug.cgi?id=78987
    
    v2: agd: add check in radeon_get_shared_nondp_ppll as well, drop
        extra parameter.
    
    Signed-off-by: Lucas Stach <dev@lynxeye.de>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 1fd81b5fbf11819fa0509cfd9258ea4544852914
Author: Andi Kleen <ak@linux.intel.com>
Date:   Sat Feb 8 08:52:00 2014 +0100

    asmlinkage, pnp: Make variables used from assembler code visible
    
    commit a99aa42d0253f033cbb85096d3f2bd82201321e6 upstream.
    
    Mark variables referenced from assembler files visible.
    
    This fixes compile problems with LTO.
    
    Cc: Jaroslav Kysela <perex@perex.cz>
    Signed-off-by: Andi Kleen <ak@linux.intel.com>
    Link: http://lkml.kernel.org/r/1391845930-28580-4-git-send-email-ak@linux.intel.com
    Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
    Cc: Christoph Biedl <linux-kernel.bfrz@manchmal.in-ulm.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit c93dc2bdc3aabcffeffe91f40828ba92560806d1
Author: Marek Szyprowski <m.szyprowski@samsung.com>
Date:   Mon May 9 09:31:47 2016 -0700

    Input: max8997-haptic - fix NULL pointer dereference
    
    commit 6ae645d5fa385f3787bf1723639cd907fe5865e7 upstream.
    
    NULL pointer derefence happens when booting with DTB because the
    platform data for haptic device is not set in supplied data from parent
    MFD device.
    
    The MFD device creates only platform data (from Device Tree) for itself,
    not for haptic child.
    
    Unable to handle kernel NULL pointer dereference at virtual address 0000009c
    pgd = c0004000
    	[0000009c] *pgd=00000000
    	Internal error: Oops: 5 [#1] PREEMPT SMP ARM
    	(max8997_haptic_probe) from [<c03f9cec>] (platform_drv_probe+0x4c/0xb0)
    	(platform_drv_probe) from [<c03f8440>] (driver_probe_device+0x214/0x2c0)
    	(driver_probe_device) from [<c03f8598>] (__driver_attach+0xac/0xb0)
    	(__driver_attach) from [<c03f67ac>] (bus_for_each_dev+0x68/0x9c)
    	(bus_for_each_dev) from [<c03f7a38>] (bus_add_driver+0x1a0/0x218)
    	(bus_add_driver) from [<c03f8db0>] (driver_register+0x78/0xf8)
    	(driver_register) from [<c0101774>] (do_one_initcall+0x90/0x1d8)
    	(do_one_initcall) from [<c0a00dbc>] (kernel_init_freeable+0x15c/0x1fc)
    	(kernel_init_freeable) from [<c06bb5b4>] (kernel_init+0x8/0x114)
    	(kernel_init) from [<c0107938>] (ret_from_fork+0x14/0x3c)
    
    Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
    Fixes: 104594b01ce7 ("Input: add driver support for MAX8997-haptic")
    [k.kozlowski: Write commit message, add CC-stable]
    Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 7721094c03d1caad50b04eb60b06369b8a2e52d3
Author: Al Viro <viro@zeniv.linux.org.uk>
Date:   Thu May 5 16:25:35 2016 -0400

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

commit 8eb11b8826791f694797241bf9c8182dd83e7eae
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date:   Wed May 4 17:52:56 2016 +0800

    crypto: hash - Fix page length clamping in hash walk
    
    commit 13f4bb78cf6a312bbdec367ba3da044b09bf0e29 upstream.
    
    The crypto hash walk code is broken when supplied with an offset
    greater than or equal to PAGE_SIZE.  This patch fixes it by adjusting
    walk->pg and walk->offset when this happens.
    
    Reported-by: Steffen Klassert <steffen.klassert@secunet.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 1f649733e3b6779147fdd81e276078d01a54cc6e
Author: Konstantin Khlebnikov <k.khlebnikov@samsung.com>
Date:   Wed Oct 29 14:51:02 2014 -0700

    mm/balloon_compaction: fix deflation when compaction is disabled
    
    commit 4d88e6f7d5ffc84e6094a47925870f4a130555c2 upstream.
    
    If CONFIG_BALLOON_COMPACTION=n balloon_page_insert() does not link pages
    with balloon and doesn't set PagePrivate flag, as a result
    balloon_page_dequeue() cannot get any pages because it thinks that all
    of them are isolated.  Without balloon compaction nobody can isolate
    ballooned pages.  It's safe to remove this check.
    
    Fixes: d6d86c0a7f8d ("mm/balloon_compaction: redesign ballooned pages management").
    Signed-off-by: Konstantin Khlebnikov <k.khlebnikov@samsung.com>
    Reported-by: Matt Mullins <mmullins@mmlx.us>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Gavin Guo <gavin.guo@canonical.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 33904d89e5114be414d2b1ddd1887954c7bf8c81
Author: Konstantin Khlebnikov <k.khlebnikov@samsung.com>
Date:   Thu Oct 9 15:29:27 2014 -0700

    mm/balloon_compaction: redesign ballooned pages management
    
    commit d6d86c0a7f8ddc5b38cf089222cb1d9540762dc2 upstream.
    
    Sasha Levin reported KASAN splash inside isolate_migratepages_range().
    Problem is in the function __is_movable_balloon_page() which tests
    AS_BALLOON_MAP in page->mapping->flags.  This function has no protection
    against anonymous pages.  As result it tried to check address space flags
    inside struct anon_vma.
    
    Further investigation shows more problems in current implementation:
    
    * Special branch in __unmap_and_move() never works:
      balloon_page_movable() checks page flags and page_count.  In
      __unmap_and_move() page is locked, reference counter is elevated, thus
      balloon_page_movable() always fails.  As a result execution goes to the
      normal migration path.  virtballoon_migratepage() returns
      MIGRATEPAGE_BALLOON_SUCCESS instead of MIGRATEPAGE_SUCCESS,
      move_to_new_page() thinks this is an error code and assigns
      newpage->mapping to NULL.  Newly migrated page lose connectivity with
      balloon an all ability for further migration.
    
    * lru_lock erroneously required in isolate_migratepages_range() for
      isolation ballooned page.  This function releases lru_lock periodically,
      this makes migration mostly impossible for some pages.
    
    * balloon_page_dequeue have a tight race with balloon_page_isolate:
      balloon_page_isolate could be executed in parallel with dequeue between
      picking page from list and locking page_lock.  Race is rare because they
      use trylock_page() for locking.
    
    This patch fixes all of them.
    
    Instead of fake mapping with special flag this patch uses special state of
    page->_mapcount: PAGE_BALLOON_MAPCOUNT_VALUE = -256.  Buddy allocator uses
    PAGE_BUDDY_MAPCOUNT_VALUE = -128 for similar purpose.  Storing mark
    directly in struct page makes everything safer and easier.
    
    PagePrivate is used to mark pages present in page list (i.e.  not
    isolated, like PageLRU for normal pages).  It replaces special rules for
    reference counter and makes balloon migration similar to migration of
    normal pages.  This flag is protected by page_lock together with link to
    the balloon device.
    
    [js] backport to 3.12. MIGRATEPAGE_BALLOON_SUCCESS had to be removed
         from one more place. VM_BUG_ON_PAGE does not exist in 3.12 yet,
         use plain VM_BUG_ON.
    
    Signed-off-by: Konstantin Khlebnikov <k.khlebnikov@samsung.com>
    Reported-by: Sasha Levin <sasha.levin@oracle.com>
    Link: http://lkml.kernel.org/p/53E6CEAA.9020105@oracle.com
    Cc: Rafael Aquini <aquini@redhat.com>
    Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Gavin Guo <gavin.guo@canonical.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 3c3015b8da4e0d506152e67bc8d7a3e4fa4bee98
Author: Takashi Iwai <tiwai@suse.de>
Date:   Sat Sep 5 10:29:09 2015 -0700

    Input: i8042 - lower log level for "no controller" message
    
    commit f5d75341fac6033f6afac900da110cc78e06d40d upstream.
    
    Nowadays the machines without i8042 controller is popular, and no need
    to print "No controller found" message in the error log level, which
    annoys at booting in quiet mode.  Let's lower it info level.
    
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit c0607f45d0a9200813b48d20b38be106ed528e73
Author: Anton Blanchard <anton@samba.org>
Date:   Fri Apr 15 12:06:13 2016 +1000

    powerpc: scan_features() updates incorrect bits for REAL_LE
    
    commit 6997e57d693b07289694239e52a10d2f02c3a46f upstream.
    
    The REAL_LE feature entry in the ibm_pa_feature struct is missing an MMU
    feature value, meaning all the remaining elements initialise the wrong
    values.
    
    This means instead of checking for byte 5, bit 0, we check for byte 0,
    bit 0, and then we incorrectly set the CPU feature bit as well as MMU
    feature bit 1 and CPU user feature bits 0 and 2 (5).
    
    Checking byte 0 bit 0 (IBM numbering), means we're looking at the
    "Memory Management Unit (MMU)" feature - ie. does the CPU have an MMU.
    In practice that bit is set on all platforms which have the property.
    
    This means we set CPU_FTR_REAL_LE always. In practice that seems not to
    matter because all the modern cpus which have this property also
    implement REAL_LE, and we've never needed to disable it.
    
    We're also incorrectly setting MMU feature bit 1, which is:
    
      #define MMU_FTR_TYPE_8xx		0x00000002
    
    Luckily the only place that looks for MMU_FTR_TYPE_8xx is in Book3E
    code, which can't run on the same cpus as scan_features(). So this also
    doesn't matter in practice.
    
    Finally in the CPU user feature mask, we're setting bits 0 and 2. Bit 2
    is not currently used, and bit 0 is:
    
      #define PPC_FEATURE_PPC_LE		0x00000001
    
    Which says the CPU supports the old style "PPC Little Endian" mode.
    Again this should be harmless in practice as no 64-bit CPUs implement
    that mode.
    
    Fix the code by adding the missing initialisation of the MMU feature.
    
    Also add a comment marking CPU user feature bit 2 (0x4) as reserved. It
    would be unsafe to start using it as old kernels incorrectly set it.
    
    Fixes: 44ae3ab3358e ("powerpc: Free up some CPU feature bits by moving out MMU-related features")
    Signed-off-by: Anton Blanchard <anton@samba.org>
    [mpe: Flesh out changelog, add comment reserving 0x4]
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 5fd34224e8a89eae1dc7ba5398a0e316526b7806
Author: Andrey Gelman <andrey.gelman@compulab.co.il>
Date:   Tue Oct 6 15:43:43 2015 -0700

    Input: ads7846 - correct the value got from SPI
    
    commit 879f2fea8a5a748bcbf98d2cdce9139c045505d3 upstream.
    
    According to the touch controller spec, SPI return a 16 bit value, only 12
    bits are valid, they are bit[14-3].
    
    The value of MISO and MOSI can be configured when SPI is in idle mode.
    Currently this touch driver assumes the SPI bus sets the MOSI and MISO in
    low level when SPI bus is in idle mode. So the bit[15] of the value got
    from SPI bus is always 0. But when SPI bus congfigures the MOSI and MISO in
    high level during the SPI idle mode, the bit[15] of the value get from SPI
    is always 1. If bit[15] is not masked, we may get the wrong value.
    
    Mask the invalid bit to make sure the correct value gets returned.
    Regardless of the SPI bus idle configuration.
    
    Signed-off-by: Andrey Gelman <andrey.gelman@compulab.co.il>
    Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
    Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 6b34eefaf36a362b13113d7eb3a61ac858092b4e
Author: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Date:   Mon Apr 4 14:54:59 2016 +0900

    iio: ak8975: Fix NULL pointer exception on early interrupt
    
    commit 07d2390e36ee5b3265e9cc8305f2a106c8721e16 upstream.
    
    In certain probe conditions the interrupt came right after registering
    the handler causing a NULL pointer exception because of uninitialized
    waitqueue:
    
    $ udevadm trigger
    i2c-gpio i2c-gpio-1: using pins 143 (SDA) and 144 (SCL)
    i2c-gpio i2c-gpio-3: using pins 53 (SDA) and 52 (SCL)
    Unable to handle kernel NULL pointer dereference at virtual address 00000000
    pgd = e8b38000
    [00000000] *pgd=00000000
    Internal error: Oops: 5 [#1] SMP ARM
    Modules linked in: snd_soc_i2s(+) i2c_gpio(+) snd_soc_idma snd_soc_s3c_dma snd_soc_core snd_pcm_dmaengine snd_pcm snd_timer snd soundcore ac97_bus spi_s3c64xx pwm_samsung dwc2 exynos_adc phy_exynos_usb2 exynosdrm exynos_rng rng_core rtc_s3c
    CPU: 0 PID: 717 Comm: data-provider-m Not tainted 4.6.0-rc1-next-20160401-00011-g1b8d87473b9e-dirty #101
    Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
    (...)
    (__wake_up_common) from [<c0379624>] (__wake_up+0x38/0x4c)
    (__wake_up) from [<c0a41d30>] (ak8975_irq_handler+0x28/0x30)
    (ak8975_irq_handler) from [<c0386720>] (handle_irq_event_percpu+0x88/0x140)
    (handle_irq_event_percpu) from [<c038681c>] (handle_irq_event+0x44/0x68)
    (handle_irq_event) from [<c0389c40>] (handle_edge_irq+0xf0/0x19c)
    (handle_edge_irq) from [<c0385e04>] (generic_handle_irq+0x24/0x34)
    (generic_handle_irq) from [<c05ee360>] (exynos_eint_gpio_irq+0x50/0x68)
    (exynos_eint_gpio_irq) from [<c0386720>] (handle_irq_event_percpu+0x88/0x140)
    (handle_irq_event_percpu) from [<c038681c>] (handle_irq_event+0x44/0x68)
    (handle_irq_event) from [<c0389a70>] (handle_fasteoi_irq+0xb4/0x194)
    (handle_fasteoi_irq) from [<c0385e04>] (generic_handle_irq+0x24/0x34)
    (generic_handle_irq) from [<c03860b4>] (__handle_domain_irq+0x5c/0xb4)
    (__handle_domain_irq) from [<c0301774>] (gic_handle_irq+0x54/0x94)
    (gic_handle_irq) from [<c030c910>] (__irq_usr+0x50/0x80)
    
    The bug was reproduced on exynos4412-trats2 (with a max77693 device also
    using i2c-gpio) after building max77693 as a module.
    
    Fixes: 94a6d5cf7caa ("iio:ak8975 Implement data ready interrupt handling")
    Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
    Tested-by: Gregor Boirie <gregor.boirie@parrot.com>
    Signed-off-by: Jonathan Cameron <jic23@kernel.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit ba21c6cc79e9f0df4053e5d21a26900b04f91f9e
Author: Jasem Mutlaq <mutlaqja@ikarustech.com>
Date:   Tue Apr 19 10:38:27 2016 +0300

    USB: serial: cp210x: add Straizona Focusers device ids
    
    commit 613ac23a46e10d4d4339febdd534fafadd68e059 upstream.
    
    Adding VID:PID for Straizona Focusers to cp210x driver.
    
    Signed-off-by: Jasem Mutlaq <mutlaqja@ikarustech.com>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 789a64cec8e4ea375b459396c149887a15c26631
Author: Mike Manning <michael@bsch.com.au>
Date:   Mon Apr 18 12:13:23 2016 +0000

    USB: serial: cp210x: add ID for Link ECU
    
    commit 1d377f4d690637a0121eac8701f84a0aa1e69a69 upstream.
    
    The Link ECU is an aftermarket ECU computer for vehicles that provides
    full tuning abilities as well as datalogging and displaying capabilities
    via the USB to Serial adapter built into the device.
    
    Signed-off-by: Mike Manning <michael@bsch.com.au>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 4c54e9feee7aabda1c38ccbb9d747db981ef77d4
Author: Prarit Bhargava <prarit@redhat.com>
Date:   Wed May 4 13:48:56 2016 +0800

    ACPICA: Dispatcher: Update thread ID for recursive method calls
    
    commit 93d68841a23a5779cef6fb9aa0ef32e7c5bd00da upstream.
    
    ACPICA commit 7a3bd2d962f221809f25ddb826c9e551b916eb25
    
    Set the mutex owner thread ID.
    Original patch from: Prarit Bhargava <prarit@redhat.com>
    
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=115121
    Link: https://github.com/acpica/acpica/commit/7a3bd2d9
    Signed-off-by: Prarit Bhargava <prarit@redhat.com>
    Tested-by: Andy Lutomirski <luto@kernel.org> # On a Dell XPS 13 9350
    Signed-off-by: Bob Moore <robert.moore@intel.com>
    Signed-off-by: Lv Zheng <lv.zheng@intel.com>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit edfad738252de419a11a332131f8b31c776c9326
Author: Wang YanQing <udknight@gmail.com>
Date:   Thu May 5 14:14:21 2016 +0100

    x86/sysfb_efi: Fix valid BAR address range check
    
    commit c10fcb14c7afd6688c7b197a814358fecf244222 upstream.
    
    The code for checking whether a BAR address range is valid will break
    out of the loop when a start address of 0x0 is encountered.
    
    This behaviour is wrong since by breaking out of the loop we may miss
    the BAR that describes the EFI frame buffer in a later iteration.
    
    Because of this bug I can't use video=efifb: boot parameter to get
    efifb on my new ThinkPad E550 for my old linux system hard disk with
    3.10 kernel. In 3.10, efifb is the only choice due to DRM/I915 not
    supporting the GPU.
    
    This patch also add a trivial optimization to break out after we find
    the frame buffer address range without testing later BARs.
    
    Signed-off-by: Wang YanQing <udknight@gmail.com>
    [ Rewrote changelog. ]
    Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
    Reviewed-by: Peter Jones <pjones@redhat.com>
    Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
    Cc: David Herrmann <dh.herrmann@gmail.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/1462454061-21561-2-git-send-email-matt@codeblueprint.co.uk
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit ead9e8f5de9c40e39acb4000cae91e66d2fabc6e
Author: Matt Fleming <matt@codeblueprint.co.uk>
Date:   Tue May 3 20:29:39 2016 +0100

    MAINTAINERS: Remove asterisk from EFI directory names
    
    commit e8dfe6d8f6762d515fcd4f30577f7bfcf7659887 upstream.
    
    Mark reported that having asterisks on the end of directory names
    confuses get_maintainer.pl when it encounters subdirectories, and that
    my name does not appear when run on drivers/firmware/efi/libstub.
    
    Reported-by: Mark Rutland <mark.rutland@arm.com>
    Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
    Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
    Cc: Catalin Marinas <catalin.marinas@arm.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/1462303781-8686-2-git-send-email-matt@codeblueprint.co.uk
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 2b59dc4c0b0bac71134e650f4efa4991113ebdfb
Author: Sven Eckelmann <sven@narfation.org>
Date:   Sun Mar 20 12:27:53 2016 +0100

    batman-adv: Reduce refcnt of removed router when updating route
    
    commit d1a65f1741bfd9c69f9e4e2ad447a89b6810427d upstream.
    
    _batadv_update_route rcu_derefences orig_ifinfo->router outside of a
    spinlock protected region to print some information messages to the debug
    log. But this pointer is not checked again when the new pointer is assigned
    in the spinlock protected region. Thus is can happen that the value of
    orig_ifinfo->router changed in the meantime and thus the reference counter
    of the wrong router gets reduced after the spinlock protected region.
    
    Just rcu_dereferencing the value of orig_ifinfo->router inside the spinlock
    protected region (which also set the new pointer) is enough to get the
    correct old router object.
    
    Fixes: e1a5382f978b ("batman-adv: Make orig_node->router an rcu protected pointer")
    Signed-off-by: Sven Eckelmann <sven@narfation.org>
    Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
    Signed-off-by: Antonio Quartulli <a@unstable.cc>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 58d2b7773c3b117f3feca0bca1402ca1bc275f04
Author: Linus Lüssing <linus.luessing@c0d3.blue>
Date:   Fri Mar 11 14:04:49 2016 +0100

    batman-adv: Fix broadcast/ogm queue limit on a removed interface
    
    commit c4fdb6cff2aa0ae740c5f19b6f745cbbe786d42f upstream.
    
    When removing a single interface while a broadcast or ogm packet is
    still pending then we will free the forward packet without releasing the
    queue slots again.
    
    This patch is supposed to fix this issue.
    
    Fixes: 6d5808d4ae1b ("batman-adv: Add missing hardif_free_ref in forw_packet_free")
    Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
    [sven@narfation.org: fix conflicts with current version]
    Signed-off-by: Sven Eckelmann <sven@narfation.org>
    Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
    Signed-off-by: Antonio Quartulli <a@unstable.cc>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit d469ee2137785282930819cce741e6543163d41b
Author: Sven Eckelmann <sven@narfation.org>
Date:   Fri Feb 26 17:56:13 2016 +0100

    batman-adv: Check skb size before using encapsulated ETH+VLAN header
    
    commit c78296665c3d81f040117432ab9e1cb125521b0c upstream.
    
    The encapsulated ethernet and VLAN header may be outside the received
    ethernet frame. Thus the skb buffer size has to be checked before it can be
    parsed to find out if it encapsulates another batman-adv packet.
    
    Fixes: 420193573f11 ("batman-adv: softif bridge loop avoidance")
    Signed-off-by: Sven Eckelmann <sven@narfation.org>
    Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
    Signed-off-by: Antonio Quartulli <a@unstable.cc>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit cdfaba237820a99bad60d947530725151a611ca0
Author: Mathias Krause <minipli@googlemail.com>
Date:   Thu May 5 16:22:26 2016 -0700

    proc: prevent accessing /proc/<PID>/environ until it's ready
    
    commit 8148a73c9901a8794a50f950083c00ccf97d43b3 upstream.
    
    If /proc/<PID>/environ gets read before the envp[] array is fully set up
    in create_{aout,elf,elf_fdpic,flat}_tables(), we might end up trying to
    read more bytes than are actually written, as env_start will already be
    set but env_end will still be zero, making the range calculation
    underflow, allowing to read beyond the end of what has been written.
    
    Fix this as it is done for /proc/<PID>/cmdline by testing env_end for
    zero.  It is, apparently, intentionally set last in create_*_tables().
    
    This bug was found by the PaX size_overflow plugin that detected the
    arithmetic underflow of 'this_len = env_end - (env_start + src)' when
    env_end is still zero.
    
    The expected consequence is that userland trying to access
    /proc/<PID>/environ of a not yet fully set up process may get
    inconsistent data as we're in the middle of copying in the environment
    variables.
    
    Fixes: https://forums.grsecurity.net/viewtopic.php?f=3&t=4363
    Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=116461
    Signed-off-by: Mathias Krause <minipli@googlemail.com>
    Cc: Emese Revfy <re.emese@gmail.com>
    Cc: Pax Team <pageexec@freemail.hu>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Mateusz Guzik <mguzik@redhat.com>
    Cc: Alexey Dobriyan <adobriyan@gmail.com>
    Cc: Cyrill Gorcunov <gorcunov@openvz.org>
    Cc: Jarod Wilson <jarod@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit ddfe8a6b2b302bbff5ed638bbe26008434c60a8a
Author: Sascha Hauer <s.hauer@pengutronix.de>
Date:   Wed Apr 20 13:34:31 2016 +0000

    ARM: SoCFPGA: Fix secondary CPU startup in thumb2 kernel
    
    commit 5616f36713ea77f57ae908bf2fef641364403c9f upstream.
    
    The secondary CPU starts up in ARM mode. When the kernel is compiled in
    thumb2 mode we have to explicitly compile the secondary startup
    trampoline in ARM mode, otherwise the CPU will go to Nirvana.
    
    Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
    Reported-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
    Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
    Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
    Signed-off-by: Kevin Hilman <khilman@baylibre.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit ba4d65ded3156a9b93f1de2904fcc88d6ddc7445
Author: Arnd Bergmann <arnd@arndb.de>
Date:   Mon Mar 14 15:29:44 2016 +0100

    lpfc: fix misleading indentation
    
    commit aeb6641f8ebdd61939f462a8255b316f9bfab707 upstream.
    
    gcc-6 complains about the indentation of the lpfc_destroy_vport_work_array()
    call in lpfc_online(), which clearly doesn't look right:
    
    drivers/scsi/lpfc/lpfc_init.c: In function 'lpfc_online':
    drivers/scsi/lpfc/lpfc_init.c:2880:3: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation]
       lpfc_destroy_vport_work_array(phba, vports);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/scsi/lpfc/lpfc_init.c:2863:2: note: ...this 'if' clause, but it is not
      if (vports != NULL)
      ^~
    
    Looking at the patch that introduced this code, it's clear that the
    behavior is correct and the indentation is wrong.
    
    This fixes the indentation and adds curly braces around the previous
    if() block for clarity, as that is most likely what caused the code
    to be misindented in the first place.
    
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Fixes: 549e55cd2a1b ("[SCSI] lpfc 8.2.2 : Fix locking around HBA's port_list")
    Reviewed-by: Sebastian Herbszt <herbszt@gmx.de>
    Reviewed-by: Hannes Reinecke <hare@suse.com>
    Reviewed-by: Ewan D. Milne <emilne@redhat.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 3dcc015c66c066e40966d898ba29e5a9be601293
Author: Linus Walleij <linus.walleij@linaro.org>
Date:   Wed Feb 24 09:39:11 2016 +0100

    clk: versatile: sp810: support reentrance
    
    commit ec7957a6aa0aaf981fb8356dc47a2cdd01cde03c upstream.
    
    Despite care take to allocate clocks state containers the
    SP810 driver actually just supports creating one instance:
    all clocks registered for every instance will end up with the
    exact same name and __clk_init() will fail.
    
    Rename the timclken<0> .. timclken<n> to sp810_<instance>_<n>
    so every clock on every instance gets a unique name.
    
    This is necessary for the RealView PBA8 which has two SP810
    blocks: the second block will not register its clocks unless
    every clock on every instance is unique and results in boot
    logs like this:
    
    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 0 at ../drivers/clk/versatile/clk-sp810.c:137
      clk_sp810_of_setup+0x110/0x154()
    Modules linked in:
    CPU: 0 PID: 0 Comm: swapper/0 Not tainted
    4.5.0-rc2-00030-g352718fc39f6-dirty #225
    Hardware name: ARM RealView Machine (Device Tree Support)
    [<c00167f8>] (unwind_backtrace) from [<c0013204>]
                 (show_stack+0x10/0x14)
    [<c0013204>] (show_stack) from [<c01a049c>]
                 (dump_stack+0x84/0x9c)
    [<c01a049c>] (dump_stack) from [<c0024990>]
                 (warn_slowpath_common+0x74/0xb0)
    [<c0024990>] (warn_slowpath_common) from [<c0024a68>]
                 (warn_slowpath_null+0x1c/0x24)
    [<c0024a68>] (warn_slowpath_null) from [<c051eb44>]
                 (clk_sp810_of_setup+0x110/0x154)
    [<c051eb44>] (clk_sp810_of_setup) from [<c051e3a4>]
                 (of_clk_init+0x12c/0x1c8)
    [<c051e3a4>] (of_clk_init) from [<c0504714>]
                 (time_init+0x20/0x2c)
    [<c0504714>] (time_init) from [<c0501b18>]
                 (start_kernel+0x244/0x3c4)
    [<c0501b18>] (start_kernel) from [<7000807c>] (0x7000807c)
    ---[ end trace cb88537fdc8fa200 ]---
    
    Cc: Michael Turquette <mturquette@baylibre.com>
    Cc: Pawel Moll <pawel.moll@arm.com>
    Fixes: 6e973d2c4385 "clk: vexpress: Add separate SP810 driver"
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit a85fd4d030557fd4fbcca4cca8a799f164db5f05
Author: Dan Streetman <dan.streetman@canonical.com>
Date:   Thu Jan 14 13:42:32 2016 -0500

    nbd: ratelimit error msgs after socket close
    
    commit da6ccaaa79caca4f38b540b651238f87215217a2 upstream.
    
    Make the "Attempted send on closed socket" error messages generated in
    nbd_request_handler() ratelimited.
    
    When the nbd socket is shutdown, the nbd_request_handler() function emits
    an error message for every request remaining in its queue.  If the queue
    is large, this will spam a large amount of messages to the log.  There's
    no need for a separate error message for each request, so this patch
    ratelimits it.
    
    In the specific case this was found, the system was virtual and the error
    messages were logged to the serial port, which overwhelmed it.
    
    Fixes: 4d48a542b427 ("nbd: fix I/O hang on disconnected nbds")
    Signed-off-by: Dan Streetman <dan.streetman@canonical.com>
    Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 72faba32bca12d07fb259573e30ebc925657627b
Author: Marco Angaroni <marcoangaroni@gmail.com>
Date:   Sat Mar 5 12:10:02 2016 +0100

    ipvs: correct initial offset of Call-ID header search in SIP persistence engine
    
    commit 7617a24f83b5d67f4dab1844956be1cebc44aec8 upstream.
    
    The IPVS SIP persistence engine is not able to parse the SIP header
    "Call-ID" when such header is inserted in the first positions of
    the SIP message.
    
    When IPVS is configured with "--pe sip" option, like for example:
    ipvsadm -A -u 1.2.3.4:5060 -s rr --pe sip -p 120 -o
    some particular messages (see below for details) do not create entries
    in the connection template table, which can be listed with:
    ipvsadm -Lcn --persistent-conn
    
    Problematic SIP messages are SIP responses having "Call-ID" header
    positioned just after message first line:
    SIP/2.0 200 OK
    [Call-ID header here]
    [rest of the headers]
    
    When "Call-ID" header is positioned down (after a few other headers)
    it is correctly recognized.
    
    This is due to the data offset used in get_callid function call inside
    ip_vs_pe_sip.c file: since dptr already points to the start of the
    SIP message, the value of dataoff should be initially 0.
    Otherwise the header is searched starting from some bytes after the
    first character of the SIP message.
    
    Fixes: 758ff0338722 ("IPVS: sip persistence engine")
    Signed-off-by: Marco Angaroni <marcoangaroni@gmail.com>
    Acked-by: Julian Anastasov <ja@ssi.bg>
    Signed-off-by: Simon Horman <horms@verge.net.au>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 376539fa006eb2cba95c4c534ae5357c3f3c6d22
Author: Behan Webster <behanw@converseincode.com>
Date:   Thu Feb 13 12:21:48 2014 -0800

    x86: LLVMLinux: Fix "incomplete type const struct x86cpu_device_id"
    
    commit c4586256f0c440bc2bdb29d2cbb915f0ca785d26 upstream.
    
    Similar to the fix in 40413dcb7b273bda681dca38e6ff0bbb3728ef11
    
    MODULE_DEVICE_TABLE(x86cpu, ...) expects the struct to be called struct
    x86cpu_device_id, and not struct x86_cpu_id which is what is used in the rest
    of the kernel code.  Although gcc seems to ignore this error, clang fails
    without this define to fix the name.
    
    Code from drivers/thermal/x86_pkg_temp_thermal.c
    static const struct x86_cpu_id __initconst pkg_temp_thermal_ids[] = { ... };
    MODULE_DEVICE_TABLE(x86cpu, pkg_temp_thermal_ids);
    
    Error from clang:
    drivers/thermal/x86_pkg_temp_thermal.c:577:1: error: variable has
          incomplete type 'const struct x86cpu_device_id'
    MODULE_DEVICE_TABLE(x86cpu, pkg_temp_thermal_ids);
    ^
    include/linux/module.h:145:3: note: expanded from macro
          'MODULE_DEVICE_TABLE'
      MODULE_GENERIC_TABLE(type##_device, name)
      ^
    include/linux/module.h:87:32: note: expanded from macro
          'MODULE_GENERIC_TABLE'
    extern const struct gtype##_id __mod_##gtype##_table            \
                                   ^
    <scratch space>:143:1: note: expanded from here
    __mod_x86cpu_device_table
    ^
    drivers/thermal/x86_pkg_temp_thermal.c:577:1: note: forward declaration of
          'struct x86cpu_device_id'
    include/linux/module.h:145:3: note: expanded from macro
          'MODULE_DEVICE_TABLE'
      MODULE_GENERIC_TABLE(type##_device, name)
      ^
    include/linux/module.h:87:21: note: expanded from macro
          'MODULE_GENERIC_TABLE'
    extern const struct gtype##_id __mod_##gtype##_table            \
                        ^
    <scratch space>:141:1: note: expanded from here
    x86cpu_device_id
    ^
    1 error generated.
    
    Signed-off-by: Behan Webster <behanw@converseincode.com>
    Signed-off-by: Jan-Simon Möller <dl9pf@gmx.de>
    Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    [added vmbus, mei, and rapdio #defines, needed for 3.14 - gregkh]
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 0a0ff4ebd29deed338d7b6989b93333df75b462a
Author: Paolo Bonzini <pbonzini@redhat.com>
Date:   Thu Mar 31 09:38:51 2016 +0200

    compiler-gcc: disable -ftracer for __noclone functions
    
    commit 95272c29378ee7dc15f43fa2758cb28a5913a06d upstream.
    
    -ftracer can duplicate asm blocks causing compilation to fail in
    noclone functions.  For example, KVM declares a global variable
    in an asm like
    
        asm("2: ... \n
             .pushsection data \n
             .global vmx_return \n
             vmx_return: .long 2b");
    
    and -ftracer causes a double declaration.
    
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Michal Marek <mmarek@suse.cz>
    Cc: stable@vger.kernel.org
    Cc: kvm@vger.kernel.org
    Reported-by: Linda Walsh <lkml@tlinx.org>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit d9aa9f580cb2c2e79ea9573447c807607b195123
Author: John Stultz <john.stultz@linaro.org>
Date:   Mon Oct 7 15:52:00 2013 -0700

    cpuset: Fix potential deadlock w/ set_mems_allowed
    
    commit db751fe3ea6880ff5ac5abe60cb7b80deb5a4140 upstream.
    
    After adding lockdep support to seqlock/seqcount structures,
    I started seeing the following warning:
    
    [    1.070907] ======================================================
    [    1.072015] [ INFO: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected ]
    [    1.073181] 3.11.0+ #67 Not tainted
    [    1.073801] ------------------------------------------------------
    [    1.074882] kworker/u4:2/708 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
    [    1.076088]  (&p->mems_allowed_seq){+.+...}, at: [<ffffffff81187d7f>] new_slab+0x5f/0x280
    [    1.077572]
    [    1.077572] and this task is already holding:
    [    1.078593]  (&(&q->__queue_lock)->rlock){..-...}, at: [<ffffffff81339f03>] blk_execute_rq_nowait+0x53/0xf0
    [    1.080042] which would create a new lock dependency:
    [    1.080042]  (&(&q->__queue_lock)->rlock){..-...} -> (&p->mems_allowed_seq){+.+...}
    [    1.080042]
    [    1.080042] but this new dependency connects a SOFTIRQ-irq-safe lock:
    [    1.080042]  (&(&q->__queue_lock)->rlock){..-...}
    [    1.080042] ... which became SOFTIRQ-irq-safe at:
    [    1.080042]   [<ffffffff810ec179>] __lock_acquire+0x5b9/0x1db0
    [    1.080042]   [<ffffffff810edfe5>] lock_acquire+0x95/0x130
    [    1.080042]   [<ffffffff818968a1>] _raw_spin_lock+0x41/0x80
    [    1.080042]   [<ffffffff81560c9e>] scsi_device_unbusy+0x7e/0xd0
    [    1.080042]   [<ffffffff8155a612>] scsi_finish_command+0x32/0xf0
    [    1.080042]   [<ffffffff81560e91>] scsi_softirq_done+0xa1/0x130
    [    1.080042]   [<ffffffff8133b0f3>] blk_done_softirq+0x73/0x90
    [    1.080042]   [<ffffffff81095dc0>] __do_softirq+0x110/0x2f0
    [    1.080042]   [<ffffffff81095fcd>] run_ksoftirqd+0x2d/0x60
    [    1.080042]   [<ffffffff810bc506>] smpboot_thread_fn+0x156/0x1e0
    [    1.080042]   [<ffffffff810b3916>] kthread+0xd6/0xe0
    [    1.080042]   [<ffffffff818980ac>] ret_from_fork+0x7c/0xb0
    [    1.080042]
    [    1.080042] to a SOFTIRQ-irq-unsafe lock:
    [    1.080042]  (&p->mems_allowed_seq){+.+...}
    [    1.080042] ... which became SOFTIRQ-irq-unsafe at:
    [    1.080042] ...  [<ffffffff810ec1d3>] __lock_acquire+0x613/0x1db0
    [    1.080042]   [<ffffffff810edfe5>] lock_acquire+0x95/0x130
    [    1.080042]   [<ffffffff810b3df2>] kthreadd+0x82/0x180
    [    1.080042]   [<ffffffff818980ac>] ret_from_fork+0x7c/0xb0
    [    1.080042]
    [    1.080042] other info that might help us debug this:
    [    1.080042]
    [    1.080042]  Possible interrupt unsafe locking scenario:
    [    1.080042]
    [    1.080042]        CPU0                    CPU1
    [    1.080042]        ----                    ----
    [    1.080042]   lock(&p->mems_allowed_seq);
    [    1.080042]                                local_irq_disable();
    [    1.080042]                                lock(&(&q->__queue_lock)->rlock);
    [    1.080042]                                lock(&p->mems_allowed_seq);
    [    1.080042]   <Interrupt>
    [    1.080042]     lock(&(&q->__queue_lock)->rlock);
    [    1.080042]
    [    1.080042]  *** DEADLOCK ***
    
    The issue stems from the kthreadd() function calling set_mems_allowed
    with irqs enabled. While its possibly unlikely for the actual deadlock
    to trigger, a fix is fairly simple: disable irqs before taking the
    mems_allowed_seq lock.
    
    Signed-off-by: John Stultz <john.stultz@linaro.org>
    Signed-off-by: Peter Zijlstra <peterz@infradead.org>
    Acked-by: Li Zefan <lizefan@huawei.com>
    Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: netdev@vger.kernel.org
    Link: http://lkml.kernel.org/r/1381186321-4906-4-git-send-email-john.stultz@linaro.org
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit afa099d3a6ef1aef855cbda0a03536617d0287a1
Author: Ewan D. Milne <emilne@redhat.com>
Date:   Thu Jan 15 10:02:12 2015 -0500

    scsi: Avoid crashing if device uses DIX but adapter does not support it
    
    commit 91724c20613484555ba7e7b3d8549dac1e24f7a8 upstream.
    
    This can happen if a multipathed device uses DIX and another path is
    added via an adapter that does not support it.  Multipath should not
    allow this path to be added, but we should not depend upon that to avoid
    crashing.
    
    Signed-off-by: Ewan D. Milne <emilne@redhat.com>
    Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit d9a229158da32c2a45129362c85b3c9eb3c64bcc
Author: Adrian Hunter <adrian.hunter@intel.com>
Date:   Tue Mar 11 10:09:36 2014 +0200

    mmc: sdhci: Allow for irq being shared
    
    commit 655bca7616bf6076d30b14d1478bca6807d49c45 upstream.
    
    If the SDHCI irq is shared with another device then the interrupt
    handler can get called while SDHCI is runtime suspended.  That is
    harmless but the warning message is not useful so remove it.  Also
    returning IRQ_NONE is more appropriate.
    
    Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
    Signed-off-by: Chris Ball <chris@printf.net>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 928efcfeabf11efc514cd8871a8debec9520467f
Author: Jiri Slaby <jslaby@suse.cz>
Date:   Tue May 3 16:33:43 2016 +0200

    Revert "xfs: add capability check to free eofblocks ioctl"
    
    This reverts commit eaeeaec383f3228446715e660851f73423501eba, upstream
    commit 8c567a7fab6e086a0284eee2db82348521e7120c.
    
    It was (mis)applied twice to stable-3.12.
    
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>
    Cc: Brian Foster <bfoster@redhat.com>
    Cc: Dave Chinner <dchinner@redhat.com>
    Cc: Gao feng <gaofeng@cn.fujitsu.com>
    Cc: Dwight Engen <dwight.engen@oracle.com>
    Cc: Ben Myers <bpm@sgi.com>

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

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

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

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

commit fecd577eb784143585dfc5bfa14913b4f1628940
Author: Pali Rohár <pali.rohar@gmail.com>
Date:   Fri Feb 19 10:35:39 2016 -0800

    ARM: OMAP3: Add cpuidle parameters table for omap3430
    
    commit 98f42221501353067251fbf11e732707dbb68ce3 upstream.
    
    Based on CPU type choose generic omap3 or omap3430 specific cpuidle
    parameters. Parameters for omap3430 were measured on Nokia N900 device and
    added by commit 5a1b1d3a9efa ("OMAP3: RX-51: Pass cpu idle parameters")
    which were later removed by commit 231900afba52 ("ARM: OMAP3: cpuidle -
    remove rx51 cpuidle parameters table") due to huge code complexity.
    
    This patch brings cpuidle parameters for omap3430 devices again, but uses
    simple condition based on CPU type.
    
    Fixes: 231900afba52 ("ARM: OMAP3: cpuidle - remove rx51 cpuidle
    parameters table")
    Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
    Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Signed-off-by: Tony Lindgren <tony@atomide.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 891923b0fb91aebb8e702e15788ae38fdf43e22a
Author: Borislav Petkov <bp@suse.de>
Date:   Mon Mar 7 16:44:44 2016 -0300

    perf stat: Document --detailed option
    
    commit f594bae08183fb6b57db55387794ece3e1edf6f6 upstream.
    
    I'm surprised this remained undocumented since at least 2011. And it is
    actually a very useful switch, as Steve and I came to realize recently.
    
    Add the text from
    
      2cba3ffb9a9d ("perf stat: Add -d -d and -d -d -d options to show more CPU events")
    
    which added the incrementing aspect to -d.
    
    Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Signed-off-by: Borislav Petkov <bp@suse.de>
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Davidlohr Bueso <dbueso@suse.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Mel Gorman <mgorman@suse.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Fixes: 2cba3ffb9a9d ("perf stat: Add -d -d and -d -d -d options to show more CPU events")
    Link: http://lkml.kernel.org/r/1457347294-32546-1-git-send-email-bp@alien8.de
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 76be64a958b56361329e41c61f6dda30c2af96f7
Author: Vitaly Kuznetsov <vkuznets@redhat.com>
Date:   Fri Feb 27 11:25:51 2015 -0800

    Drivers: hv: vmbus: prevent cpu offlining on newer hypervisors
    
    commit e513229b4c386e6c9f66298c13fde92f73e6e1ac upstream.
    
    When an SMP Hyper-V guest is running on top of 2012R2 Server and secondary
    cpus are sent offline (with echo 0 > /sys/devices/system/cpu/cpu$cpu/online)
    the system freeze is observed. This happens due to the fact that on newer
    hypervisors (Win8, WS2012R2, ...) vmbus channel handlers are distributed
    across all cpus (see init_vp_index() function in drivers/hv/channel_mgmt.c)
    and on cpu offlining nobody reassigns them to CPU0. Prevent cpu offlining
    when vmbus is loaded until the issue is fixed host-side.
    
    This patch also disables hibernation but it is OK as it is also broken (MCE
    error is hit on resume). Suspend still works.
    
    Tested with WS2008R2 and WS2012R2.
    
    Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
    Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
    [ 3chas3@gmail.com: rebase to 3.14-stable ]
    Signed-off-by: Chas Williams <3chas3@gmail.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit c7ecfa39d66c62ee662ae6906a2eec3d28a96e6a
Author: Vasily Kulikov <segoon@openwall.com>
Date:   Wed Sep 9 15:36:00 2015 -0700

    include/linux/poison.h: fix LIST_POISON{1,2} offset
    
    commit 8a5e5e02fc83aaf67053ab53b359af08c6c49aaf upstream.
    
    Poison pointer values should be small enough to find a room in
    non-mmap'able/hardly-mmap'able space.  E.g.  on x86 "poison pointer space"
    is located starting from 0x0.  Given unprivileged users cannot mmap
    anything below mmap_min_addr, it should be safe to use poison pointers
    lower than mmap_min_addr.
    
    The current poison pointer values of LIST_POISON{1,2} might be too big for
    mmap_min_addr values equal or less than 1 MB (common case, e.g.  Ubuntu
    uses only 0x10000).  There is little point to use such a big value given
    the "poison pointer space" below 1 MB is not yet exhausted.  Changing it
    to a smaller value solves the problem for small mmap_min_addr setups.
    
    The values are suggested by Solar Designer:
    http://www.openwall.com/lists/oss-security/2015/05/02/6
    
    Signed-off-by: Vasily Kulikov <segoon@openwall.com>
    Cc: Solar Designer <solar@openwall.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

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

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

commit 0aec7cb0918094622c2ce7c6cf3a4332267546ae
Author: Michael Hennerich <michael.hennerich@analog.com>
Date:   Mon Feb 22 10:20:24 2016 +0100

    drivers/misc/ad525x_dpot: AD5274 fix RDAC read back errors
    
    commit f3df53e4d70b5736368a8fe8aa1bb70c1cb1f577 upstream.
    
    Fix RDAC read back errors caused by a typo. Value must shift by 2.
    
    Fixes: a4bd394956f2 ("drivers/misc/ad525x_dpot.c: new features")
    Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 2e3697060a29a4f30aaaff72d943bcf4b1ad3d73
Author: Geert Uytterhoeven <geert@linux-m68k.org>
Date:   Tue Mar 1 09:50:01 2016 +0100

    rtc: vr41xx: Wire up alarm_irq_enable
    
    commit a25f4a95ec3cded34c1250364eba704c5e4fdac4 upstream.
    
    drivers/rtc/rtc-vr41xx.c:229: warning: ‘vr41xx_rtc_alarm_irq_enable’ defined but not used
    
    Apparently the conversion to alarm_irq_enable forgot to wire up the
    callback.
    
    Fixes: 16380c153a69c378 ("RTC: Convert rtc drivers to use the alarm_irq_enable method")
    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
    Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 7aa637fa23533727621cdeefc56d0ef5be02a15c
Author: Ben Hutchings <ben@decadent.org.uk>
Date:   Mon Dec 14 14:29:23 2015 +0000

    misc/bmp085: Enable building as a module
    
    commit 50e6315dba721cbc24ccd6d7b299f1782f210a98 upstream.
    
    Commit 985087dbcb02 'misc: add support for bmp18x chips to the bmp085
    driver' changed the BMP085 config symbol to a boolean.  I see no
    reason why the shared code cannot be built as a module, so change it
    back to tristate.
    
    Fixes: 985087dbcb02 ("misc: add support for bmp18x chips to the bmp085 driver")
    Cc: Eric Andersson <eric.andersson@unixphere.com>
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    Acked-by: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 864fad3f55aacc9c1501548dc632e0adb40cb3aa
Author: Sushaanth Srirangapathi <sushaanth.s@ti.com>
Date:   Mon Feb 29 18:42:19 2016 +0530

    fbdev: da8xx-fb: fix videomodes of lcd panels
    
    commit 713fced8d10fa1c759c8fb6bf9aaa681bae68cad upstream.
    
    Commit 028cd86b794f4a ("video: da8xx-fb: fix the polarities of the
    hsync/vsync pulse") fixes polarities of HSYNC/VSYNC pulse but
    forgot to update known_lcd_panels[] which had sync values
    according to old logic. This breaks LCD at least on DA850 EVM.
    
    This patch fixes this issue and I have tested this for panel
    "Sharp_LK043T1DG01" using DA850 EVM board.
    
    Fixes: 028cd86b794f4a ("video: da8xx-fb: fix the polarities of the hsync/vsync pulse")
    Signed-off-by: Sushaanth Srirangapathi <sushaanth.s@ti.com>
    Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 34eedb704cd7e877784fa764acf790713bf3870d
Author: Arnd Bergmann <arnd@arndb.de>
Date:   Tue Mar 15 14:53:29 2016 -0700

    paride: make 'verbose' parameter an 'int' again
    
    commit dec63a4dec2d6d01346fd5d96062e67c0636852b upstream.
    
    gcc-6.0 found an ancient bug in the paride driver, which had a
    "module_param(verbose, bool, 0);" since before 2.6.12, but actually uses
    it to accept '0', '1' or '2' as arguments:
    
      drivers/block/paride/pd.c: In function 'pd_init_dev_parms':
      drivers/block/paride/pd.c:298:29: warning: comparison of constant '1' with boolean expression is always false [-Wbool-compare]
       #define DBMSG(msg) ((verbose>1)?(msg):NULL)
    
    In 2012, Rusty did a cleanup patch that also changed the type of the
    variable to 'bool', which introduced what is now a gcc warning.
    
    This changes the type back to 'int' and adapts the module_param() line
    instead, so it should work as documented in case anyone ever cares about
    running the ancient driver with debugging.
    
    Fixes: 90ab5ee94171 ("module_param: make bool parameters really bool (drivers & misc)")
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Rusty Russell <rusty@rustcorp.com.au>
    Cc: Tim Waugh <tim@cyberelk.net>
    Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
    Cc: Jens Axboe <axboe@fb.com>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 4aa63af38d182aa029283e109b0e3b390b3fb7c3
Author: Roman Pen <roman.penyaev@profitbricks.com>
Date:   Tue Apr 26 13:15:35 2016 +0200

    workqueue: fix ghost PENDING flag while doing MQ IO
    
    commit 346c09f80459a3ad97df1816d6d606169a51001a upstream.
    
    The bug in a workqueue leads to a stalled IO request in MQ ctx->rq_list
    with the following backtrace:
    
    [  601.347452] INFO: task kworker/u129:5:1636 blocked for more than 120 seconds.
    [  601.347574]       Tainted: G           O    4.4.5-1-storage+ #6
    [  601.347651] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [  601.348142] kworker/u129:5  D ffff880803077988     0  1636      2 0x00000000
    [  601.348519] Workqueue: ibnbd_server_fileio_wq ibnbd_dev_file_submit_io_worker [ibnbd_server]
    [  601.348999]  ffff880803077988 ffff88080466b900 ffff8808033f9c80 ffff880803078000
    [  601.349662]  ffff880807c95000 7fffffffffffffff ffffffff815b0920 ffff880803077ad0
    [  601.350333]  ffff8808030779a0 ffffffff815b01d5 0000000000000000 ffff880803077a38
    [  601.350965] Call Trace:
    [  601.351203]  [<ffffffff815b0920>] ? bit_wait+0x60/0x60
    [  601.351444]  [<ffffffff815b01d5>] schedule+0x35/0x80
    [  601.351709]  [<ffffffff815b2dd2>] schedule_timeout+0x192/0x230
    [  601.351958]  [<ffffffff812d43f7>] ? blk_flush_plug_list+0xc7/0x220
    [  601.352208]  [<ffffffff810bd737>] ? ktime_get+0x37/0xa0
    [  601.352446]  [<ffffffff815b0920>] ? bit_wait+0x60/0x60
    [  601.352688]  [<ffffffff815af784>] io_schedule_timeout+0xa4/0x110
    [  601.352951]  [<ffffffff815b3a4e>] ? _raw_spin_unlock_irqrestore+0xe/0x10
    [  601.353196]  [<ffffffff815b093b>] bit_wait_io+0x1b/0x70
    [  601.353440]  [<ffffffff815b056d>] __wait_on_bit+0x5d/0x90
    [  601.353689]  [<ffffffff81127bd0>] wait_on_page_bit+0xc0/0xd0
    [  601.353958]  [<ffffffff81096db0>] ? autoremove_wake_function+0x40/0x40
    [  601.354200]  [<ffffffff81127cc4>] __filemap_fdatawait_range+0xe4/0x140
    [  601.354441]  [<ffffffff81127d34>] filemap_fdatawait_range+0x14/0x30
    [  601.354688]  [<ffffffff81129a9f>] filemap_write_and_wait_range+0x3f/0x70
    [  601.354932]  [<ffffffff811ced3b>] blkdev_fsync+0x1b/0x50
    [  601.355193]  [<ffffffff811c82d9>] vfs_fsync_range+0x49/0xa0
    [  601.355432]  [<ffffffff811cf45a>] blkdev_write_iter+0xca/0x100
    [  601.355679]  [<ffffffff81197b1a>] __vfs_write+0xaa/0xe0
    [  601.355925]  [<ffffffff81198379>] vfs_write+0xa9/0x1a0
    [  601.356164]  [<ffffffff811c59d8>] kernel_write+0x38/0x50
    
    The underlying device is a null_blk, with default parameters:
    
      queue_mode    = MQ
      submit_queues = 1
    
    Verification that nullb0 has something inflight:
    
    root@pserver8:~# cat /sys/block/nullb0/inflight
           0        1
    root@pserver8:~# find /sys/block/nullb0/mq/0/cpu* -name rq_list -print -exec cat {} \;
    ...
    /sys/block/nullb0/mq/0/cpu2/rq_list
    CTX pending:
            ffff8838038e2400
    ...
    
    During debug it became clear that stalled request is always inserted in
    the rq_list from the following path:
    
       save_stack_trace_tsk + 34
       blk_mq_insert_requests + 231
       blk_mq_flush_plug_list + 281
       blk_flush_plug_list + 199
       wait_on_page_bit + 192
       __filemap_fdatawait_range + 228
       filemap_fdatawait_range + 20
       filemap_write_and_wait_range + 63
       blkdev_fsync + 27
       vfs_fsync_range + 73
       blkdev_write_iter + 202
       __vfs_write + 170
       vfs_write + 169
       kernel_write + 56
    
    So blk_flush_plug_list() was called with from_schedule == true.
    
    If from_schedule is true, that means that finally blk_mq_insert_requests()
    offloads execution of __blk_mq_run_hw_queue() and uses kblockd workqueue,
    i.e. it calls kblockd_schedule_delayed_work_on().
    
    That means, that we race with another CPU, which is about to execute
    __blk_mq_run_hw_queue() work.
    
    Further debugging shows the following traces from different CPUs:
    
      CPU#0                                  CPU#1
      ----------------------------------     -------------------------------
      reqeust A inserted
      STORE hctx->ctx_map[0] bit marked
      kblockd_schedule...() returns 1
      <schedule to kblockd workqueue>
                                             request B inserted
                                             STORE hctx->ctx_map[1] bit marked
                                             kblockd_schedule...() returns 0
      *** WORK PENDING bit is cleared ***
      flush_busy_ctxs() is executed, but
      bit 1, set by CPU#1, is not observed
    
    As a result request B pended forever.
    
    This behaviour can be explained by speculative LOAD of hctx->ctx_map on
    CPU#0, which is reordered with clear of PENDING bit and executed _before_
    actual STORE of bit 1 on CPU#1.
    
    The proper fix is an explicit full barrier <mfence>, which guarantees
    that clear of PENDING bit is to be executed before all possible
    speculative LOADS or STORES inside actual work function.
    
    Signed-off-by: Roman Pen <roman.penyaev@profitbricks.com>
    Cc: Gioh Kim <gi-oh.kim@profitbricks.com>
    Cc: Michael Wang <yun.wang@profitbricks.com>
    Cc: Tejun Heo <tj@kernel.org>
    Cc: Jens Axboe <axboe@kernel.dk>
    Cc: linux-block@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 5114cf469deeca0556168a8d8eafb20255dd8b57
Author: Laszlo Ersek <lersek@redhat.com>
Date:   Thu Apr 21 18:21:11 2016 +0200

    efi: Fix out-of-bounds read in variable_matches()
    
    commit 630ba0cc7a6dbafbdee43795617c872b35cde1b4 upstream.
    
    The variable_matches() function can currently read "var_name[len]", for
    example when:
    
     - var_name[0] == 'a',
     - len == 1
     - match_name points to the NUL-terminated string "ab".
    
    This function is supposed to accept "var_name" inputs that are not
    NUL-terminated (hence the "len" parameter"). Document the function, and
    access "var_name[*match]" only if "*match" is smaller than "len".
    
    Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
    Signed-off-by: Laszlo Ersek <lersek@redhat.com>
    Cc: Peter Jones <pjones@redhat.com>
    Cc: Matthew Garrett <mjg59@coreos.com>
    Cc: Jason Andryuk <jandryuk@gmail.com>
    Cc: Jani Nikula <jani.nikula@linux.intel.com>
    Link: http://thread.gmane.org/gmane.comp.freedesktop.xorg.drivers.intel/86906
    Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

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

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

commit c0bc1ca73fdbb4f52dd4268b308abff4b0b5ec21
Author: Arnd Bergmann <arnd@arndb.de>
Date:   Mon Jan 25 18:07:33 2016 +0100

    ASoC: s3c24xx: use const snd_soc_component_driver pointer
    
    commit ba4bc32eaa39ba7687f0958ae90eec94da613b46 upstream.
    
    An older patch to convert the API in the s3c i2s driver
    ended up passing a const pointer into a function that takes
    a non-const pointer, so we now get a warning:
    
    sound/soc/samsung/s3c2412-i2s.c: In function 's3c2412_iis_dev_probe':
    sound/soc/samsung/s3c2412-i2s.c:172:9: error: passing argument 3 of 's3c_i2sv2_register_component' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
    
    However, the s3c_i2sv2_register_component() function again
    passes the pointer into another function taking a const, so
    we just need to change its prototype.
    
    Fixes: eca3b01d0885 ("ASoC: switch over to use snd_soc_register_component() on s3c i2s")
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit a4e2a2d56bbca13c91adabaaf3dc38e7b5692c30
Author: Tony Luck <tony.luck@intel.com>
Date:   Fri Apr 29 15:42:25 2016 +0200

    EDAC: i7core, sb_edac: Don't return NOTIFY_BAD from mce_decoder callback
    
    commit c4fc1956fa31003bfbe4f597e359d751568e2954 upstream.
    
    Both of these drivers can return NOTIFY_BAD, but this terminates
    processing other callbacks that were registered later on the chain.
    Since the driver did nothing to log the error it seems wrong to prevent
    other interested parties from seeing it. E.g. neither of them had even
    bothered to check the type of the error to see if it was a memory error
    before the return NOTIFY_BAD.
    
    Signed-off-by: Tony Luck <tony.luck@intel.com>
    Acked-by: Aristeu Rozanski <aris@redhat.com>
    Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
    Cc: linux-edac <linux-edac@vger.kernel.org>
    Link: http://lkml.kernel.org/r/72937355dd92318d2630979666063f8a2853495b.1461864507.git.tony.luck@intel.com
    Signed-off-by: Borislav Petkov <bp@suse.de>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

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

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

commit 8c29c640402a7baf7fa9a31cd5bda288090a19ac
Author: Vladis Dronov <vdronov@redhat.com>
Date:   Thu Mar 31 10:53:42 2016 -0700

    Input: gtco - fix crash on detecting device without endpoints
    
    commit 162f98dea487206d9ab79fc12ed64700667a894d upstream.
    
    The gtco driver expects at least one valid endpoint. If given malicious
    descriptors that specify 0 for the number of endpoints, it will crash in
    the probe function. Ensure there is at least one endpoint on the interface
    before using it.
    
    Also let's fix a minor coding style issue.
    
    The full correct report of this issue can be found in the public
    Red Hat Bugzilla:
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1283385
    
    Reported-by: Ralf Spenneberg <ralf@spenneberg.net>
    Signed-off-by: Vladis Dronov <vdronov@redhat.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit f0c7c896e3b4f661a076c517c42e38bcb846b5c3
Author: Dmitry Ivanov <dmitrijs.ivanovs@ubnt.com>
Date:   Wed Apr 6 17:23:18 2016 +0300

    nl80211: check netlink protocol in socket release notification
    
    commit 8f815cdde3e550e10c2736990d791f60c2ce43eb upstream.
    
    A non-privileged user can create a netlink socket with the same port_id as
    used by an existing open nl80211 netlink socket (e.g. as used by a hostapd
    process) with a different protocol number.
    
    Closing this socket will then lead to the notification going to nl80211's
    socket release notification handler, and possibly cause an action such as
    removing a virtual interface.
    
    Fix this issue by checking that the netlink protocol is NETLINK_GENERIC.
    Since generic netlink has no notifier chain of its own, we can't fix the
    problem more generically.
    
    Fixes: 026331c4d9b5 ("cfg80211/mac80211: allow registering for and sending action frames")
    Signed-off-by: Dmitry Ivanov <dima@ubnt.com>
    [rewrite commit message]
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

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

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

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

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

commit bc1fdc2409b7ef531df59c5fdb615ca1191f584e
Author: Robert Dobrowolski <robert.dobrowolski@linux.intel.com>
Date:   Thu Mar 24 03:30:07 2016 -0700

    usb: hcd: out of bounds access in for_each_companion
    
    commit e86103a75705c7c530768f4ffaba74cf382910f2 upstream.
    
    On BXT platform Host Controller and Device Controller figure as
    same PCI device but with different device function. HCD should
    not pass data to Device Controller but only to Host Controllers.
    Checking if companion device is Host Controller, otherwise skip.
    
    Signed-off-by: Robert Dobrowolski <robert.dobrowolski@linux.intel.com>
    Acked-by: Alan Stern <stern@rowland.harvard.edu>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

commit 2a22991995e53f7b9a2b08d3401c45746cc5bc9a
Author: Lu Baolu <baolu.lu@linux.intel.com>
Date:   Fri Apr 8 16:25:09 2016 +0300

    usb: xhci: fix wild pointers in xhci_mem_cleanup
    
    commit 71504062a7c34838c3fccd92c447f399d3cb5797 upstream.
    
    This patch fixes some wild pointers produced by xhci_mem_cleanup.
    These wild pointers will cause system crash if xhci_mem_cleanup()
    is called twice.
    
    Reported-and-tested-by: Pengcheng Li <lpc.li@hisilicon.com>
    Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
    Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>

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

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

commit c4ec97c341630e22e546c1a628a3664f17f7ffc8
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date:   Fri Mar 18 22:42:40 2016 +0800

    crypto: gcm - Fix rfc4543 decryption crash
    
    This bug has already bee fixed upstream since 4.2.  However, it
    was fixed during the AEAD conversion so no fix was backported to
    the older kernels.
    
    When we do an RFC 4543 decryption, we will end up writing the
    ICV beyond the end of the dst buffer.  This should lead to a
    crash but for some reason it was never noticed.
    
    This patch fixes it by only writing back the ICV for encryption.
    
    Fixes: d733ac90f9fe ("crypto: gcm - fix rfc4543 to handle async...")
    Reported-by: Patrick Meyer <patrick.meyer@vasgard.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Jiri Slaby <jslaby@suse.cz>