commit d98913ec3269a460636da0e4e8c72f594fb756c0
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Sat Oct 17 11:03:31 2020 +0200

    Linux 4.4.240
    
    Tested-by: Pavel Machek (CIP) <pavel@denx.de>
    Tested-by: Jon Hunter <jonathanh@nvidia.com>
    Tested-by: Guenter Roeck <linux@roeck-us.net>
    Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
    Link: https://lore.kernel.org/r/20201016090435.423923738@linuxfoundation.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit df439d2680b8573244dbcc8bd6f935e058f9a29a
Author: Dominik Przychodni <dominik.przychodni@intel.com>
Date:   Mon Aug 31 11:59:59 2020 +0100

    crypto: qat - check cipher length for aead AES-CBC-HMAC-SHA
    
    commit 45cb6653b0c355fc1445a8069ba78a4ce8720511 upstream.
    
    Return -EINVAL for authenc(hmac(sha1),cbc(aes)),
    authenc(hmac(sha256),cbc(aes)) and authenc(hmac(sha512),cbc(aes))
    if the cipher length is not multiple of the AES block.
    This is to prevent an undefined device behaviour.
    
    Fixes: d370cec32194 ("crypto: qat - Intel(R) QAT crypto interface")
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Dominik Przychodni <dominik.przychodni@intel.com>
    [giovanni.cabiddu@intel.com: reworded commit message]
    Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 71ad780260089a19b8563096d64fd7588ccb0a0d
Author: yangerkun <yangerkun@huawei.com>
Date:   Thu Oct 15 22:38:34 2020 +0800

    spi: unbinding slave before calling spi_destroy_queue
    
    We make a mistake while backport 'commit 84855678add8 ("spi: Fix
    controller unregister order")'. What we should do is call __unreigster
    for each device before spi_destroy_queue. This problem exist in
    linux-4.4.y/linux-4.9.y.
    
    Signed-off-by: yangerkun <yangerkun@huawei.com>

commit 265e6dc04875bc757f5547cedd459ca92dfd0034
Author: Jan Kara <jack@suse.cz>
Date:   Wed Sep 30 17:08:20 2020 +0200

    reiserfs: Fix oops during mount
    
    commit c2bb80b8bdd04dfe32364b78b61b6a47f717af52 upstream.
    
    With suitably crafted reiserfs image and mount command reiserfs will
    crash when trying to verify that XATTR_ROOT directory can be looked up
    in / as that recurses back to xattr code like:
    
     xattr_lookup+0x24/0x280 fs/reiserfs/xattr.c:395
     reiserfs_xattr_get+0x89/0x540 fs/reiserfs/xattr.c:677
     reiserfs_get_acl+0x63/0x690 fs/reiserfs/xattr_acl.c:209
     get_acl+0x152/0x2e0 fs/posix_acl.c:141
     check_acl fs/namei.c:277 [inline]
     acl_permission_check fs/namei.c:309 [inline]
     generic_permission+0x2ba/0x550 fs/namei.c:353
     do_inode_permission fs/namei.c:398 [inline]
     inode_permission+0x234/0x4a0 fs/namei.c:463
     lookup_one_len+0xa6/0x200 fs/namei.c:2557
     reiserfs_lookup_privroot+0x85/0x1e0 fs/reiserfs/xattr.c:972
     reiserfs_fill_super+0x2b51/0x3240 fs/reiserfs/super.c:2176
     mount_bdev+0x24f/0x360 fs/super.c:1417
    
    Fix the problem by bailing from reiserfs_xattr_get() when xattrs are not
    yet initialized.
    
    CC: stable@vger.kernel.org
    Reported-by: syzbot+9b33c9b118d77ff59b6f@syzkaller.appspotmail.com
    Signed-off-by: Jan Kara <jack@suse.cz>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 0d6877c37dc0892378684477b3f927b87e3607a8
Author: Jan Kara <jack@suse.cz>
Date:   Mon Sep 21 15:08:50 2020 +0200

    reiserfs: Initialize inode keys properly
    
    commit 4443390e08d34d5771ab444f601cf71b3c9634a4 upstream.
    
    reiserfs_read_locked_inode() didn't initialize key length properly. Use
    _make_cpu_key() macro for key initialization so that all key member are
    properly initialized.
    
    CC: stable@vger.kernel.org
    Reported-by: syzbot+d94d02749498bb7bab4b@syzkaller.appspotmail.com
    Signed-off-by: Jan Kara <jack@suse.cz>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 11b63afba323ebd797a294f9d8e3970a17477782
