23 Sep, 2020

22 commits

  • [ Upstream commit e8a8a185051a460e3eb0617dca33f996f4e31516 ]

    Yang Yang reported the following crash caused by requeueing a flush
    request in Kyber:

    [ 2.517297] Unable to handle kernel paging request at virtual address ffffffd8071c0b00
    ...
    [ 2.517468] pc : clear_bit+0x18/0x2c
    [ 2.517502] lr : sbitmap_queue_clear+0x40/0x228
    [ 2.517503] sp : ffffff800832bc60 pstate : 00c00145
    ...
    [ 2.517599] Process ksoftirqd/5 (pid: 51, stack limit = 0xffffff8008328000)
    [ 2.517602] Call trace:
    [ 2.517606] clear_bit+0x18/0x2c
    [ 2.517619] kyber_finish_request+0x74/0x80
    [ 2.517627] blk_mq_requeue_request+0x3c/0xc0
    [ 2.517637] __scsi_queue_insert+0x11c/0x148
    [ 2.517640] scsi_softirq_done+0x114/0x130
    [ 2.517643] blk_done_softirq+0x7c/0xb0
    [ 2.517651] __do_softirq+0x208/0x3bc
    [ 2.517657] run_ksoftirqd+0x34/0x60
    [ 2.517663] smpboot_thread_fn+0x1c4/0x2c0
    [ 2.517667] kthread+0x110/0x120
    [ 2.517669] ret_from_fork+0x10/0x18

    This happens because Kyber doesn't track flush requests, so
    kyber_finish_request() reads a garbage domain token. Only call the
    scheduler's requeue_request() hook if RQF_ELVPRIV is set (like we do for
    the finish_request() hook in blk_mq_free_request()). Now that we're
    handling it in blk-mq, also remove the check from BFQ.

    Reported-by: Yang Yang
    Signed-off-by: Omar Sandoval
    Signed-off-by: Jens Axboe
    Signed-off-by: Sasha Levin

    Omar Sandoval
     
  • [ Upstream commit ceb1e0874dba5cbfc4e0b4145796a4bfb3716e6a ]

    Cancel async event work in case async event has been queued up, and
    nvme_tcp_submit_async_event() runs after event has been freed.

    Signed-off-by: David Milburn
    Reviewed-by: Keith Busch
    Reviewed-by: Sagi Grimberg
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Sasha Levin

    David Milburn
     
  • [ Upstream commit 925dd04c1f9825194b9e444c12478084813b2b5d ]

    Cancel async event work in case async event has been queued up, and
    nvme_rdma_submit_async_event() runs after event has been freed.

    Signed-off-by: David Milburn
    Reviewed-by: Keith Busch
    Reviewed-by: Sagi Grimberg
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Sasha Levin

    David Milburn
     
  • [ Upstream commit e126e8210e950bb83414c4f57b3120ddb8450742 ]

    Cancel async event work in case async event has been queued up, and
    nvme_fc_submit_async_event() runs after event has been freed.

    Signed-off-by: David Milburn
    Reviewed-by: Keith Busch
    Reviewed-by: Sagi Grimberg
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Sasha Levin

    David Milburn
     
  • [ Upstream commit 3ae90d764093dfcd6ab8ab6875377302892c87d4 ]

    I found this when compiling a kbuild random config with GCC 11. The
    config enables CONFIG_DEBUG_SECTION_MISMATCH, which sets CFLAGS
    -fno-inline-functions-called-once. This causes the call to cache_loop in
    cache.c to not be inlined causing the below compile error.

    In file included from arch/openrisc/mm/cache.c:13:
    arch/openrisc/mm/cache.c: In function 'cache_loop':
    ./arch/openrisc/include/asm/spr.h:16:27: warning: 'asm' operand 0 probably does not match constraints
    16 | #define mtspr(_spr, _val) __asm__ __volatile__ ( \
    | ^~~~~~~
    arch/openrisc/mm/cache.c:25:3: note: in expansion of macro 'mtspr'
    25 | mtspr(reg, line);
    | ^~~~~
    ./arch/openrisc/include/asm/spr.h:16:27: error: impossible constraint in 'asm'
    16 | #define mtspr(_spr, _val) __asm__ __volatile__ ( \
    | ^~~~~~~
    arch/openrisc/mm/cache.c:25:3: note: in expansion of macro 'mtspr'
    25 | mtspr(reg, line);
    | ^~~~~
    make[1]: *** [scripts/Makefile.build:283: arch/openrisc/mm/cache.o] Error 1

    The asm constraint "K" requires a immediate constant argument to mtspr,
    however because of no inlining a register argument is passed causing a
    failure. Fix this by using __always_inline.

    Link: https://lore.kernel.org/lkml/202008200453.ohnhqkjQ%25lkp@intel.com/
    Signed-off-by: Stafford Horne
    Signed-off-by: Sasha Levin

    Stafford Horne
     
  • [ Upstream commit 01ec372cef1e5afa4ab843bbaf88a6fcb64dc14c ]

    RHBZ: 1871246

    If during cifs_lookup()/get_inode_info() we encounter a DFS link
    and we use the cifsacl or modefromsid mount options we must suppress
    any -EREMOTE errors that triggers or else we will not be able to follow
    the DFS link and automount the target.

    This fixes an issue with modefromsid/cifsacl where these mountoptions
    would break DFS and we would no longer be able to access the share.

    Signed-off-by: Ronnie Sahlberg
    Reviewed-by: Paulo Alcantara (SUSE)
    Signed-off-by: Steve French
    Signed-off-by: Sasha Levin

    Ronnie Sahlberg
     
  • [ Upstream commit d2b86100245080cfdf1e95e9e07477474c1be2bd ]

    Enabling a whole subsystem from a single driver 'select' is frowned
    upon and won't be accepted in new drivers, that need to use 'depends on'
    instead. Existing selection of DMAENGINES will then cause circular
    dependencies. Replace them with a dependency.

    Signed-off-by: Laurent Pinchart
    Acked-by: Randy Dunlap
    Signed-off-by: Sasha Levin

    Laurent Pinchart
     
  • [ Upstream commit 8c6b6c793ed32b8f9770ebcdf1ba99af423c303b ]

    Since p points at raw xdr data, there's no guarantee that it's NULL
    terminated, so we should give a length. And probably escape any special
    characters too.

    Reported-by: Zhi Li
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Trond Myklebust
    Signed-off-by: Sasha Levin

    J. Bruce Fields
     
  • [ Upstream commit 644c9f40cf71969f29add32f32349e71d4995c0b ]

    If a write delegation isn't available, the Linux NFS client uses
    a zero-stateid when performing a SETATTR.

    NFSv4.0 provides no mechanism for an NFS server to match such a
    request to a particular client. It recalls all delegations for that
    file, even delegations held by the client issuing the request. If
    that client happens to hold a read delegation, the server will
    recall it immediately, resulting in an NFS4ERR_DELAY/CB_RECALL/
    DELEGRETURN sequence.

    Optimize out this pipeline bubble by having the client return any
    delegations it may hold on a file before it issues a
    SETATTR(zero-stateid) on that file.

    Signed-off-by: Chuck Lever
    Signed-off-by: Trond Myklebust
    Signed-off-by: Sasha Levin

    Chuck Lever
     
  • [ Upstream commit 837ba18dfcd4db21ad58107c65bfe89753aa56d7 ]

    The "tx/rx-transfer - crossing PAGE_SIZE" test always fails when
    len=131071 and rx_offset >= 5:

    spi-loopback-test spi0.0: Running test tx/rx-transfer - crossing PAGE_SIZE
    ...
    with iteration values: len = 131071, tx_off = 0, rx_off = 3
    with iteration values: len = 131071, tx_off = 0, rx_off = 4
    with iteration values: len = 131071, tx_off = 0, rx_off = 5
    loopback strangeness - rx changed outside of allowed range at: ...a4321000
    spi_msg@ffffffd5a4157690
    frame_length: 131071
    actual_length: 131071
    spi_transfer@ffffffd5a41576f8
    len: 131071
    tx_buf: ffffffd5a4340ffc

    Note that rx_offset > 3 can only occur if the SPI controller driver sets
    ->dma_alignment to a higher value than 4, so most SPI controller drivers
    are not affect.

    The allocated Rx buffer is of size SPI_TEST_MAX_SIZE_PLUS, which is 132
    KiB (assuming 4 KiB pages). This test uses an initial offset into the
    rx_buf of PAGE_SIZE - 4, and a len of 131071, so the range expected to
    be written in this transfer ends at (4096 - 4) + 5 + 131071 == 132 KiB,
    which is also the end of the allocated buffer. But the code which
    verifies the content of the buffer reads a byte beyond the allocated
    buffer and spuriously fails because this out-of-bounds read doesn't
    return the expected value.

    Fix this by using ITERATE_LEN instead of ITERATE_MAX_LEN to avoid
    testing sizes which cause out-of-bounds reads.

    Signed-off-by: Vincent Whitchurch
    Link: https://lore.kernel.org/r/20200902132341.7079-1-vincent.whitchurch@axis.com
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Vincent Whitchurch
     
  • [ Upstream commit 59ae97a7a9e1499c2070e29841d1c4be4ae2994a ]

    If the zero duty cycle doesn't correspond to any voltage in the voltage
    table, the PWM regulator returns an -EINVAL from get_voltage_sel() which
    results in the core erroring out with a "failed to get the current
    voltage" and ending up not applying the machine constraints.

    Instead, return -ENOTRECOVERABLE which makes the core set the voltage
    since it's at an unknown value.

    For example, with this device tree:

    fooregulator {
    compatible = "pwm-regulator";
    pwms = ;
    regulator-min-microvolt = ;
    regulator-max-microvolt = ;
    regulator-name = "fooregulator";
    regulator-always-on;
    regulator-boot-on;
    voltage-table = ;
    };

    Before this patch:

    fooregulator: failed to get the current voltage(-22)

    After this patch:

    fooregulator: Setting 2250000-2250000uV
    fooregulator: 2250 mV

    Signed-off-by: Vincent Whitchurch
    Link: https://lore.kernel.org/r/20200902130952.24880-1-vincent.whitchurch@axis.com
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin

    Vincent Whitchurch
     
  • [ Upstream commit 7b08e89f98cee9907895fabb64cf437bc505ce9a ]

    The driver is unable to successfully login with remote device. During pt2pt
    login, the driver completes its FLOGI request with the remote device having
    WWN precedence. The remote device issues its own (delayed) FLOGI after
    accepting the driver's and, upon transmitting the FLOGI, immediately
    recognizes it has already processed the driver's FLOGI thus it transitions
    to sending a PLOGI before waiting for an ACC to its FLOGI.

    In the driver, the FLOGI is received and an ACC sent, followed by the PLOGI
    being received and an ACC sent. The issue is that the PLOGI reception
    occurs before the response from the adapter from the FLOGI ACC is
    received. Processing of the PLOGI sets state flags to perform the REG_RPI
    mailbox command and proceed with the rest of discovery on the port. The
    same completion routine used by both FLOGI and PLOGI is generic in
    nature. One of the things it does is clear flags, and those flags happen to
    drive the rest of discovery. So what happened was the PLOGI processing set
    the flags, the FLOGI ACC completion cleared them, thus when the PLOGI ACC
    completes it doesn't see the flags and stops.

    Fix by modifying the generic completion routine to not clear the rest of
    discovery flag (NLP_ACC_REGLOGIN) unless the completion is also associated
    with performing a mailbox command as part of its handling. For things such
    as FLOGI ACC, there isn't a subsequent action to perform with the adapter,
    thus there is no mailbox cmd ptr. PLOGI ACC though will perform REG_RPI
    upon completion, thus there is a mailbox cmd ptr.

    Link: https://lore.kernel.org/r/20200828175332.130300-3-james.smart@broadcom.com
    Co-developed-by: Dick Kennedy
    Signed-off-by: Dick Kennedy
    Signed-off-by: James Smart
    Signed-off-by: Martin K. Petersen
    Signed-off-by: Sasha Levin

    James Smart
     
  • [ Upstream commit 5a5b80f98534416b3b253859897e2ba1dc241e70 ]

    Fix for '&fp->skb' double free.

    Link:
    https://lore.kernel.org/r/20200825093940.19612-1-jhasan@marvell.com
    Reported-by: Dan Carpenter
    Signed-off-by: Javed Hasan
    Signed-off-by: Martin K. Petersen
    Signed-off-by: Sasha Levin

    Javed Hasan
     
  • [ Upstream commit ea403fde7552bd61bad6ea45e3feb99db77cb31e ]

    When pm8001_tag_alloc() fails, task should be freed just like it is done in
    the subsequent error paths.

    Link: https://lore.kernel.org/r/20200823091453.4782-1-dinghao.liu@zju.edu.cn
    Acked-by: Jack Wang
    Signed-off-by: Dinghao Liu
    Signed-off-by: Martin K. Petersen
    Signed-off-by: Sasha Levin

    Dinghao Liu
     
  • [ Upstream commit 3d7a9520f0c3e6a68b6de8c5812fc8b6d7a52626 ]

    A client should be able to handle getting an ERR_DELAY error
    while doing a LOCK call to reclaim state due to delegation being
    recalled. This is a transient error that can happen due to server
    moving its volumes and invalidating its file location cache and
    upon reference to it during the LOCK call needing to do an
    expensive lookup (leading to an ERR_DELAY error on a PUTFH).

    Signed-off-by: Olga Kornievskaia
    Signed-off-by: Trond Myklebust
    Signed-off-by: Sasha Levin

    Olga Kornievskaia
     
  • commit 4965b8cd1bc1ffb017e5c58e622da82b55e49414 upstream.

    vfree() is being called on paged buffer allocated
    using alloc_page() and mapped using vmap().

    Freeing of pages in vfree() relies on nr_pages of
    struct vm_struct. vmap() does not update nr_pages.
    It can lead to memory leaks.

    Fixes: ddaf29fd9bb6 ("firmware: Free temporary page table after vmapping")
    Signed-off-by: Prateek Sood
    Reviewed-by: Takashi Iwai
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/1597957070-27185-1-git-send-email-prsood@codeaurora.org
    Cc: Shuah Khan
    Signed-off-by: Greg Kroah-Hartman

    Prateek Sood
     
  • commit 4d820543c54c47a2bd3c95ddbf52f83c89a219a0 upstream.

    When using vf_ops->ndo_select_queue, the number of queues of VF is
    usually bigger than the synthetic NIC. This condition may happen
    often.
    Remove "unlikely" from the comparison of ndev->real_num_tx_queues.

    Fixes: b3bf5666a510 ("hv_netvsc: defer queue selection to VF")
    Signed-off-by: Haiyang Zhang
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Haiyang Zhang
     
  • commit eabe861881a733fc84f286f4d5a1ffaddd4f526f upstream.

    pskb_carve_frag_list() may return -ENOMEM in pskb_carve_inside_nonlinear().
    we should handle this correctly or we would get wrong sk_buff.

    Fixes: 6fa01ccd8830 ("skbuff: Add pskb_extract() helper function")
    Signed-off-by: Miaohe Lin
    Signed-off-by: David S. Miller
    Signed-off-by: Greg Kroah-Hartman

    Miaohe Lin
     
  • commit 1ed9ec9b08addbd8d3e36d5f4a652d8590a6ddb7 upstream.

    The driver for Marvell switches puts all ports in IGMP snooping mode
    which results in all IGMP/MLD frames that ingress on the ports to be
    forwarded to the CPU only.

    The bridge code in the kernel can then interpret these frames and act
    upon them, for instance by updating the mdb in the switch to reflect
    multicast memberships of stations connected to the ports. However,
    the IGMP/MLD frames must then also be forwarded to other ports of the
    bridge so external IGMP queriers can track membership reports, and
    external multicast clients can receive query reports from foreign IGMP
    queriers.

    Currently, this is impossible as the EDSA tagger sets offload_fwd_mark
    on the skb when it unwraps the tagged frames, and that will make the
    switchdev layer prevent the skb from egressing on any other port of
    the same switch.

    To fix that, look at the To_CPU code in the DSA header and make
    forwarding of the frame possible for trapped IGMP packets.

    Introduce some #defines for the frame types to make the code a bit more
    comprehensive.

    This was tested on a Marvell 88E6352 variant.

    Signed-off-by: Daniel Mack
    Reviewed-by: Andrew Lunn
    Tested-by: Andrew Lunn
    Signed-off-by: David S. Miller
    Cc: DENG Qingfang
    Signed-off-by: Greg Kroah-Hartman

    Daniel Mack
     
  • commit 914ee9c436cbe90c8ca8a46ec8433cb614a2ada5 upstream.

    Add devices ID's for the next LOM generations that will be
    available on the next Intel Client platform (Comet Lake)
    This patch provides the initial support for these devices

    Signed-off-by: Sasha Neftin
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher
    Cc: Anthony Nguyen
    Signed-off-by: Greg Kroah-Hartman

    Sasha Neftin
     
  • commit 847b97887ed4569968d5b9a740f2334abca9f99a upstream.

    Some adapters report more than 256 gid entries. Restrict it to 256 for
    now.

    Fixes: 1ac5a4047975("RDMA/bnxt_re: Add bnxt_re RoCE driver")
    Link: https://lore.kernel.org/r/1598292876-26529-6-git-send-email-selvin.xavier@broadcom.com
    Signed-off-by: Naresh Kumar PBS
    Signed-off-by: Selvin Xavier
    Signed-off-by: Jason Gunthorpe
    Signed-off-by: Greg Kroah-Hartman

    Naresh Kumar PBS
     
  • commit cbcc89b630447ec7836aa2b9242d9bb1725f5a61 upstream.

    Since transactions may be freed shortly after they're created, before
    a log_flush occurs, we need to initialize their ail1 and ail2 lists
    earlier. Before this patch, the ail1 list was initialized in gfs2_log_flush().
    This moves the initialization to the point when the transaction is first
    created.

    Signed-off-by: Bob Peterson
    Signed-off-by: Andreas Gruenbacher
    Cc: Salvatore Bonaccorso
    Signed-off-by: Greg Kroah-Hartman

    Bob Peterson
     

