commit 5ce2e060020bf0efa1ce8a261a4d51abe70dc9ea
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Tue Sep 10 10:31:05 2019 +0100

    Linux 4.9.192

commit 362da40c50a1b6127f763e52286328b790928014
Author: Eric Dumazet <edumazet@google.com>
Date:   Tue Aug 27 03:33:12 2019 -0700

    mld: fix memory leak in mld_del_delrec()
    
    [ Upstream commit a84d016479896b5526a2cc54784e6ffc41c9d6f6 ]
    
    Similar to the fix done for IPv4 in commit e5b1c6c6277d
    ("igmp: fix memory leak in igmpv3_del_delrec()"), we need to
    make sure mca_tomb and mca_sources are not blindly overwritten.
    
    Using swap() then a call to ip6_mc_clear_src() will take care
    of the missing free.
    
    BUG: memory leak
    unreferenced object 0xffff888117d9db00 (size 64):
      comm "syz-executor247", pid 6918, jiffies 4294943989 (age 25.350s)
      hex dump (first 32 bytes):
        00 00 00 00 00 00 00 00 fe 88 00 00 00 00 00 00  ................
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
      backtrace:
        [<000000005b463030>] kmemleak_alloc_recursive include/linux/kmemleak.h:43 [inline]
        [<000000005b463030>] slab_post_alloc_hook mm/slab.h:522 [inline]
        [<000000005b463030>] slab_alloc mm/slab.c:3319 [inline]
        [<000000005b463030>] kmem_cache_alloc_trace+0x145/0x2c0 mm/slab.c:3548
        [<00000000939cbf94>] kmalloc include/linux/slab.h:552 [inline]
        [<00000000939cbf94>] kzalloc include/linux/slab.h:748 [inline]
        [<00000000939cbf94>] ip6_mc_add1_src net/ipv6/mcast.c:2236 [inline]
        [<00000000939cbf94>] ip6_mc_add_src+0x31f/0x420 net/ipv6/mcast.c:2356
        [<00000000d8972221>] ip6_mc_source+0x4a8/0x600 net/ipv6/mcast.c:449
        [<000000002b203d0d>] do_ipv6_setsockopt.isra.0+0x1b92/0x1dd0 net/ipv6/ipv6_sockglue.c:748
        [<000000001f1e2d54>] ipv6_setsockopt+0x89/0xd0 net/ipv6/ipv6_sockglue.c:944
        [<00000000c8f7bdf9>] udpv6_setsockopt+0x4e/0x90 net/ipv6/udp.c:1558
        [<000000005a9a0c5e>] sock_common_setsockopt+0x38/0x50 net/core/sock.c:3139
        [<00000000910b37b2>] __sys_setsockopt+0x10f/0x220 net/socket.c:2084
        [<00000000e9108023>] __do_sys_setsockopt net/socket.c:2100 [inline]
        [<00000000e9108023>] __se_sys_setsockopt net/socket.c:2097 [inline]
        [<00000000e9108023>] __x64_sys_setsockopt+0x26/0x30 net/socket.c:2097
        [<00000000f4818160>] do_syscall_64+0x76/0x1a0 arch/x86/entry/common.c:296
        [<000000008d367e8f>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
    
    Fixes: 1666d49e1d41 ("mld: do not remove mld souce list info when set link down")
    Fixes: 9c8bb163ae78 ("igmp, mld: Fix memory leak in igmpv3/mld_del_delrec()")
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Reported-by: syzbot <syzkaller@googlegroups.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 217fc82985419ffb4ff8bdc5b4617b42d8f8c020
Author: Willem de Bruijn <willemb@google.com>
Date:   Tue Aug 27 15:09:33 2019 -0400

    tcp: inherit timestamp on mtu probe
    
    [ Upstream commit 888a5c53c0d8be6e98bc85b677f179f77a647873 ]
    
    TCP associates tx timestamp requests with a byte in the bytestream.
    If merging skbs in tcp_mtu_probe, migrate the tstamp request.
    
    Similar to MSG_EOR, do not allow moving a timestamp from any segment
    in the probe but the last. This to avoid merging multiple timestamps.
    
    Tested with the packetdrill script at
    https://github.com/wdebruij/packetdrill/commits/mtu_probe-1
    
    Link: http://patchwork.ozlabs.org/patch/1143278/#2232897
    Fixes: 4ed2d765dfac ("net-timestamp: TCP timestamping")
    Signed-off-by: Willem de Bruijn <willemb@google.com>
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 9e208ccf32eaf35738b342ee9dd491a99f8ac8e2
Author: Chen-Yu Tsai <wens@csie.org>
Date:   Thu Aug 29 11:17:24 2019 +0800

    net: stmmac: dwmac-rk: Don't fail if phy regulator is absent
    
    [ Upstream commit 3b25528e1e355c803e73aa326ce657b5606cda73 ]
    
    The devicetree binding lists the phy phy as optional. As such, the
    driver should not bail out if it can't find a regulator. Instead it
    should just skip the remaining regulator related code and continue
    on normally.
    
    Skip the remainder of phy_power_on() if a regulator supply isn't
    available. This also gets rid of the bogus return code.
    
    Fixes: 2e12f536635f ("net: stmmac: dwmac-rk: Use standard devicetree property for phy regulator")
    Signed-off-by: Chen-Yu Tsai <wens@csie.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit a794b0ea63b946a706fa59e687637e2663ec0409
Author: Feng Sun <loyou85@gmail.com>
Date:   Mon Aug 26 14:46:04 2019 +0800

    net: fix skb use after free in netpoll
    
    [ Upstream commit 2c1644cf6d46a8267d79ed95cb9b563839346562 ]
    
    After commit baeababb5b85d5c4e6c917efe2a1504179438d3b
    ("tun: return NET_XMIT_DROP for dropped packets"),
    when tun_net_xmit drop packets, it will free skb and return NET_XMIT_DROP,
    netpoll_send_skb_on_dev will run into following use after free cases:
    1. retry netpoll_start_xmit with freed skb;
    2. queue freed skb in npinfo->txq.
    queue_process will also run into use after free case.
    
    hit netpoll_send_skb_on_dev first case with following kernel log:
    
    [  117.864773] kernel BUG at mm/slub.c:306!
    [  117.864773] invalid opcode: 0000 [#1] SMP PTI
    [  117.864774] CPU: 3 PID: 2627 Comm: loop_printmsg Kdump: loaded Tainted: P           OE     5.3.0-050300rc5-generic #201908182231
    [  117.864775] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014
    [  117.864775] RIP: 0010:kmem_cache_free+0x28d/0x2b0
    [  117.864781] Call Trace:
    [  117.864781]  ? tun_net_xmit+0x21c/0x460
    [  117.864781]  kfree_skbmem+0x4e/0x60
    [  117.864782]  kfree_skb+0x3a/0xa0
    [  117.864782]  tun_net_xmit+0x21c/0x460
    [  117.864782]  netpoll_start_xmit+0x11d/0x1b0
    [  117.864788]  netpoll_send_skb_on_dev+0x1b8/0x200
    [  117.864789]  __br_forward+0x1b9/0x1e0 [bridge]
    [  117.864789]  ? skb_clone+0x53/0xd0
    [  117.864790]  ? __skb_clone+0x2e/0x120
    [  117.864790]  deliver_clone+0x37/0x50 [bridge]
    [  117.864790]  maybe_deliver+0x89/0xc0 [bridge]
    [  117.864791]  br_flood+0x6c/0x130 [bridge]
    [  117.864791]  br_dev_xmit+0x315/0x3c0 [bridge]
    [  117.864792]  netpoll_start_xmit+0x11d/0x1b0
    [  117.864792]  netpoll_send_skb_on_dev+0x1b8/0x200
    [  117.864792]  netpoll_send_udp+0x2c6/0x3e8
    [  117.864793]  write_msg+0xd9/0xf0 [netconsole]
    [  117.864793]  console_unlock+0x386/0x4e0
    [  117.864793]  vprintk_emit+0x17e/0x280
    [  117.864794]  vprintk_default+0x29/0x50
    [  117.864794]  vprintk_func+0x4c/0xbc
    [  117.864794]  printk+0x58/0x6f
    [  117.864795]  loop_fun+0x24/0x41 [printmsg_loop]
    [  117.864795]  kthread+0x104/0x140
    [  117.864795]  ? 0xffffffffc05b1000
    [  117.864796]  ? kthread_park+0x80/0x80
    [  117.864796]  ret_from_fork+0x35/0x40
    
    Signed-off-by: Feng Sun <loyou85@gmail.com>
    Signed-off-by: Xiaojun Zhao <xiaojunzhao141@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 5ad424f5d529657039cbbb89018ac8706af173a8
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Sat Sep 7 14:25:54 2019 -0700

    Revert "x86/apic: Include the LDR when clearing out APIC registers"
    
    [ Upstream commit 950b07c14e8c59444e2359f15fd70ed5112e11a0 ]
    
    This reverts commit 558682b5291937a70748d36fd9ba757fb25b99ae.
    
    Chris Wilson reports that it breaks his CPU hotplug test scripts.  In
    particular, it breaks offlining and then re-onlining the boot CPU, which
    we treat specially (and the BIOS does too).
    
    The symptoms are that we can offline the CPU, but it then does not come
    back online again:
    
        smpboot: CPU 0 is now offline
        smpboot: Booting Node 0 Processor 0 APIC 0x0
        smpboot: do_boot_cpu failed(-1) to wakeup CPU#0
    
    Thomas says he knows why it's broken (my personal suspicion: our magic
    handling of the "cpu0_logical_apicid" thing), but for 5.3 the right fix
    is to just revert it, since we've never touched the LDR bits before, and
    it's not worth the risk to do anything else at this stage.
    
    [ Hotpluging of the boot CPU is special anyway, and should be off by
      default. See the "BOOTPARAM_HOTPLUG_CPU0" config option and the
      cpu0_hotplug kernel parameter.
    
      In general you should not do it, and it has various known limitations
      (hibernate and suspend require the boot CPU, for example).
    
      But it should work, even if the boot CPU is special and needs careful
      treatment       - Linus ]
    
    Link: https://lore.kernel.org/lkml/156785100521.13300.14461504732265570003@skylake-alporthouse-com/
    Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
    Acked-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: Bandan Das <bsd@redhat.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 8df65c47f486c22a0387c1eb29a1392fee32df83
Author: Martin Sperl <kernel@martin.sperl.org>
Date:   Sat Mar 30 09:31:00 2019 +0000

    spi: bcm2835aux: fix corruptions for longer spi transfers
    
    [ Upstream commit 73b114ee7db1750c0b535199fae383b109bd61d0 ]
    
    On long running tests with a mcp2517fd can controller it showed that
    on rare occations the data read shows corruptions for longer spi transfers.
    
    Example of a 22 byte transfer:
    
    expected (as captured on logic analyzer):
    FF FF 78 00 00 00 08 06 00 00 91 20 77 56 84 85 86 87 88 89 8a 8b
    
    read by the driver:
    FF FF 78 00 00 00 08 06 00 00 91 20 77 56 84 88 89 8a 00 00 8b 9b
    
    To fix this use BCM2835_AUX_SPI_STAT_RX_LVL to determine when we may
    read data from the fifo reliably without any corruption.
    
    Surprisingly the only values ever empirically read in
    BCM2835_AUX_SPI_STAT_RX_LVL are 0x00, 0x10, 0x20 and 0x30.
    So whenever the mask is not 0 we can read from the fifo in a safe manner.
    
    The patch has now been tested intensively and we are no longer
    able to reproduce the "RX" issue any longer.
    
    Fixes: 1ea29b39f4c812ec ("spi: bcm2835aux: add bcm2835 auxiliary spi device...")
    Reported-by: Hubert Denkmair <h.denkmair@intence.de>
    Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
    Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit da21b79a983626bd2e4f05cc8522cd625d5abbb9
Author: Martin Sperl <kernel@martin.sperl.org>
Date:   Sat Mar 30 09:30:59 2019 +0000

    spi: bcm2835aux: remove dangerous uncontrolled read of fifo
    
    [ Upstream commit c7de8500fd8ecbb544846dd5f11dca578c3777e1 ]
    
    This read of the fifo is a potential candidate for a race condition
    as the spi transfer is not necessarily finished and so can lead to
    an early read of the fifo that still misses data.
    
    So it has been removed.
    
    Fixes: 1ea29b39f4c812ec ("spi: bcm2835aux: add bcm2835 auxiliary spi device...")
    Suggested-by: Hubert Denkmair <h.denkmair@intence.de>
    Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
    Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit ddf552e7786f4bf9127f68c70a1ad4fa2f7e99a6
Author: Martin Sperl <kernel@martin.sperl.org>
Date:   Sat Mar 30 09:30:58 2019 +0000

    spi: bcm2835aux: unifying code between polling and interrupt driven code
    
    [ Upstream commit 7188a6f0eee3f1fae5d826cfc6d569657ff950ec ]
    
    Sharing more code between polling and interrupt-driven mode.
    
    Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
    Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit fd5811e894bb55196556cab53b66b05d6fd23e62
Author: Rob Herring <robh@kernel.org>
Date:   Thu May 3 13:09:44 2018 -0500

    spi: bcm2835aux: ensure interrupts are enabled for shared handler
    
    [ Upstream commit bc519d9574618e47a0c788000fb78da95e18d953 ]
    
    The BCM2835 AUX SPI has a shared interrupt line (with AUX UART).
    Downstream fixes this with an AUX irqchip to demux the IRQ sources and a
    DT change which breaks compatibility with older kernels. The AUX irqchip
    was already rejected for upstream[1] and the DT change would break
    working systems if the DTB is updated to a newer one. The latter issue
    was brought to my attention by Alex Graf.
    
    The root cause however is a bug in the shared handler. Shared handlers
    must check that interrupts are actually enabled before servicing the
    interrupt. Add a check that the TXEMPTY or IDLE interrupts are enabled.
    
    [1] https://patchwork.kernel.org/patch/9781221/
    
    Cc: Alexander Graf <agraf@suse.de>
    Cc: Marc Zyngier <marc.zyngier@arm.com>
    Cc: Mark Brown <broonie@kernel.org>
    Cc: Eric Anholt <eric@anholt.net>
    Cc: Stefan Wahren <stefan.wahren@i2se.com>
    Cc: Florian Fainelli <f.fainelli@gmail.com>
    Cc: Ray Jui <rjui@broadcom.com>
    Cc: Scott Branden <sbranden@broadcom.com>
    Cc: bcm-kernel-feedback-list@broadcom.com
    Cc: linux-spi@vger.kernel.org
    Cc: linux-rpi-kernel@lists.infradead.org
    Cc: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Rob Herring <robh@kernel.org>
    Reviewed-by: Eric Anholt <eric@anholt.net>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 05700fe421866f60f63fbb3a02852425a9bd9447
Author: Luis Henriques <lhenriques@suse.com>
Date:   Fri Jul 19 15:32:19 2019 +0100

    libceph: allow ceph_buffer_put() to receive a NULL ceph_buffer
    
    [ Upstream commit 5c498950f730aa17c5f8a2cdcb903524e4002ed2 ]
    
    Signed-off-by: Luis Henriques <lhenriques@suse.com>
    Reviewed-by: Jeff Layton <jlayton@kernel.org>
    Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit b62d9297953f679747172465012daca87bee3f51
Author: Andrew Jones <drjones@redhat.com>
Date:   Thu Aug 22 13:03:05 2019 +0200

    KVM: arm/arm64: Only skip MMIO insn once
    
    [ Upstream commit 2113c5f62b7423e4a72b890bd479704aa85c81ba ]
    
    If after an MMIO exit to userspace a VCPU is immediately run with an
    immediate_exit request, such as when a signal is delivered or an MMIO
    emulation completion is needed, then the VCPU completes the MMIO
    emulation and immediately returns to userspace. As the exit_reason
    does not get changed from KVM_EXIT_MMIO in these cases we have to
    be careful not to complete the MMIO emulation again, when the VCPU is
    eventually run again, because the emulation does an instruction skip
    (and doing too many skips would be a waste of guest code :-) We need
    to use additional VCPU state to track if the emulation is complete.
    As luck would have it, we already have 'mmio_needed', which even
    appears to be used in this way by other architectures already.
    
    Fixes: 0d640732dbeb ("arm64: KVM: Skip MMIO insn after emulation")
    Acked-by: Mark Rutland <mark.rutland@arm.com>
    Signed-off-by: Andrew Jones <drjones@redhat.com>
    Signed-off-by: Marc Zyngier <maz@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 941c7ede13f7964a9de4024d6d75f9f0c7d01f2c
Author: Luis Henriques <lhenriques@suse.com>
Date:   Fri Jul 19 15:32:22 2019 +0100

    ceph: fix buffer free while holding i_ceph_lock in fill_inode()
    
    [ Upstream commit af8a85a41734f37b67ba8ce69d56b685bee4ac48 ]
    
    Calling ceph_buffer_put() in fill_inode() may result in freeing the
    i_xattrs.blob buffer while holding the i_ceph_lock.  This can be fixed by
    postponing the call until later, when the lock is released.
    
    The following backtrace was triggered by fstests generic/070.
    
      BUG: sleeping function called from invalid context at mm/vmalloc.c:2283
      in_atomic(): 1, irqs_disabled(): 0, pid: 3852, name: kworker/0:4
      6 locks held by kworker/0:4/3852:
       #0: 000000004270f6bb ((wq_completion)ceph-msgr){+.+.}, at: process_one_work+0x1b8/0x5f0
       #1: 00000000eb420803 ((work_completion)(&(&con->work)->work)){+.+.}, at: process_one_work+0x1b8/0x5f0
       #2: 00000000be1c53a4 (&s->s_mutex){+.+.}, at: dispatch+0x288/0x1476
       #3: 00000000559cb958 (&mdsc->snap_rwsem){++++}, at: dispatch+0x2eb/0x1476
       #4: 000000000d5ebbae (&req->r_fill_mutex){+.+.}, at: dispatch+0x2fc/0x1476
       #5: 00000000a83d0514 (&(&ci->i_ceph_lock)->rlock){+.+.}, at: fill_inode.isra.0+0xf8/0xf70
      CPU: 0 PID: 3852 Comm: kworker/0:4 Not tainted 5.2.0+ #441
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58-prebuilt.qemu.org 04/01/2014
      Workqueue: ceph-msgr ceph_con_workfn
      Call Trace:
       dump_stack+0x67/0x90
       ___might_sleep.cold+0x9f/0xb1
       vfree+0x4b/0x60
       ceph_buffer_release+0x1b/0x60
       fill_inode.isra.0+0xa9b/0xf70
       ceph_fill_trace+0x13b/0xc70
       ? dispatch+0x2eb/0x1476
       dispatch+0x320/0x1476
       ? __mutex_unlock_slowpath+0x4d/0x2a0
       ceph_con_workfn+0xc97/0x2ec0
       ? process_one_work+0x1b8/0x5f0
       process_one_work+0x244/0x5f0
       worker_thread+0x4d/0x3e0
       kthread+0x105/0x140
       ? process_one_work+0x5f0/0x5f0
       ? kthread_park+0x90/0x90
       ret_from_fork+0x3a/0x50
    
    Signed-off-by: Luis Henriques <lhenriques@suse.com>
    Reviewed-by: Jeff Layton <jlayton@kernel.org>
    Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 9cec64d3f6d91da590cc4069172254067b43d0b2
Author: Luis Henriques <lhenriques@suse.com>
Date:   Fri Jul 19 15:32:20 2019 +0100

    ceph: fix buffer free while holding i_ceph_lock in __ceph_setxattr()
    
    [ Upstream commit 86968ef21596515958d5f0a40233d02be78ecec0 ]
    
    Calling ceph_buffer_put() in __ceph_setxattr() may end up freeing the
    i_xattrs.prealloc_blob buffer while holding the i_ceph_lock.  This can be
    fixed by postponing the call until later, when the lock is released.
    
    The following backtrace was triggered by fstests generic/117.
    
      BUG: sleeping function called from invalid context at mm/vmalloc.c:2283
      in_atomic(): 1, irqs_disabled(): 0, pid: 650, name: fsstress
      3 locks held by fsstress/650:
       #0: 00000000870a0fe8 (sb_writers#8){.+.+}, at: mnt_want_write+0x20/0x50
       #1: 00000000ba0c4c74 (&type->i_mutex_dir_key#6){++++}, at: vfs_setxattr+0x55/0xa0
       #2: 000000008dfbb3f2 (&(&ci->i_ceph_lock)->rlock){+.+.}, at: __ceph_setxattr+0x297/0x810
      CPU: 1 PID: 650 Comm: fsstress Not tainted 5.2.0+ #437
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58-prebuilt.qemu.org 04/01/2014
      Call Trace:
       dump_stack+0x67/0x90
       ___might_sleep.cold+0x9f/0xb1
       vfree+0x4b/0x60
       ceph_buffer_release+0x1b/0x60
       __ceph_setxattr+0x2b4/0x810
       __vfs_setxattr+0x66/0x80
       __vfs_setxattr_noperm+0x59/0xf0
       vfs_setxattr+0x81/0xa0
       setxattr+0x115/0x230
       ? filename_lookup+0xc9/0x140
       ? rcu_read_lock_sched_held+0x74/0x80
       ? rcu_sync_lockdep_assert+0x2e/0x60
       ? __sb_start_write+0x142/0x1a0
       ? mnt_want_write+0x20/0x50
       path_setxattr+0xba/0xd0
       __x64_sys_lsetxattr+0x24/0x30
       do_syscall_64+0x50/0x1c0
       entry_SYSCALL_64_after_hwframe+0x49/0xbe
      RIP: 0033:0x7ff23514359a
    
    Signed-off-by: Luis Henriques <lhenriques@suse.com>
    Reviewed-by: Jeff Layton <jlayton@kernel.org>
    Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 3f452f4018658720c0c19c59e62f22dda7cd105c
Author: Wenwen Wang <wenwen@cs.uga.edu>
Date:   Sun Aug 18 15:23:01 2019 -0500

    IB/mlx4: Fix memory leaks
    
    [ Upstream commit 5c1baaa82cea2c815a5180ded402a7cd455d1810 ]
    
    In mlx4_ib_alloc_pv_bufs(), 'tun_qp->tx_ring' is allocated through
    kcalloc(). However, it is not always deallocated in the following execution
    if an error occurs, leading to memory leaks. To fix this issue, free
    'tun_qp->tx_ring' whenever an error occurs.
    
    Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
    Acked-by: Leon Romanovsky <leonro@mellanox.com>
    Link: https://lore.kernel.org/r/1566159781-4642-1-git-send-email-wenwen@cs.uga.edu
    Signed-off-by: Doug Ledford <dledford@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 6be6f81601e670d11a02ce67f69cde0352f8f77a
Author: Vitaly Kuznetsov <vkuznets@redhat.com>
Date:   Mon Aug 19 16:44:09 2019 +0200

    Tools: hv: kvp: eliminate 'may be used uninitialized' warning
    
    [ Upstream commit 89eb4d8d25722a0a0194cf7fa47ba602e32a6da7 ]
    
    When building hv_kvp_daemon GCC-8.3 complains:
    
    hv_kvp_daemon.c: In function ‘kvp_get_ip_info.constprop’:
    hv_kvp_daemon.c:812:30: warning: ‘ip_buffer’ may be used uninitialized in this function [-Wmaybe-uninitialized]
      struct hv_kvp_ipaddr_value *ip_buffer;
    
    this seems to be a false positive: we only use ip_buffer when
    op == KVP_OP_GET_IP_INFO and it is only unset when op == KVP_OP_ENUMERATE.
    
    Silence the warning by initializing ip_buffer to NULL.
    
    Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit b31da50f90dd2d63811a3881472cd2f4ac448ea4
Author: Tho Vu <tho.vu.wh@rvc.renesas.com>
Date:   Fri Aug 16 17:17:02 2019 +0200

    ravb: Fix use-after-free ravb_tstamp_skb
    
    [ Upstream commit cfef46d692efd852a0da6803f920cc756eea2855 ]
    
    When a Tx timestamp is requested, a pointer to the skb is stored in the
    ravb_tstamp_skb struct. This was done without an skb_get. There exists
    the possibility that the skb could be freed by ravb_tx_free (when
    ravb_tx_free is called from ravb_start_xmit) before the timestamp was
    processed, leading to a use-after-free bug.
    
    Use skb_get when filling a ravb_tstamp_skb struct, and add appropriate
    frees/consumes when a ravb_tstamp_skb struct is freed.
    
    Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper")
    Signed-off-by: Tho Vu <tho.vu.wh@rvc.renesas.com>
    Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
    Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 102a39cb10f7e6fe5cbbc7fbe4dbc0ffdddce764
Author: Wenwen Wang <wenwen@cs.uga.edu>
Date:   Thu Aug 15 15:29:51 2019 -0500

    wimax/i2400m: fix a memory leak bug
    
    [ Upstream commit 44ef3a03252844a8753479b0cea7f29e4a804bdc ]
    
    In i2400m_barker_db_init(), 'options_orig' is allocated through kstrdup()
    to hold the original command line options. Then, the options are parsed.
    However, if an error occurs during the parsing process, 'options_orig' is
    not deallocated, leading to a memory leak bug. To fix this issue, free
    'options_orig' before returning the error.
    
    Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 41cc386c90cbd81576de407de5d96ad59834eae8
Author: Wenwen Wang <wenwen@cs.uga.edu>
Date:   Wed Aug 14 13:56:43 2019 -0500

    net: kalmia: fix memory leaks
    
    [ Upstream commit f1472cb09f11ddb41d4be84f0650835cb65a9073 ]
    
    In kalmia_init_and_get_ethernet_addr(), 'usb_buf' is allocated through
    kmalloc(). In the following execution, if the 'status' returned by
    kalmia_send_init_packet() is not 0, 'usb_buf' is not deallocated, leading
    to memory leaks. To fix this issue, add the 'out' label to free 'usb_buf'.
    
    Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 08f7aa4e3082648e59c56c1b1ae52fd883511c33
Author: Wenwen Wang <wenwen@cs.uga.edu>
Date:   Wed Aug 14 13:03:38 2019 -0500

    cx82310_eth: fix a memory leak bug
    
    [ Upstream commit 1eca92eef18719027d394bf1a2d276f43e7cf886 ]
    
    In cx82310_bind(), 'dev->partial_data' is allocated through kmalloc().
    Then, the execution waits for the firmware to become ready. If the firmware
    is not ready in time, the execution is terminated. However, the allocated
    'dev->partial_data' is not deallocated on this path, leading to a memory
    leak bug. To fix this issue, free 'dev->partial_data' before returning the
    error.
    
    Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit b57c8626385d319d4ce8d47feeba7d28fb3e5f02
Author: Wenwen Wang <wenwen@cs.uga.edu>
Date:   Wed Aug 14 01:38:39 2019 -0500

    net: myri10ge: fix memory leaks
    
    [ Upstream commit 20fb7c7a39b5c719e2e619673b5f5729ee7d2306 ]
    
    In myri10ge_probe(), myri10ge_alloc_slices() is invoked to allocate slices
    related structures. Later on, myri10ge_request_irq() is used to get an irq.
    However, if this process fails, the allocated slices related structures are
    not deallocated, leading to memory leaks. To fix this issue, revise the
    target label of the goto statement to 'abort_with_slices'.
    
    Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 0b9e6253db9f607a167a53fe0006820c68b32aff
Author: Wenwen Wang <wenwen@cs.uga.edu>
Date:   Tue Aug 13 04:18:52 2019 -0500

    cxgb4: fix a memory leak bug
    
    [ Upstream commit c554336efa9bbc28d6ec14efbee3c7d63c61a34f ]
    
    In blocked_fl_write(), 't' is not deallocated if bitmap_parse_user() fails,
    leading to a memory leak bug. To fix this issue, free t before returning
    the error.
    
    Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit f45f30e84559050d1d132b636bbcfe0be5ca0f65
Author: YueHaibing <yuehaibing@huawei.com>
Date:   Wed Jul 31 20:38:14 2019 +0800

    gpio: Fix build error of function redefinition
    
    [ Upstream commit 68e03b85474a51ec1921b4d13204782594ef7223 ]
    
    when do randbuilding, I got this error:
    
    In file included from drivers/hwmon/pmbus/ucd9000.c:19:0:
    ./include/linux/gpio/driver.h:576:1: error: redefinition of gpiochip_add_pin_range
     gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
     ^~~~~~~~~~~~~~~~~~~~~~
    In file included from drivers/hwmon/pmbus/ucd9000.c:18:0:
    ./include/linux/gpio.h:245:1: note: previous definition of gpiochip_add_pin_range was here
     gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
     ^~~~~~~~~~~~~~~~~~~~~~
    
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Fixes: 964cb341882f ("gpio: move pincontrol calls to <linux/gpio/driver.h>")
    Signed-off-by: YueHaibing <yuehaibing@huawei.com>
    Link: https://lore.kernel.org/r/20190731123814.46624-1-yuehaibing@huawei.com
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 37fd1f6629c27237a573f9012bab2462bb952423
Author: Thomas Falcon <tlfalcon@linux.ibm.com>
Date:   Mon Aug 12 16:13:06 2019 -0500

    ibmveth: Convert multicast list size for little-endian system
    
    [ Upstream commit 66cf4710b23ab2adda11155684a2c8826f4fe732 ]
    
    The ibm,mac-address-filters property defines the maximum number of
    addresses the hypervisor's multicast filter list can support. It is
    encoded as a big-endian integer in the OF device tree, but the virtual
    ethernet driver does not convert it for use by little-endian systems.
    As a result, the driver is not behaving as it should on affected systems
    when a large number of multicast addresses are assigned to the device.
    
    Reported-by: Hangbin Liu <liuhangbin@gmail.com>
    Signed-off-by: Thomas Falcon <tlfalcon@linux.ibm.com>
    Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 59d763634c2591add52ffbc9d851f1de1e8bbf3c
Author: Matthias Kaehlcke <mka@chromium.org>
Date:   Tue Jul 9 15:44:50 2019 -0700

    Bluetooth: btqca: Add a short delay before downloading the NVM
    
    [ Upstream commit 8059ba0bd0e4694e51c2ee6438a77b325f06c0d5 ]
    
    On WCN3990 downloading the NVM sometimes fails with a "TLV response
    size mismatch" error:
    
    [  174.949955] Bluetooth: btqca.c:qca_download_firmware() hci0: QCA Downloading qca/crnv21.bin
    [  174.958718] Bluetooth: btqca.c:qca_tlv_send_segment() hci0: QCA TLV response size mismatch
    
    It seems the controller needs a short time after downloading the
    firmware before it is ready for the NVM. A delay as short as 1 ms
    seems sufficient, make it 10 ms just in case. No event is received
    during the delay, hence we don't just silently drop an extra event.
    
    Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 1ed1d4d7df0a5b75d344f0336026678d67542981
Author: Nathan Chancellor <natechancellor@gmail.com>
Date:   Sun Aug 11 20:13:45 2019 -0700

    net: tc35815: Explicitly check NET_IP_ALIGN is not zero in tc35815_rx
    
    [ Upstream commit 125b7e0949d4e72b15c2b1a1590f8cece985a918 ]
    
    clang warns:
    
    drivers/net/ethernet/toshiba/tc35815.c:1507:30: warning: use of logical
    '&&' with constant operand [-Wconstant-logical-operand]
                            if (!HAVE_DMA_RXALIGN(lp) && NET_IP_ALIGN)
                                                      ^  ~~~~~~~~~~~~
    drivers/net/ethernet/toshiba/tc35815.c:1507:30: note: use '&' for a
    bitwise operation
                            if (!HAVE_DMA_RXALIGN(lp) && NET_IP_ALIGN)
                                                      ^~
                                                      &
    drivers/net/ethernet/toshiba/tc35815.c:1507:30: note: remove constant to
    silence this warning
                            if (!HAVE_DMA_RXALIGN(lp) && NET_IP_ALIGN)
                                                     ~^~~~~~~~~~~~~~~
    1 warning generated.
    
    Explicitly check that NET_IP_ALIGN is not zero, which matches how this
    is checked in other parts of the tree. Because NET_IP_ALIGN is a build
    time constant, this check will be constant folded away during
    optimization.
    
    Fixes: 82a9928db560 ("tc35815: Enable StripCRC feature")
    Link: https://github.com/ClangBuiltLinux/linux/issues/608
    Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

commit 2046ecf3e1703839df5caa9c44afbf484bcd3622
Author: Fuqian Huang <huangfq.daxian@gmail.com>
Date:   Fri Aug 9 13:35:39 2019 +0800

    net: tundra: tsi108: use spin_lock_irqsave instead of spin_lock_irq in IRQ context
    
    [ Upstream commit 8c25d0887a8bd0e1ca2074ac0c6dff173787a83b ]
    
    As spin_unlock_irq will enable interrupts.
    Function tsi108_stat_carry is called from interrupt handler tsi108_irq.
    Interrupts are enabled in interrupt handler.
    Use spin_lock_irqsave/spin_unlock_irqrestore instead of spin_(un)lock_irq
    in IRQ context to avoid this.
    
    Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>