Author: Mychaela N. Falconia <falcon@freecalypso.org>
Date:   Wed Sep 16 01:56:29 2020 +0000

    USB: serial: ftdi_sio: add support for FreeCalypso JTAG+UART adapters
    
    commit 6cf87e5edd9944e1d3b6efd966ea401effc304ee upstream.
    
    There exist many FT2232-based JTAG+UART adapter designs in which
    FT2232 Channel A is used for JTAG and Channel B is used for UART.
    The best way to handle them in Linux is to have the ftdi_sio driver
    create a ttyUSB device only for Channel B and not for Channel A:
    a ttyUSB device for Channel A would be bogus and will disappear as
    soon as the user runs OpenOCD or other applications that access
    Channel A for JTAG from userspace, causing undesirable noise for
    users.  The ftdi_sio driver already has a dedicated quirk for such
    JTAG+UART FT2232 adapters, and it requires assigning custom USB IDs
    to such adapters and adding these IDs to the driver with the
    ftdi_jtag_quirk applied.
    
    Boutique hardware manufacturer Falconia Partners LLC has created a
    couple of JTAG+UART adapter designs (one buffered, one unbuffered)
    as part of FreeCalypso project, and this hardware is specifically made
    to be used with Linux hosts, with the intent that Channel A will be
    accessed only from userspace via appropriate applications, and that
    Channel B will be supported by the ftdi_sio kernel driver, presenting
    a standard ttyUSB device to userspace.  Toward this end the hardware
    manufacturer will be programming FT2232 EEPROMs with custom USB IDs,
    specifically with the intent that these IDs will be recognized by
    the ftdi_sio driver with the ftdi_jtag_quirk applied.
    
    Signed-off-by: Mychaela N. Falconia <falcon@freecalypso.org>
    [johan: insert in PID order and drop unused define]
    Cc: stable@vger.kernel.org
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e199fc5a68cd7016e07c8a0ef0ec168a9d2a9007
Author: Scott Chen <scott@labau.com.tw>
Date:   Thu Sep 24 14:27:45 2020 +0800

    USB: serial: pl2303: add device-id for HP GC device
    
    commit 031f9664f8f9356cee662335bc56c93d16e75665 upstream.
    
    This is adds a device id for HP LD381 which is a pl2303GC-base device.
    
    Signed-off-by: Scott Chen <scott@labau.com.tw>
    Cc: stable@vger.kernel.org
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 54202ff16a3b6db3eaad02cb15f93c5e61348f7e
Author: Anant Thazhemadam <anant.thazhemadam@gmail.com>
Date:   Sat Oct 10 13:59:32 2020 +0530

    staging: comedi: check validity of wMaxPacketSize of usb endpoints found
    
    commit e1f13c879a7c21bd207dc6242455e8e3a1e88b40 upstream.
    
    While finding usb endpoints in vmk80xx_find_usb_endpoints(), check if
    wMaxPacketSize = 0 for the endpoints found.
    
    Some devices have isochronous endpoints that have wMaxPacketSize = 0
    (as required by the USB-2 spec).
    However, since this doesn't apply here, wMaxPacketSize = 0 can be
    considered to be invalid.
    
    Reported-by: syzbot+009f546aa1370056b1c2@syzkaller.appspotmail.com
    Tested-by: syzbot+009f546aa1370056b1c2@syzkaller.appspotmail.com
    Signed-off-by: Anant Thazhemadam <anant.thazhemadam@gmail.com>
    Cc: stable <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/20201010082933.5417-1-anant.thazhemadam@gmail.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 38183676344f903a1ed11975288d0790e232c95b