17 Sep, 2020

18 commits

  • Tested-by: Shuah Khan
    Tested-by: Jon Hunter
    Tested-by: Linux Kernel Functional Testing
    Tested-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • [ Upstream commit 40249c6962075c040fd071339acae524f18bfac9 ]

    Using gcov to collect coverage data for kernels compiled with GCC 10.1
    causes random malfunctions and kernel crashes. This is the result of a
    changed GCOV_COUNTERS value in GCC 10.1 that causes a mismatch between
    the layout of the gcov_info structure created by GCC profiling code and
    the related structure used by the kernel.

    Fix this by updating the in-kernel GCOV_COUNTERS value. Also re-enable
    config GCOV_KERNEL for use with GCC 10.

    Reported-by: Colin Ian King
    Reported-by: Leon Romanovsky
    Signed-off-by: Peter Oberparleiter
    Tested-by: Leon Romanovsky
    Tested-and-Acked-by: Colin Ian King
    Signed-off-by: Linus Torvalds
    Signed-off-by: Sasha Levin

    Peter Oberparleiter
     
  • [ Upstream commit f6828e0c4045f03f9cf2df6c2a768102641183f4 ]

    Disable the RPTR shadow across all targets. It will be selectively
    re-enabled later for targets that need it.

    Cc: stable@vger.kernel.org
    Signed-off-by: Jordan Crouse
    Signed-off-by: Rob Clark
    Signed-off-by: Sasha Levin

    Jordan Crouse
     
  • [ Upstream commit 352c83fb39cae3eff95a8e1ed23006291abb6196 ]

    The GPU has no business writing into the ringbuffer, let's make it
    readonly to the GPU.

    Fixes: 7198e6b03155 ("drm/msm: add a3xx gpu support")
    Signed-off-by: Rob Clark
    Reviewed-by: Jordan Crouse
    Signed-off-by: Rob Clark
    Signed-off-by: Sasha Levin

    Rob Clark
     
  • commit 1f3546ff3f0a1000971daef58406954bad3f7061 upstream.

    Failing probe with -EPROBE_DEFER until all dependencies
    listed in the _DEP (Operation Region Dependencies) object
    have been met.

    This will fix an issue where on some platforms UCSI ACPI
    driver fails to probe because the address space handler for
    the operation region that the UCSI ACPI interface uses has
    not been loaded yet.

    Fixes: 8243edf44152 ("usb: typec: ucsi: Add ACPI driver")
    Cc: stable@vger.kernel.org
    Signed-off-by: Heikki Krogerus
    Link: https://lore.kernel.org/r/20200904110918.51546-1-heikki.krogerus@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman

    Heikki Krogerus
     
  • commit cfd54fa83a5068b61b7eb28d3c117d8354c74c7a upstream.

    Userspace drivers that use a SetConfiguration() request to "lightweight"
    reset an already configured usb device might cause data toggles to get out
    of sync between the device and host, and the device becomes unusable.

    The xHCI host requires endpoints to be dropped and added back to reset the
    toggle. If USB core notices the new configuration is the same as the
    current active configuration it will avoid these extra steps by calling
    usb_reset_configuration() instead of usb_set_configuration().

    A SetConfiguration() request will reset the device side data toggles.
    Make sure usb_reset_configuration() function also drops and adds back the
    endpoints to ensure data toggles are in sync.

    To avoid code duplication split the current usb_disable_device() function
    and reuse the endpoint specific part.

    Cc: stable
    Tested-by: Martin Thierer
    Signed-off-by: Mathias Nyman
    Link: https://lore.kernel.org/r/20200901082528.12557-1-mathias.nyman@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman

    Mathias Nyman
     
  • commit 1ac698790819b83f39fd7ea4f6cdabee9bdd7b38 upstream.

    These modules have 2 different USB layouts:

    The default layout with PID 0x9205 (AT+CUSBSELNV=1) exposes 4 TTYs and
    an ECM interface:

    T: Bus=02 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 6 Spd=480 MxCh= 0
    D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
    P: Vendor=1e0e ProdID=9205 Rev=00.00
    S: Manufacturer=SimTech, Incorporated
    S: Product=SimTech SIM7080
    S: SerialNumber=1234567890ABCDEF
    C: #Ifs= 6 Cfg#= 1 Atr=e0 MxPwr=500mA
    I: If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    I: If#=0x1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    I: If#=0x2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    I: If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    I: If#=0x4 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether
    I: If#=0x5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether

    The purpose of each TTY is as follows:
    * ttyUSB0: DIAG/QCDM port.
    * ttyUSB1: GNSS data.
    * ttyUSB2: AT-capable port (control).
    * ttyUSB3: AT-capable port (data).

    In the secondary layout with PID=0x9206 (AT+CUSBSELNV=86) the module
    exposes 6 TTY ports:

    T: Bus=02 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 8 Spd=480 MxCh= 0
    D: Ver= 2.00 Cls=02(commc) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
    P: Vendor=1e0e ProdID=9206 Rev=00.00
    S: Manufacturer=SimTech, Incorporated
    S: Product=SimTech SIM7080
    S: SerialNumber=1234567890ABCDEF
    C: #Ifs= 6 Cfg#= 1 Atr=e0 MxPwr=500mA
    I: If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    I: If#=0x1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    I: If#=0x2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    I: If#=0x3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    I: If#=0x4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    I: If#=0x5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option

    The purpose of each TTY is as follows:
    * ttyUSB0: DIAG/QCDM port.
    * ttyUSB1: GNSS data.
    * ttyUSB2: AT-capable port (control).
    * ttyUSB3: QFLOG interface.
    * ttyUSB4: DAM interface.
    * ttyUSB5: AT-capable port (data).

    Signed-off-by: Aleksander Morgado
    Cc: stable@vger.kernel.org
    Signed-off-by: Johan Hovold
    Signed-off-by: Greg Kroah-Hartman

    Aleksander Morgado
     
  • commit 2bb70f0a4b238323e4e2f392fc3ddeb5b7208c9e upstream.

    The USB composition, defining the set of exported functions, is dynamic
    in newer Quectel modems. Default functions can be disabled and
    alternative functions can be enabled instead. The alternatives
    includes class functions using interface pairs, which should be
    handled by the respective class drivers.

    Active interfaces are numbered consecutively, so static
    blacklisting based on interface numbers will fail when the
    composition changes. An example of such an error, where the
    option driver has bound to the CDC ECM data interface,
    preventing cdc_ether from handling this function:

    T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0
    D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
    P: Vendor=2c7c ProdID=0125 Rev= 3.18
    S: Manufacturer=Quectel
    S: Product=EC25-AF
    C:* #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA
    A: FirstIf#= 4 IfCount= 2 Cls=02(comm.) Sub=06 Prot=00
    I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
    E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
    E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
    E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
    E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
    E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
    E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 4 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=(none)
    E: Ad=89(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
    I:* If#= 5 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=option
    I: If#= 5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=option
    E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

    Another device with the same id gets correct drivers, since the
    interface of the network function happens to be blacklisted by option:

    T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#= 3 Spd=480 MxCh= 0
    D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
    P: Vendor=2c7c ProdID=0125 Rev= 3.18
    S: Manufacturer=Android
    S: Product=Android
    C:* #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA
    I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
    E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
    E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
    E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
    E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
    E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms
    E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
    E: Ad=89(I) Atr=03(Int.) MxPS= 8 Ivl=32ms
    E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

    Change rules for EC21, EC25, BG96 and EG95 to match vendor specific
    serial functions only, to prevent binding to class functions. Require
    2 endpoints on ff/ff/ff functions, avoiding the 3 endpoint QMI/RMNET
    network functions.

    Cc: AceLan Kao
    Cc: Sebastian Sjoholm
    Cc: Dan Williams
    Cc: stable@vger.kernel.org
    Signed-off-by: Bjørn Mork
    Signed-off-by: Johan Hovold
    Signed-off-by: Greg Kroah-Hartman

    Bjørn Mork
     
  • commit 6ccc48e0eb2f3a5f3bd39954a21317e5f8874726 upstream.

    The device added has an FTDI chip inside.
    The device is used to connect Xsens USB Motion Trackers.

    Cc: stable@vger.kernel.org
    Signed-off-by: Patrick Riphagen
    Signed-off-by: Johan Hovold
    Signed-off-by: Greg Kroah-Hartman

    Patrick Riphagen
     
  • commit a18cd6c9b6bc73dc17e8b7e9bd07decaa8833c97 upstream.

    The USB device descriptor may get changed between two consecutive
    enumerations on the same device for some reason, such as DFU or
    malicius device.
    In that case, we may access the changing descriptor if we don't take
    the device lock here.

    The issue is reported:
    https://syzkaller.appspot.com/bug?id=901a0d9e6519ef8dc7acab25344bd287dd3c7be9

    Cc: stable
    Cc: Alan Stern
    Reported-by: syzbot+256e56ddde8b8957eabd@syzkaller.appspotmail.com
    Fixes: 217a9081d8e6 ("USB: add all configs to the "descriptors" attribute")
    Signed-off-by: Zeng Tao
    Link: https://lore.kernel.org/r/1599201467-11000-1-git-send-email-prime.zeng@hisilicon.com
    Signed-off-by: Greg Kroah-Hartman

    Zeng Tao
     
  • commit afd55e6d1bd35b4b36847869011447a83a81c8e0 upstream.

    There were some problem in ipq8074 Gen2 PCIe phy init sequence.

    1. Few register values were wrongly updated in the phy init sequence.
    2. The register QSERDES_RX_SIGDET_CNTRL is a RX tuning parameter
    register which is added in serdes table causing the wrong register
    was getting updated.
    3. Clocks and resets were not added in the phy init.

    Fix these to make Gen2 PCIe port on ipq8074 devices to work.

    Fixes: eef243d04b2b6 ("phy: qcom-qmp: Add support for IPQ8074")
    Cc: stable@vger.kernel.org
    Co-developed-by: Selvam Sathappan Periakaruppan
    Signed-off-by: Selvam Sathappan Periakaruppan
    Signed-off-by: Sivaprakash Murugesan
    Link: https://lore.kernel.org/r/1596036607-11877-4-git-send-email-sivaprak@codeaurora.org
    Signed-off-by: Vinod Koul
    Signed-off-by: Greg Kroah-Hartman

    Sivaprakash Murugesan
     
  • commit 1dffeb8b8b4c261c45416d53c75ea51e6ece1770 upstream.

    The current implementation for gbcodec_mixer_dapm_ctl_put() uses
    uninitialized gbvalue for comparison with updated value. This was found
    using static analysis with coverity.

    Uninitialized scalar variable (UNINIT)
    11. uninit_use: Using uninitialized value
    gbvalue.value.integer_value[0].
    460 if (gbvalue.value.integer_value[0] != val) {

    This patch fixes the issue with fetching the gbvalue before using it for
    comparision.

    Fixes: 6339d2322c47 ("greybus: audio: Add topology parser for GB codec")
    Reported-by: Colin Ian King
    Signed-off-by: Vaibhav Agarwal
    Cc: stable
    Link: https://lore.kernel.org/r/bc4f29eb502ccf93cd2ffd98db0e319fa7d0f247.1597408126.git.vaibhav.sr@gmail.com
    Signed-off-by: Greg Kroah-Hartman

    Vaibhav Agarwal
     
  • commit bd018a6a75cebb511bb55a0e7690024be975fe93 upstream.

    syzbot is reporting OOB read at vga_8planes_imageblit() [1], for
    "cdat[y] >> 4" can become a negative value due to "const char *cdat".

    [1] https://syzkaller.appspot.com/bug?id=0d7a0da1557dcd1989e00cb3692b26d4173b4132

    Reported-by: syzbot
    Signed-off-by: Tetsuo Handa
    Cc: stable
    Link: https://lore.kernel.org/r/90b55ec3-d5b0-3307-9f7c-7ff5c5fd6ad3@i-love.sakura.ne.jp
    Signed-off-by: Greg Kroah-Hartman

    Tetsuo Handa
     
  • commit 2a6838d54128952ace6f0ca166dd8706abe46649 upstream.

    Add syscon compatibility with Vybrid OCOTP node. This is required to
    access the UID.

    Fixes: fa8d20c8dbb77 ("ARM: dts: vfxxx: Add node corresponding to OCOTP")
    Cc: stable@vger.kernel.org
    Reviewed-by: Fabio Estevam
    Reviewed-by: Stefan Agner
    Signed-off-by: Chris Healy
    Signed-off-by: Shawn Guo
    Signed-off-by: Greg Kroah-Hartman

    Chris Healy
     
  • commit e3b9fc7eec55e6fdc8beeed18f2ed207086341e2 upstream.

    The '#ifdef MODULE' check in the original commit does not work as intended.
    The code under the check is not built at all if CONFIG_DEBUG_FS=y. Fix this
    by using a correct check.

    Fixes: 275678e7a9be ("debugfs: Check module state before warning in {full/open}_proxy_open()")
    Signed-off-by: Vladis Dronov
    Cc: stable
    Link: https://lore.kernel.org/r/20200811150129.53343-1-vdronov@redhat.com
    Signed-off-by: Greg Kroah-Hartman

    Vladis Dronov
     
  • commit f65886606c2d3b562716de030706dfe1bea4ed5e upstream.

    when kmalloc() fails in kvm_io_bus_unregister_dev(), before removing
    the bus, we should iterate over all other devices linked to it and call
    kvm_iodevice_destructor() for them

    Fixes: 90db10434b16 ("KVM: kvm_io_bus_unregister_dev() should never fail")
    Cc: stable@vger.kernel.org
    Reported-and-tested-by: syzbot+f196caa45793d6374707@syzkaller.appspotmail.com
    Link: https://syzkaller.appspot.com/bug?extid=f196caa45793d6374707
    Signed-off-by: Rustam Kovhaev
    Reviewed-by: Vitaly Kuznetsov
    Message-Id:
    Signed-off-by: Paolo Bonzini
    Signed-off-by: Greg Kroah-Hartman

    Rustam Kovhaev
     
  • commit 3fb884ffe921c99483a84b0175f3c03f048e9069 upstream.

    For the obscure cases where PMD and PUD are the same size
    (64kB pages with 42bit VA, for example, which results in only
    two levels of page tables), we can't map anything as a PUD,
    because there is... erm... no PUD to speak of. Everything is
    either a PMD or a PTE.

    So let's only try and map a PUD when its size is different from
    that of a PMD.

    Cc: stable@vger.kernel.org
    Fixes: b8e0ba7c8bea ("KVM: arm64: Add support for creating PUD hugepages at stage 2")
    Reported-by: Gavin Shan
    Reported-by: Eric Auger
    Reviewed-by: Alexandru Elisei
    Reviewed-by: Gavin Shan
    Tested-by: Gavin Shan
    Tested-by: Eric Auger
    Tested-by: Alexandru Elisei
    Signed-off-by: Marc Zyngier
    Signed-off-by: Greg Kroah-Hartman

    Marc Zyngier
     
  • commit 99b82a1437cb31340dbb2c437a2923b9814a7b15 upstream.

    According to SDM 27.2.4, Event delivery causes an APIC-access VM exit.
    Don't report internal error and freeze guest when event delivery causes
    an APIC-access exit, it is handleable and the event will be re-injected
    during the next vmentry.

    Signed-off-by: Wanpeng Li
    Message-Id:
    Cc: stable@vger.kernel.org
    Signed-off-by: Paolo Bonzini
    Signed-off-by: Greg Kroah-Hartman

    Wanpeng Li