commit ec97ca18aa3a9123b5b64339e5993347295ebf88
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Sun Aug 4 09:29:41 2019 +0200

    Linux 5.2.6

commit dc23897f1aff16f7e3c23b60f4e2b3db8a6c9474
Author: Yan, Zheng <zyan@redhat.com>
Date:   Thu May 23 11:01:37 2019 +0800

    ceph: hold i_ceph_lock when removing caps for freeing inode
    
    commit d6e47819721ae2d9d090058ad5570a66f3c42e39 upstream.
    
    ceph_d_revalidate(, LOOKUP_RCU) may call __ceph_caps_issued_mask()
    on a freeing inode.
    
    Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
    Reviewed-by: Jeff Layton <jlayton@redhat.com>
    Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit db8664152f09bd692b0b505434133205656a4fb0
Author: Yoshinori Sato <ysato@users.sourceforge.jp>
Date:   Sun Apr 21 22:53:58 2019 +0900

    Fix allyesconfig output.
    
    commit 1b496469d0c020e09124e03e66a81421c21272a7 upstream.
    
    Conflict JCore-SoC and SolutionEngine 7619.
    
    Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d063151f92a29d9cf1dee7b3b163fcaaa49fecd5
Author: Miroslav Lichvar <mlichvar@redhat.com>
Date:   Tue Jul 16 16:30:09 2019 -0700

    drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl
    
    commit 5515e9a6273b8c02034466bcbd717ac9f53dab99 upstream.
    
    The PPS assert/clear offset corrections are set by the PPS_SETPARAMS
    ioctl in the pps_ktime structs, which also contain flags.  The flags are
    not initialized by applications (using the timepps.h header) and they
    are not used by the kernel for anything except returning them back in
    the PPS_GETPARAMS ioctl.
    
    Set the flags to zero to make it clear they are unused and avoid leaking
    uninitialized data of the PPS_SETPARAMS caller to other applications
    that have a read access to the PPS device.
    
    Link: http://lkml.kernel.org/r/20190702092251.24303-1-mlichvar@redhat.com
    Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
    Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
    Acked-by: Rodolfo Giometti <giometti@enneenne.com>
    Cc: Greg KH <greg@kroah.com>
    Cc: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 31a8c1e4b07b35e2903dd6078d6b36f04a71d2b4
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Sat Jul 13 14:27:14 2019 -0700

    /proc/<pid>/cmdline: add back the setproctitle() special case
    
    commit d26d0cd97c88eb1a5704b42e41ab443406807810 upstream.
    
    This makes the setproctitle() special case very explicit indeed, and
    handles it with a separate helper function entirely.  In the process, it
    re-instates the original semantics of simply stopping at the first NUL
    character when the original last NUL character is no longer there.
    
    [ The original semantics can still be seen in mm/util.c: get_cmdline()
      that is limited to a fixed-size buffer ]
    
    This makes the logic about when we use the string lengths etc much more
    obvious, and makes it easier to see what we do and what the two very
    different cases are.
    
    Note that even when we allow walking past the end of the argument array
    (because the setproctitle() might have overwritten and overflowed the
    original argv[] strings), we only allow it when it overflows into the
    environment region if it is immediately adjacent.
    
    [ Fixed for missing 'count' checks noted by Alexey Izbyshev ]
    
    Link: https://lore.kernel.org/lkml/alpine.LNX.2.21.1904052326230.3249@kich.toxcorp.com/
    Fixes: 5ab827189965 ("fs/proc: simplify and clarify get_mm_cmdline() function")
    Cc: Jakub Jankowski <shasta@toxcorp.com>
    Cc: Alexey Dobriyan <adobriyan@gmail.com>
    Cc: Alexey Izbyshev <izbyshev@ispras.ru>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 5790323f80be404356c2490cc3fac3c6d0d659af
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Sat Jul 13 13:40:13 2019 -0700

    /proc/<pid>/cmdline: remove all the special cases
    
    commit 3d712546d8ba9f25cdf080d79f90482aa4231ed4 upstream.
    
    Start off with a clean slate that only reads exactly from arg_start to
    arg_end, without any oddities.  This simplifies the code and in the
    process removes the case that caused us to potentially leak an
    uninitialized byte from the temporary kernel buffer.
    
    Note that in order to start from scratch with an understandable base,
    this simplifies things _too_ much, and removes all the legacy logic to
    handle setproctitle() having changed the argument strings.
    
    We'll add back those special cases very differently in the next commit.
    
    Link: https://lore.kernel.org/lkml/20190712160913.17727-1-izbyshev@ispras.ru/
    Fixes: f5b65348fd77 ("proc: fix missing final NUL in get_mm_cmdline() rewrite")
    Cc: Alexey Izbyshev <izbyshev@ispras.ru>
    Cc: Alexey Dobriyan <adobriyan@gmail.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 5344904c682e501176b2afdb47e50ce10bbc0831