Author: Leonid Bloch <lb.workbox@gmail.com>
Date:   Sun Oct 4 18:58:13 2020 +0300

    USB: serial: option: Add Telit FT980-KS composition
    
    commit 924a9213358fb92fa3c3225d6d042aa058167405 upstream.
    
    This commit adds the following Telit FT980-KS composition:
    
    0x1054: rndis, diag, adb, nmea, modem, modem, aux
    
    AT commands can be sent to /dev/ttyUSB2.
    
    Signed-off-by: Leonid Bloch <lb.workbox@gmail.com>
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/ce86bc05-f4e2-b199-0cdc-792715e3f275@asocscloud.com
    Link: https://lore.kernel.org/r/20201004155813.2342-1-lb.workbox@gmail.com
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 76e5c961c19a42f98426b31d0e2ed9cb42971863
Author: Wilken Gottwalt <wilken.gottwalt@mailbox.org>
Date:   Sat Oct 3 11:40:29 2020 +0200

    USB: serial: option: add Cellient MPL200 card
    
    commit 3e765cab8abe7f84cb80d4a7a973fc97d5742647 upstream.
    
    Add usb ids of the Cellient MPL200 card.
    
    Signed-off-by: Wilken Gottwalt <wilken.gottwalt@mailbox.org>
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/3db5418fe9e516f4b290736c5a199c9796025e3c.1601715478.git.wilken.gottwalt@mailbox.org
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit cd77a65cb1401ac6af8406f89af07c4553843c8f
Author: Oliver Neukum <oneukum@suse.com>
Date:   Thu Sep 24 11:14:10 2020 +0200

    media: usbtv: Fix refcounting mixup
    
    commit bf65f8aabdb37bc1a785884374e919477fe13e10 upstream.
    
    The premature free in the error path is blocked by V4L
    refcounting, not USB refcounting. Thanks to
    Ben Hutchings for review.
    
    [v2] corrected attributions
    
    Signed-off-by: Oliver Neukum <oneukum@suse.com>
    Fixes: 50e704453553 ("media: usbtv: prevent double free in error case")
    CC: stable@vger.kernel.org
    Reported-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit cbb6274d5b72c1380e593ea9eb15763f1e2f71c3
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date:   Wed May 20 14:20:14 2020 -0700

    Bluetooth: Disconnect if E0 is used for Level 4
    
    commit 8746f135bb01872ff412d408ea1aa9ebd328c1f5 upstream.
    
    E0 is not allowed with Level 4:
    
    BLUETOOTH CORE SPECIFICATION Version 5.2 | Vol 3, Part C page 1319:
    
      '128-bit equivalent strength for link and encryption keys
       required using FIPS approved algorithms (E0 not allowed,
       SAFER+ not allowed, and P-192 not allowed; encryption key
       not shortened'
    
    SC enabled:
    
    > HCI Event: Read Remote Extended Features (0x23) plen 13
            Status: Success (0x00)
            Handle: 256
            Page: 1/2
            Features: 0x0b 0x00 0x00 0x00 0x00 0x00 0x00 0x00
              Secure Simple Pairing (Host Support)
              LE Supported (Host)
              Secure Connections (Host Support)
    > HCI Event: Encryption Change (0x08) plen 4
            Status: Success (0x00)
            Handle: 256
            Encryption: Enabled with AES-CCM (0x02)
    
    SC disabled:
    
    > HCI Event: Read Remote Extended Features (0x23) plen 13
            Status: Success (0x00)
            Handle: 256
            Page: 1/2
            Features: 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00
              Secure Simple Pairing (Host Support)
              LE Supported (Host)
    > HCI Event: Encryption Change (0x08) plen 4
            Status: Success (0x00)
            Handle: 256
            Encryption: Enabled with E0 (0x01)
    [May 8 20:23] Bluetooth: hci0: Invalid security: expect AES but E0 was used
    < HCI Command: Disconnect (0x01|0x0006) plen 3
            Handle: 256
            Reason: Authentication Failure (0x05)
    
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
    Cc: Hans-Christian Noren Egtvedt <hegtvedt@cisco.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 0ae6ea94c69d2b335f880753a9ec8b0cb455af21
Author: Patrick Steinhardt <ps@pks.im>
Date:   Wed Jul 15 19:43:33 2020 +0200

    Bluetooth: Fix update of connection state in `hci_encrypt_cfm`
    
    commit 339ddaa626995bc6218972ca241471f3717cc5f4 upstream.
    
    Starting with the upgrade to v5.8-rc3, I've noticed I wasn't able to
    connect to my Bluetooth headset properly anymore. While connecting to
    the device would eventually succeed, bluetoothd seemed to be confused
    about the current connection state where the state was flapping hence
    and forth. Bisecting this issue led to commit 3ca44c16b0dc (Bluetooth:
    Consolidate encryption handling in hci_encrypt_cfm, 2020-05-19), which
    refactored `hci_encrypt_cfm` to also handle updating the connection
    state.
    
    The commit in question changed the code to call `hci_connect_cfm` inside
    `hci_encrypt_cfm` and to change the connection state. But with the
    conversion, we now only update the connection state if a status was set
    already. In fact, the reverse should be true: the status should be
    updated if no status is yet set. So let's fix the isuse by reversing the
    condition.
    
    Fixes: 3ca44c16b0dc ("Bluetooth: Consolidate encryption handling in hci_encrypt_cfm")
    Signed-off-by: Patrick Steinhardt <ps@pks.im>
    Acked-by:  Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 554ab8c6e143606bb205c7d694656fac3d6e3cc2
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date:   Tue May 19 13:25:19 2020 -0700

    Bluetooth: Consolidate encryption handling in hci_encrypt_cfm
    
    commit 3ca44c16b0dcc764b641ee4ac226909f5c421aa3 upstream.
    
    This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection
    state is BT_CONFIG so callers don't have to check the state.
    
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
    Cc: Hans-Christian Noren Egtvedt <hegtvedt@cisco.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 8bcbf0502aece97c44d3c64212c249572a711381
Author: Alain Michaud <alainm@chromium.org>
Date:   Mon Jul 27 20:48:55 2020 +0000

    Bluetooth: fix kernel oops in store_pending_adv_report
    
    commit a2ec905d1e160a33b2e210e45ad30445ef26ce0e upstream.
    
    Fix kernel oops observed when an ext adv data is larger than 31 bytes.
    
    This can be reproduced by setting up an advertiser with advertisement
    larger than 31 bytes.  The issue is not sensitive to the advertisement
    content.  In particular, this was reproduced with an advertisement of
    229 bytes filled with 'A'.  See stack trace below.
    
    This is fixed by not catching ext_adv as legacy adv are only cached to
    be able to concatenate a scanable adv with its scan response before
    sending it up through mgmt.
    
    With ext_adv, this is no longer necessary.
    
      general protection fault: 0000 [#1] SMP PTI
      CPU: 6 PID: 205 Comm: kworker/u17:0 Not tainted 5.4.0-37-generic #41-Ubuntu
      Hardware name: Dell Inc. XPS 15 7590/0CF6RR, BIOS 1.7.0 05/11/2020
      Workqueue: hci0 hci_rx_work [bluetooth]
      RIP: 0010:hci_bdaddr_list_lookup+0x1e/0x40 [bluetooth]
      Code: ff ff e9 26 ff ff ff 0f 1f 44 00 00 0f 1f 44 00 00 55 48 8b 07 48 89 e5 48 39 c7 75 0a eb 24 48 8b 00 48 39 f8 74 1c 44 8b 06 <44> 39 40 10 75 ef 44 0f b7 4e 04 66 44 39 48 14 75 e3 38 50 16 75
      RSP: 0018:ffffbc6a40493c70 EFLAGS: 00010286
      RAX: 4141414141414141 RBX: 000000000000001b RCX: 0000000000000000
      RDX: 0000000000000000 RSI: ffff9903e76c100f RDI: ffff9904289d4b28
      RBP: ffffbc6a40493c70 R08: 0000000093570362 R09: 0000000000000000
      R10: 0000000000000000 R11: ffff9904344eae38 R12: ffff9904289d4000
      R13: 0000000000000000 R14: 00000000ffffffa3 R15: ffff9903e76c100f
      FS: 0000000000000000(0000) GS:ffff990434580000(0000) knlGS:0000000000000000
      CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 00007feed125a000 CR3: 00000001b860a003 CR4: 00000000003606e0
      Call Trace:
        process_adv_report+0x12e/0x560 [bluetooth]
        hci_le_meta_evt+0x7b2/0xba0 [bluetooth]
        hci_event_packet+0x1c29/0x2a90 [bluetooth]
        hci_rx_work+0x19b/0x360 [bluetooth]
        process_one_work+0x1eb/0x3b0
        worker_thread+0x4d/0x400
        kthread+0x104/0x140
    
    Fixes: c215e9397b00 ("Bluetooth: Process extended ADV report event")
    Reported-by: Andy Nguyen <theflow@google.com>
    Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
    Reported-by: Balakrishna Godavarthi <bgodavar@codeaurora.org>
    Signed-off-by: Alain Michaud <alainm@chromium.org>
    Tested-by: Sonny Sasaka <sonnysasaka@chromium.org>
    Acked-by: Marcel Holtmann <marcel@holtmann.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 5abe9f99f5129bee5492072ff76b91ec4fad485b
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date:   Thu Aug 6 11:17:14 2020 -0700

    Bluetooth: MGMT: Fix not checking if BT_HS is enabled
    
    commit b560a208cda0297fef6ff85bbfd58a8f0a52a543 upstream.
    
    This checks if BT_HS is enabled relecting it on MGMT_SETTING_HS instead
    of always reporting it as supported.
    
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit e7b465bda9b90bec5427775bcbbfc47fe7a6012b
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date:   Thu Aug 6 11:17:11 2020 -0700

    Bluetooth: A2MP: Fix not initializing all members
    
    commit eddb7732119d53400f48a02536a84c509692faa8 upstream.
    
    This fixes various places where a stack variable is used uninitialized.
    
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>