Author: Jann Horn <jannh@google.com>
Date:   Tue Jul 16 17:20:47 2019 +0200

    sched/fair: Use RCU accessors consistently for ->numa_group
    
    commit cb361d8cdef69990f6b4504dc1fd9a594d983c97 upstream.
    
    The old code used RCU annotations and accessors inconsistently for
    ->numa_group, which can lead to use-after-frees and NULL dereferences.
    
    Let all accesses to ->numa_group use proper RCU helpers to prevent such
    issues.
    
    Signed-off-by: Jann Horn <jannh@google.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Petr Mladek <pmladek@suse.com>
    Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Will Deacon <will@kernel.org>
    Fixes: 8c8a743c5087 ("sched/numa: Use {cpu, pid} to create task groups for shared faults")
    Link: https://lkml.kernel.org/r/20190716152047.14424-3-jannh@google.com
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 8004fa12d0287fd8d5bcf9143057432b2fe21262
Author: Jann Horn <jannh@google.com>
Date:   Tue Jul 16 17:20:45 2019 +0200

    sched/fair: Don't free p->numa_faults with concurrent readers
    
    commit 16d51a590a8ce3befb1308e0e7ab77f3b661af33 upstream.
    
    When going through execve(), zero out the NUMA fault statistics instead of
    freeing them.
    
    During execve, the task is reachable through procfs and the scheduler. A
    concurrent /proc/*/sched reader can read data from a freed ->numa_faults
    allocation (confirmed by KASAN) and write it back to userspace.
    I believe that it would also be possible for a use-after-free read to occur
    through a race between a NUMA fault and execve(): task_numa_fault() can
    lead to task_numa_compare(), which invokes task_weight() on the currently
    running task of a different CPU.
    
    Another way to fix this would be to make ->numa_faults RCU-managed or add
    extra locking, but it seems easier to wipe the NUMA fault statistics on
    execve.
    
    Signed-off-by: Jann Horn <jannh@google.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Petr Mladek <pmladek@suse.com>
    Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Will Deacon <will@kernel.org>
    Fixes: 82727018b0d3 ("sched/numa: Call task_numa_free() from do_execve()")
    Link: https://lkml.kernel.org/r/20190716152047.14424-1-jannh@google.com
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 785b5dc6c06083a874d7bda593de06a01ac7fe6a
Author: Vladis Dronov <vdronov@redhat.com>
Date:   Tue Jul 30 11:33:45 2019 +0200

    Bluetooth: hci_uart: check for missing tty operations
    
    commit b36a1552d7319bbfd5cf7f08726c23c5c66d4f73 upstream.
    
    Certain ttys operations (pty_unix98_ops) lack tiocmget() and tiocmset()
    functions which are called by the certain HCI UART protocols (hci_ath,
    hci_bcm, hci_intel, hci_mrvl, hci_qca) via hci_uart_set_flow_control()
    or directly. This leads to an execution at NULL and can be triggered by
    an unprivileged user. Fix this by adding a helper function and a check
    for the missing tty operations in the protocols code.
    
    This fixes CVE-2019-10207. The Fixes: lines list commits where calls to
    tiocm[gs]et() or hci_uart_set_flow_control() were added to the HCI UART
    protocols.
    
    Link: https://syzkaller.appspot.com/bug?id=1b42faa2848963564a5b1b7f8c837ea7b55ffa50
    Reported-by: syzbot+79337b501d6aa974d0f6@syzkaller.appspotmail.com
    Cc: stable@vger.kernel.org # v2.6.36+
    Fixes: b3190df62861 ("Bluetooth: Support for Atheros AR300x serial chip")
    Fixes: 118612fb9165 ("Bluetooth: hci_bcm: Add suspend/resume PM functions")
    Fixes: ff2895592f0f ("Bluetooth: hci_intel: Add Intel baudrate configuration support")
    Fixes: 162f812f23ba ("Bluetooth: hci_uart: Add Marvell support")
    Fixes: fa9ad876b8e0 ("Bluetooth: hci_qca: Add support for Qualcomm Bluetooth chip wcn3990")
    Signed-off-by: Vladis Dronov <vdronov@redhat.com>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
    Reviewed-by: Yu-Chen, Cho <acho@suse.com>
    Tested-by: Yu-Chen, Cho <acho@suse.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 2f0a7820d0b4b0cffff1a4c1f97610359159b0e7
Author: Marta Rybczynska <mrybczyn@kalray.eu>
Date:   Tue Jul 23 07:41:20 2019 +0200

    nvme: fix multipath crash when ANA is deactivated
    
    commit 66b20ac0a1a10769d059d6903202f53494e3d902 upstream.
    
    Fix a crash with multipath activated. It happends when ANA log
    page is larger than MDTS and because of that ANA is disabled.
    The driver then tries to access unallocated buffer when connecting
    to a nvme target. The signature is as follows:
    
    [  300.433586] nvme nvme0: ANA log page size (8208) larger than MDTS (8192).
    [  300.435387] nvme nvme0: disabling ANA support.
    [  300.437835] nvme nvme0: creating 4 I/O queues.
    [  300.459132] nvme nvme0: new ctrl: NQN "nqn.0.0.0", addr 10.91.0.1:8009
    [  300.464609] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
    [  300.466342] #PF error: [normal kernel read fault]
    [  300.467385] PGD 0 P4D 0
    [  300.467987] Oops: 0000 [#1] SMP PTI
    [  300.468787] CPU: 3 PID: 50 Comm: kworker/u8:1 Not tainted 5.0.20kalray+ #4
    [  300.470264] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011
    [  300.471532] Workqueue: nvme-wq nvme_scan_work [nvme_core]
    [  300.472724] RIP: 0010:nvme_parse_ana_log+0x21/0x140 [nvme_core]
    [  300.474038] Code: 45 01 d2 d8 48 98 c3 66 90 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 48 89 fb 48 83 ec 08 48 8b af 20 0a 00 00 48 89 34 24 <66> 83 7d 08 00 0f 84 c6 00 00 00 44 8b 7d 14 49 89 d5 8b 55 10 48
    [  300.477374] RSP: 0018:ffffa50e80fd7cb8 EFLAGS: 00010296
    [  300.478334] RAX: 0000000000000001 RBX: ffff9130f1872258 RCX: 0000000000000000
    [  300.479784] RDX: ffffffffc06c4c30 RSI: ffff9130edad4280 RDI: ffff9130f1872258
    [  300.481488] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000044
    [  300.483203] R10: 0000000000000220 R11: 0000000000000040 R12: ffff9130f18722c0
    [  300.484928] R13: ffff9130f18722d0 R14: ffff9130edad4280 R15: ffff9130f18722c0
    [  300.486626] FS:  0000000000000000(0000) GS:ffff9130f7b80000(0000) knlGS:0000000000000000
    [  300.488538] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [  300.489907] CR2: 0000000000000008 CR3: 00000002365e6000 CR4: 00000000000006e0
    [  300.491612] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [  300.493303] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    [  300.494991] Call Trace:
    [  300.495645]  nvme_mpath_add_disk+0x5c/0xb0 [nvme_core]
    [  300.496880]  nvme_validate_ns+0x2ef/0x550 [nvme_core]
    [  300.498105]  ? nvme_identify_ctrl.isra.45+0x6a/0xb0 [nvme_core]
    [  300.499539]  nvme_scan_work+0x2b4/0x370 [nvme_core]
    [  300.500717]  ? __switch_to_asm+0x35/0x70
    [  300.501663]  process_one_work+0x171/0x380
    [  300.502340]  worker_thread+0x49/0x3f0
    [  300.503079]  kthread+0xf8/0x130
    [  300.503795]  ? max_active_store+0x80/0x80
    [  300.504690]  ? kthread_bind+0x10/0x10
    [  300.505502]  ret_from_fork+0x35/0x40
    [  300.506280] Modules linked in: nvme_tcp nvme_rdma rdma_cm iw_cm ib_cm ib_core nvme_fabrics nvme_core xt_physdev ip6table_raw ip6table_mangle ip6table_filter ip6_tables xt_comment iptable_nat nf_nat_ipv4 nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xt_CHECKSUM iptable_mangle iptable_filter veth ebtable_filter ebtable_nat ebtables iptable_raw vxlan ip6_udp_tunnel udp_tunnel sunrpc joydev pcspkr virtio_balloon br_netfilter bridge stp llc ip_tables xfs libcrc32c ata_generic pata_acpi virtio_net virtio_console net_failover virtio_blk failover ata_piix serio_raw libata virtio_pci virtio_ring virtio
    [  300.514984] CR2: 0000000000000008
    [  300.515569] ---[ end trace faa2eefad7e7f218 ]---
    [  300.516354] RIP: 0010:nvme_parse_ana_log+0x21/0x140 [nvme_core]
    [  300.517330] Code: 45 01 d2 d8 48 98 c3 66 90 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 48 89 fb 48 83 ec 08 48 8b af 20 0a 00 00 48 89 34 24 <66> 83 7d 08 00 0f 84 c6 00 00 00 44 8b 7d 14 49 89 d5 8b 55 10 48
    [  300.520353] RSP: 0018:ffffa50e80fd7cb8 EFLAGS: 00010296
    [  300.521229] RAX: 0000000000000001 RBX: ffff9130f1872258 RCX: 0000000000000000
    [  300.522399] RDX: ffffffffc06c4c30 RSI: ffff9130edad4280 RDI: ffff9130f1872258
    [  300.523560] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000044
    [  300.524734] R10: 0000000000000220 R11: 0000000000000040 R12: ffff9130f18722c0
    [  300.525915] R13: ffff9130f18722d0 R14: ffff9130edad4280 R15: ffff9130f18722c0
    [  300.527084] FS:  0000000000000000(0000) GS:ffff9130f7b80000(0000) knlGS:0000000000000000
    [  300.528396] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [  300.529440] CR2: 0000000000000008 CR3: 00000002365e6000 CR4: 00000000000006e0
    [  300.530739] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [  300.531989] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    [  300.533264] Kernel panic - not syncing: Fatal exception
    [  300.534338] Kernel Offset: 0x17c00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
    [  300.536227] ---[ end Kernel panic - not syncing: Fatal exception ]---
    
    Condition check refactoring from Christoph Hellwig.
    
    Signed-off-by: Marta Rybczynska <marta.rybczynska@kalray.eu>
    Tested-by: Jean-Baptiste Riaux <jbriaux@kalray.eu>
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit af7ab21bd5ef62e9ac61f128a910f120f9bbf084
Author: Florian Westphal <fw@strlen.de>
Date:   Tue Jul 2 12:46:00 2019 +0200

    xfrm: policy: fix bydst hlist corruption on hash rebuild
    
    commit fd709721352dd5239056eacaded00f2244e6ef58 upstream.
    
    syzbot reported following spat:
    
    BUG: KASAN: use-after-free in __write_once_size include/linux/compiler.h:221
    BUG: KASAN: use-after-free in hlist_del_rcu include/linux/rculist.h:455
    BUG: KASAN: use-after-free in xfrm_hash_rebuild+0xa0d/0x1000 net/xfrm/xfrm_policy.c:1318
    Write of size 8 at addr ffff888095e79c00 by task kworker/1:3/8066
    Workqueue: events xfrm_hash_rebuild
    Call Trace:
     __write_once_size include/linux/compiler.h:221 [inline]
     hlist_del_rcu include/linux/rculist.h:455 [inline]
     xfrm_hash_rebuild+0xa0d/0x1000 net/xfrm/xfrm_policy.c:1318
     process_one_work+0x814/0x1130 kernel/workqueue.c:2269
    Allocated by task 8064:
     __kmalloc+0x23c/0x310 mm/slab.c:3669
     kzalloc include/linux/slab.h:742 [inline]
     xfrm_hash_alloc+0x38/0xe0 net/xfrm/xfrm_hash.c:21
     xfrm_policy_init net/xfrm/xfrm_policy.c:4036 [inline]
     xfrm_net_init+0x269/0xd60 net/xfrm/xfrm_policy.c:4120
     ops_init+0x336/0x420 net/core/net_namespace.c:130
     setup_net+0x212/0x690 net/core/net_namespace.c:316
    
    The faulting address is the address of the old chain head,
    free'd by xfrm_hash_resize().
    
    In xfrm_hash_rehash(), chain heads get re-initialized without
    any hlist_del_rcu:
    
     for (i = hmask; i >= 0; i--)
        INIT_HLIST_HEAD(odst + i);
    
    Then, hlist_del_rcu() gets called on the about to-be-reinserted policy
    when iterating the per-net list of policies.
    
    hlist_del_rcu() will then make chain->first be nonzero again:
    
    static inline void __hlist_del(struct hlist_node *n)
    {
       struct hlist_node *next = n->next;   // address of next element in list
       struct hlist_node **pprev = n->pprev;// location of previous elem, this
                                            // can point at chain->first
            WRITE_ONCE(*pprev, next);       // chain->first points to next elem
            if (next)
                    next->pprev = pprev;
    
    Then, when we walk chainlist to find insertion point, we may find a
    non-empty list even though we're supposedly reinserting the first
    policy to an empty chain.
    
    To fix this first unlink all exact and inexact policies instead of
    zeroing the list heads.
    
    Add the commands equivalent to the syzbot reproducer to xfrm_policy.sh,
    without fix KASAN catches the corruption as it happens, SLUB poisoning
    detects it a bit later.
    
    Reported-by: syzbot+0165480d4ef07360eeda@syzkaller.appspotmail.com
    Fixes: 1548bc4e0512 ("xfrm: policy: delete inexact policies from inexact list on hash rebuild")
    Signed-off-by: Florian Westphal <fw@strlen.de>
    Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit d373454a8ce53f51a59bc4c1ef07e46901c8a077
Author: Luke Nowakowski-Krijger <lnowakow@eng.ucsd.edu>
Date:   Fri Jun 21 21:04:38 2019 -0400

    media: radio-raremono: change devm_k*alloc to k*alloc
    
    commit c666355e60ddb4748ead3bdd983e3f7f2224aaf0 upstream.
    
    Change devm_k*alloc to k*alloc to manually allocate memory
    
    The manual allocation and freeing of memory is necessary because when
    the USB radio is disconnected, the memory associated with devm_k*alloc
    is freed. Meaning if we still have unresolved references to the radio
    device, then we get use-after-free errors.
    
    This patch fixes this by manually allocating memory, and freeing it in
    the v4l2.release callback that gets called when the last radio device
    exits.
    
    Reported-and-tested-by: syzbot+a4387f5b6b799f6becbf@syzkaller.appspotmail.com
    
    Signed-off-by: Luke Nowakowski-Krijger <lnowakow@eng.ucsd.edu>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    [hverkuil-cisco@xs4all.nl: cleaned up two small checkpatch.pl warnings]
    [hverkuil-cisco@xs4all.nl: prefix subject with driver name]
    Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 7b01a388dc070e0b4b833fe6eca349d0586b5333
Author: Benjamin Coddington <bcodding@redhat.com>
Date:   Tue Jun 11 12:57:52 2019 -0400

    NFS: Cleanup if nfs_match_client is interrupted
    
    commit 9f7761cf0409465075dadb875d5d4b8ef2f890c8 upstream.
    
    Don't bail out before cleaning up a new allocation if the wait for
    searching for a matching nfs client is interrupted.  Memory leaks.
    
    Reported-by: syzbot+7fe11b49c1cc30e3fce2@syzkaller.appspotmail.com
    Fixes: 950a578c6128 ("NFS: make nfs_match_client killable")
    Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
    Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 3bd37885fea1a0ce57a5b4886e0e3e471bf495d9
Author: Andrey Konovalov <andreyknvl@google.com>
Date:   Thu May 2 12:09:26 2019 -0400

    media: pvrusb2: use a different format for warnings
    
    commit 1753c7c4367aa1201e1e5d0a601897ab33444af1 upstream.
    
    When the pvrusb2 driver detects that there's something wrong with the
    device, it prints a warning message. Right now those message are
    printed in two different formats:
    
    1. ***WARNING*** message here
    2. WARNING: message here
    
    There's an issue with the second format. Syzkaller recognizes it as a
    message produced by a WARN_ON(), which is used to indicate a bug in the
    kernel. However pvrusb2 prints those warnings to indicate an issue with
    the device, not the bug in the kernel.
    
    This patch changes the pvrusb2 driver to consistently use the first
    warning message format. This will unblock syzkaller testing of this
    driver.
    
    Reported-by: syzbot+af8f8d2ac0d39b0ed3a0@syzkaller.appspotmail.com
    Reported-by: syzbot+170a86bf206dd2c6217e@syzkaller.appspotmail.com
    Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
    Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 7951663c80a558ac97978e19ba893f9f6d3dec3d
Author: Oliver Neukum <oneukum@suse.com>
Date:   Thu May 9 04:57:09 2019 -0400

    media: cpia2_usb: first wake up, then free in disconnect
    
    commit eff73de2b1600ad8230692f00bc0ab49b166512a upstream.
    
    Kasan reported a use after free in cpia2_usb_disconnect()
    It first freed everything and then woke up those waiting.
    The reverse order is correct.
    
    Fixes: 6c493f8b28c67 ("[media] cpia2: major overhaul to get it in a working state again")
    
    Signed-off-by: Oliver Neukum <oneukum@suse.com>
    Reported-by: syzbot+0c90fc937c84f97d0aa6@syzkaller.appspotmail.com
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit b2769f0086dc462a86f5e46f6c56add9c8e06b35
Author: Fabio Estevam <festevam@gmail.com>
Date:   Thu May 9 09:15:00 2019 -0300

    ath10k: Change the warning message string
    
    commit 265df32eae5845212ad9f55f5ae6b6dcb68b187b upstream.
    
    The "WARNING" string confuses syzbot, which thinks it found
    a crash [1].
    
    Change the string to avoid such problem.
    
    [1] https://lkml.org/lkml/2019/5/9/243
    
    Reported-by: syzbot+c1b25598aa60dcd47e78@syzkaller.appspotmail.com
    Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Fabio Estevam <festevam@gmail.com>
    Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit be50f19fee84cfac3a185daec71064f2339faf7c
Author: Sean Young <sean@mess.org>
Date:   Sun May 19 15:28:22 2019 -0400

    media: au0828: fix null dereference in error path
    
    commit 6d0d1ff9ff21fbb06b867c13a1d41ce8ddcd8230 upstream.
    
    au0828_usb_disconnect() gets the au0828_dev struct via usb_get_intfdata,
    so it needs to set up for the error paths.
    
    Reported-by: syzbot+357d86bcb4cca1a2f572@syzkaller.appspotmail.com
    Signed-off-by: Sean Young <sean@mess.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 985114b174c5560f3967f18635c06c729e530d3d
Author: Stanislav Fomichev <sdf@google.com>
Date:   Wed Jun 19 12:01:05 2019 -0700

    bpf: fix NULL deref in btf_type_is_resolve_source_only
    
    commit e4f07120210a1794c1f1ae64d209a2fbc7bd2682 upstream.
    
    Commit 1dc92851849c ("bpf: kernel side support for BTF Var and DataSec")
    added invocations of btf_type_is_resolve_source_only before
    btf_type_nosize_or_null which checks for the NULL pointer.
    Swap the order of btf_type_nosize_or_null and
    btf_type_is_resolve_source_only to make sure the do the NULL pointer
    check first.
    
    Fixes: 1dc92851849c ("bpf: kernel side support for BTF Var and DataSec")
    Reported-by: syzbot <syzkaller@googlegroups.com>
    Signed-off-by: Stanislav Fomichev <sdf@google.com>
    Acked-by: Andrii Nakryiko <andriin@fb.com>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 476ffb4b15bd161fe6602c978e223e78c6df3377
Author: Phong Tran <tranmanphong@gmail.com>
Date:   Mon Jul 15 22:08:14 2019 +0700

    ISDN: hfcsusb: checking idx of ep configuration
    
    commit f384e62a82ba5d85408405fdd6aeff89354deaa9 upstream.
    
    The syzbot test with random endpoint address which made the idx is
    overflow in the table of endpoint configuations.
    
    this adds the checking for fixing the error report from
    syzbot
    
    KASAN: stack-out-of-bounds Read in hfcsusb_probe [1]
    The patch tested by syzbot [2]
    
    Reported-by: syzbot+8750abbc3a46ef47d509@syzkaller.appspotmail.com
    
    [1]:
    https://syzkaller.appspot.com/bug?id=30a04378dac680c5d521304a00a86156bb913522
    [2]:
    https://groups.google.com/d/msg/syzkaller-bugs/_6HBdge8F3E/OJn7wVNpBAAJ
    
    Signed-off-by: Phong Tran <tranmanphong@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 44b1a00e5c53251b0b0db77bb191f07a7f8481c9
Author: Sunil Muthuswamy <sunilmut@microsoft.com>
Date:   Thu Jun 13 03:52:27 2019 +0000

    vsock: correct removal of socket from the list
    
    commit d5afa82c977ea06f7119058fa0eb8519ea501031 upstream.
    
    The current vsock code for removal of socket from the list is both
    subject to race and inefficient. It takes the lock, checks whether
    the socket is in the list, drops the lock and if the socket was on the
    list, deletes it from the list. This is subject to race because as soon
    as the lock is dropped once it is checked for presence, that condition
    cannot be relied upon for any decision. It is also inefficient because
    if the socket is present in the list, it takes the lock twice.
    
    Signed-off-by: Sunil Muthuswamy <sunilmut@microsoft.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>