1. 02 May, 2020 18 commits
    • Kai-Heng Feng's avatar
      PCI: Avoid ASMedia XHCI USB PME# from D0 defect · 7829106c
      Kai-Heng Feng authored
      commit 2880325b upstream.
      
      The ASMedia USB XHCI Controller claims to support generating PME# while
      in D0:
      
        01:00.0 USB controller: ASMedia Technology Inc. Device 2142 (prog-if 30 [XHCI])
          Subsystem: SUNIX Co., Ltd. Device 312b
          Capabilities: [78] Power Management version 3
            Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0+,D1-,D2-,D3hot-,D3cold-)
            Status: D0 NoSoftRst+ PME-Enable+ DSel=0 DScale=0 PME-
      
      However PME# only gets asserted when plugging USB 2.0 or USB 1.1 devices,
      but not for USB 3.0 devices.
      
      Remove PCI_PM_CAP_PME_D0 to avoid using PME under D0.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=205919
      Link: https://lore.kernel.org/r/20191219192006.16270-1-kai.heng.feng@canonical.comSigned-off-by: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7829106c
    • Chuck Lever's avatar
      svcrdma: Fix leak of svc_rdma_recv_ctxt objects · c8aacb4d
      Chuck Lever authored
      commit 23cf1ee1 upstream.
      
      Utilize the xpo_release_rqst transport method to ensure that each
      rqstp's svc_rdma_recv_ctxt object is released even when the server
      cannot return a Reply for that rqstp.
      
      Without this fix, each RPC whose Reply cannot be sent leaks one
      svc_rdma_recv_ctxt. This is a 2.5KB structure, a 4KB DMA-mapped
      Receive buffer, and any pages that might be part of the Reply
      message.
      
      The leak is infrequent unless the network fabric is unreliable or
      Kerberos is in use, as GSS sequence window overruns, which result
      in connection loss, are more common on fast transports.
      
      Fixes: 3a88092e ("svcrdma: Preserve Receive buffer until svc_rdma_sendto")
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c8aacb4d
    • Chuck Lever's avatar
      svcrdma: Fix trace point use-after-free race · 66a04cd1
      Chuck Lever authored
      commit e28b4fc6 upstream.
      
      I hit this while testing nfsd-5.7 with kernel memory debugging
      enabled on my server:
      
      Mar 30 13:21:45 klimt kernel: BUG: unable to handle page fault for address: ffff8887e6c279a8
      Mar 30 13:21:45 klimt kernel: #PF: supervisor read access in kernel mode
      Mar 30 13:21:45 klimt kernel: #PF: error_code(0x0000) - not-present page
      Mar 30 13:21:45 klimt kernel: PGD 3601067 P4D 3601067 PUD 87c519067 PMD 87c3e2067 PTE 800ffff8193d8060
      Mar 30 13:21:45 klimt kernel: Oops: 0000 [#1] SMP DEBUG_PAGEALLOC PTI
      Mar 30 13:21:45 klimt kernel: CPU: 2 PID: 1933 Comm: nfsd Not tainted 5.6.0-rc6-00040-g881e87a3c6f9 #1591
      Mar 30 13:21:45 klimt kernel: Hardware name: Supermicro Super Server/X10SRL-F, BIOS 1.0c 09/09/2015
      Mar 30 13:21:45 klimt kernel: RIP: 0010:svc_rdma_post_chunk_ctxt+0xab/0x284 [rpcrdma]
      Mar 30 13:21:45 klimt kernel: Code: c1 83 34 02 00 00 29 d0 85 c0 7e 72 48 8b bb a0 02 00 00 48 8d 54 24 08 4c 89 e6 48 8b 07 48 8b 40 20 e8 5a 5c 2b e1 41 89 c6 <8b> 45 20 89 44 24 04 8b 05 02 e9 01 00 85 c0 7e 33 e9 5e 01 00 00
      Mar 30 13:21:45 klimt kernel: RSP: 0018:ffffc90000dfbdd8 EFLAGS: 00010286
      Mar 30 13:21:45 klimt kernel: RAX: 0000000000000000 RBX: ffff8887db8db400 RCX: 0000000000000030
      Mar 30 13:21:45 klimt kernel: RDX: 0000000000000040 RSI: 0000000000000000 RDI: 0000000000000246
      Mar 30 13:21:45 klimt kernel: RBP: ffff8887e6c27988 R08: 0000000000000000 R09: 0000000000000004
      Mar 30 13:21:45 klimt kernel: R10: ffffc90000dfbdd8 R11: 00c068ef00000000 R12: ffff8887eb4e4a80
      Mar 30 13:21:45 klimt kernel: R13: ffff8887db8db634 R14: 0000000000000000 R15: ffff8887fc931000
      Mar 30 13:21:45 klimt kernel: FS:  0000000000000000(0000) GS:ffff88885bd00000(0000) knlGS:0000000000000000
      Mar 30 13:21:45 klimt kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      Mar 30 13:21:45 klimt kernel: CR2: ffff8887e6c279a8 CR3: 000000081b72e002 CR4: 00000000001606e0
      Mar 30 13:21:45 klimt kernel: Call Trace:
      Mar 30 13:21:45 klimt kernel: ? svc_rdma_vec_to_sg+0x7f/0x7f [rpcrdma]
      Mar 30 13:21:45 klimt kernel: svc_rdma_send_write_chunk+0x59/0xce [rpcrdma]
      Mar 30 13:21:45 klimt kernel: svc_rdma_sendto+0xf9/0x3ae [rpcrdma]
      Mar 30 13:21:45 klimt kernel: ? nfsd_destroy+0x51/0x51 [nfsd]
      Mar 30 13:21:45 klimt kernel: svc_send+0x105/0x1e3 [sunrpc]
      Mar 30 13:21:45 klimt kernel: nfsd+0xf2/0x149 [nfsd]
      Mar 30 13:21:45 klimt kernel: kthread+0xf6/0xfb
      Mar 30 13:21:45 klimt kernel: ? kthread_queue_delayed_work+0x74/0x74
      Mar 30 13:21:45 klimt kernel: ret_from_fork+0x3a/0x50
      Mar 30 13:21:45 klimt kernel: Modules linked in: ocfs2_dlmfs ocfs2_stack_o2cb ocfs2_dlm ocfs2_nodemanager ocfs2_stackglue ib_umad ib_ipoib mlx4_ib sb_edac x86_pkg_temp_thermal iTCO_wdt iTCO_vendor_support coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel glue_helper crypto_simd cryptd pcspkr rpcrdma i2c_i801 rdma_ucm lpc_ich mfd_core ib_iser rdma_cm iw_cm ib_cm mei_me raid0 libiscsi mei sg scsi_transport_iscsi ioatdma wmi ipmi_si ipmi_devintf ipmi_msghandler acpi_power_meter nfsd nfs_acl lockd auth_rpcgss grace sunrpc ip_tables xfs libcrc32c mlx4_en sd_mod sr_mod cdrom mlx4_core crc32c_intel igb nvme i2c_algo_bit ahci i2c_core libahci nvme_core dca libata t10_pi qedr dm_mirror dm_region_hash dm_log dm_mod dax qede qed crc8 ib_uverbs ib_core
      Mar 30 13:21:45 klimt kernel: CR2: ffff8887e6c279a8
      Mar 30 13:21:45 klimt kernel: ---[ end trace 87971d2ad3429424 ]---
      
      It's absolutely not safe to use resources pointed to by the @send_wr
      argument of ib_post_send() _after_ that function returns. Those
      resources are typically freed by the Send completion handler, which
      can run before ib_post_send() returns.
      
      Thus the trace points currently around ib_post_send() in the
      server's RPC/RDMA transport are a hazard, even when they are
      disabled. Rearrange them so that they touch the Work Request only
      _before_ ib_post_send() is invoked.
      
      Fixes: bd2abef3 ("svcrdma: Trace key RDMA API events")
      Fixes: 4201c746 ("svcrdma: Introduce svc_rdma_send_ctxt")
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      66a04cd1
    • Brian Foster's avatar
      xfs: acquire superblock freeze protection on eofblocks scans · 88e28547
      Brian Foster authored
      commit 4b674b9a upstream.
      
      The filesystem freeze sequence in XFS waits on any background
      eofblocks or cowblocks scans to complete before the filesystem is
      quiesced. At this point, the freezer has already stopped the
      transaction subsystem, however, which means a truncate or cowblock
      cancellation in progress is likely blocked in transaction
      allocation. This results in a deadlock between freeze and the
      associated scanner.
      
      Fix this problem by holding superblock write protection across calls
      into the block reapers. Since protection for background scans is
      acquired from the workqueue task context, trylock to avoid a similar
      deadlock between freeze and blocking on the write lock.
      
      Fixes: d6b636eb ("xfs: halt auto-reclamation activities while rebuilding rmap")
      Reported-by: default avatarPaul Furtado <paulfurtado91@gmail.com>
      Signed-off-by: default avatarBrian Foster <bfoster@redhat.com>
      Reviewed-by: default avatarChandan Rajendra <chandanrlinux@gmail.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarAllison Collins <allison.henderson@oracle.com>
      Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      88e28547
    • Jason Gunthorpe's avatar
      net/cxgb4: Check the return from t4_query_params properly · 09d79b07
      Jason Gunthorpe authored
      commit c799fca8 upstream.
      
      Positive return values are also failures that don't set val,
      although this probably can't happen. Fixes gcc 10 warning:
      
      drivers/net/ethernet/chelsio/cxgb4/t4_hw.c: In function ‘t4_phy_fw_ver’:
      drivers/net/ethernet/chelsio/cxgb4/t4_hw.c:3747:14: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized]
       3747 |  *phy_fw_ver = val;
      
      Fixes: 01b69614 ("cxgb4: Add PHY firmware support for T420-BT cards")
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      09d79b07
    • David Howells's avatar
      rxrpc: Fix DATA Tx to disable nofrag for UDP on AF_INET6 socket · c7aa592a
      David Howells authored
      commit 0e631eee upstream.
      
      Fix the DATA packet transmission to disable nofrag for UDPv4 on an AF_INET6
      socket as well as UDPv6 when trying to transmit fragmentably.
      
      Without this, packets filled to the normal size used by the kernel AFS
      client of 1412 bytes be rejected by udp_sendmsg() with EMSGSIZE
      immediately.  The ->sk_error_report() notification hook is called, but
      rxrpc doesn't generate a trace for it.
      
      This is a temporary fix; a more permanent solution needs to involve
      changing the size of the packets being filled in accordance with the MTU,
      which isn't currently done in AF_RXRPC.  The reason for not doing so was
      that, barring the last packet in an rx jumbo packet, jumbos can only be
      assembled out of 1412-byte packets - and the plan was to construct jumbos
      on the fly at transmission time.
      
      Also, there's no point turning on IPV6_MTU_DISCOVER, since IPv6 has to
      engage in this anyway since fragmentation is only done by the sender.  We
      can then condense the switch-statement in rxrpc_send_data_packet().
      
      Fixes: 75b54cb5 ("rxrpc: Add IPv6 support")
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c7aa592a
    • Wolfram Sang's avatar
      i2c: altera: use proper variable to hold errno · 0a90f0a7
      Wolfram Sang authored
      commit edb2c9dd upstream.
      
      device_property_read_u32() returns errno or 0, so we should use the
      integer variable 'ret' and not the u32 'val' to hold the retval.
      
      Fixes: 0560ad57 ("i2c: altera: Add Altera I2C Controller driver")
      Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
      Reviewed-by: default avatarThor Thayer <thor.thayer@linux.intel.com>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0a90f0a7
    • Vasily Averin's avatar
      nfsd: memory corruption in nfsd4_lock() · 936d3652
      Vasily Averin authored
      commit e1e8399e upstream.
      
      New struct nfsd4_blocked_lock allocated in find_or_allocate_block()
      does not initialized nbl_list and nbl_lru.
      If conflock allocation fails rollback can call list_del_init()
      access uninitialized fields and corrupt memory.
      
      v2: just initialize nbl_list and nbl_lru right after nbl allocation.
      
      Fixes: 76d348fa ("nfsd: have nfsd4_lock use blocking locks for v4.1+ lock")
      Signed-off-by: default avatarVasily Averin <vvs@virtuozzo.com>
      Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      936d3652
    • Shengjiu Wang's avatar
      ASoC: wm8960: Fix wrong clock after suspend & resume · 6aa9b6c3
      Shengjiu Wang authored
      commit 1e060a45 upstream.
      
      After suspend & resume, wm8960_hw_params may be called when
      bias_level is not SND_SOC_BIAS_ON, then wm8960_configure_clocking
      is not called. But if sample rate is changed at that time, then
      the output clock rate will be not correct.
      
      So judgement of bias_level is SND_SOC_BIAS_ON in wm8960_hw_params
      is not necessary and it causes above issue.
      
      Fixes: 3176bf2d ("ASoC: wm8960: update pll and clock setting function")
      Signed-off-by: default avatarShengjiu Wang <shengjiu.wang@nxp.com>
      Acked-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
      Link: https://lore.kernel.org/r/1587468525-27514-1-git-send-email-shengjiu.wang@nxp.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6aa9b6c3
    • Philipp Puschmann's avatar
      ASoC: tas571x: disable regulators on failed probe · f367a7f7
      Philipp Puschmann authored
      commit 9df8ba7c upstream.
      
      If probe fails after enabling the regulators regulator_put is called for
      each supply without having them disabled before. This produces some
      warnings like
      
      WARNING: CPU: 0 PID: 90 at drivers/regulator/core.c:2044 _regulator_put.part.0+0x154/0x15c
      [<c010f7a8>] (unwind_backtrace) from [<c010c544>] (show_stack+0x10/0x14)
      [<c010c544>] (show_stack) from [<c012b640>] (__warn+0xd0/0xf4)
      [<c012b640>] (__warn) from [<c012b9b4>] (warn_slowpath_fmt+0x64/0xc4)
      [<c012b9b4>] (warn_slowpath_fmt) from [<c04c4064>] (_regulator_put.part.0+0x154/0x15c)
      [<c04c4064>] (_regulator_put.part.0) from [<c04c4094>] (regulator_put+0x28/0x38)
      [<c04c4094>] (regulator_put) from [<c04c40cc>] (regulator_bulk_free+0x28/0x38)
      [<c04c40cc>] (regulator_bulk_free) from [<c0579b2c>] (release_nodes+0x1d0/0x22c)
      [<c0579b2c>] (release_nodes) from [<c05756dc>] (really_probe+0x108/0x34c)
      [<c05756dc>] (really_probe) from [<c0575aec>] (driver_probe_device+0xb8/0x16c)
      [<c0575aec>] (driver_probe_device) from [<c0575d40>] (device_driver_attach+0x58/0x60)
      [<c0575d40>] (device_driver_attach) from [<c0575da0>] (__driver_attach+0x58/0xcc)
      [<c0575da0>] (__driver_attach) from [<c0573978>] (bus_for_each_dev+0x78/0xc0)
      [<c0573978>] (bus_for_each_dev) from [<c0574b5c>] (bus_add_driver+0x188/0x1e0)
      [<c0574b5c>] (bus_add_driver) from [<c05768b0>] (driver_register+0x74/0x108)
      [<c05768b0>] (driver_register) from [<c061ab7c>] (i2c_register_driver+0x3c/0x88)
      [<c061ab7c>] (i2c_register_driver) from [<c0102df8>] (do_one_initcall+0x58/0x250)
      [<c0102df8>] (do_one_initcall) from [<c01a91bc>] (do_init_module+0x60/0x244)
      [<c01a91bc>] (do_init_module) from [<c01ab5a4>] (load_module+0x2180/0x2540)
      [<c01ab5a4>] (load_module) from [<c01abbd4>] (sys_finit_module+0xd0/0xe8)
      [<c01abbd4>] (sys_finit_module) from [<c01011e0>] (__sys_trace_return+0x0/0x20)
      
      Fixes: 3fd6e7d9 (ASoC: tas571x: New driver for TI TAS571x power amplifiers)
      Signed-off-by: default avatarPhilipp Puschmann <p.puschmann@pironex.de>
      Link: https://lore.kernel.org/r/20200414112754.3365406-1-p.puschmann@pironex.deSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f367a7f7
    • Stephan Gerhold's avatar
      ASoC: q6dsp6: q6afe-dai: add missing channels to MI2S DAIs · 2b53a8ee
      Stephan Gerhold authored
      commit 0c824ec0 upstream.
      
      For some reason, the MI2S DAIs do not have channels_min/max defined.
      This means that snd_soc_dai_stream_valid() returns false,
      i.e. the DAIs have neither valid playback nor capture stream.
      
      It's quite surprising that this ever worked correctly,
      but in 5.7-rc1 this is now failing badly: :)
      
      Commit 0e9cf4c4 ("ASoC: pcm: check if cpu-dai supports a given stream")
      introduced a check for snd_soc_dai_stream_valid() before calling
      hw_params(), which means that the q6i2s_hw_params() function
      was never called, eventually resulting in:
      
          qcom-q6afe aprsvc:q6afe:4:4: no line is assigned
      
      ... even though "qcom,sd-lines" is set in the device tree.
      
      Commit 9b5db059 ("ASoC: soc-pcm: dpcm: Only allow playback/capture if supported")
      now even avoids creating PCM devices if the stream is not supported,
      which means that it is failing even earlier with e.g.:
      
          Primary MI2S: ASoC: no backend playback stream
      
      Avoid all that trouble by adding channels_min/max for the MI2S DAIs.
      
      Fixes: 24c4cbcf ("ASoC: qdsp6: q6afe: Add q6afe dai driver")
      Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
      Reviewed-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Link: https://lore.kernel.org/r/20200415150050.616392-1-stephan@gerhold.netSigned-off-by: default avatarMark Brown <broonie@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2b53a8ee
    • YueHaibing's avatar
      iio:ad7797: Use correct attribute_group · 55e889ea
      YueHaibing authored
      commit 28535877 upstream.
      
      It should use ad7797_attribute_group in ad7797_info,
      according to commit ("iio:ad7793: Add support for the ad7796 and ad7797").
      
      Scale is fixed for the ad7796 and not programmable, hence
      should not have the scale_available attribute.
      
      Fixes: fd1a8b91 ("iio:ad7793: Add support for the ad7796 and ad7797")
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Reviewed-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      55e889ea
    • Nathan Chancellor's avatar
      usb: gadget: udc: bdc: Remove unnecessary NULL checks in bdc_req_complete · bfde821e
      Nathan Chancellor authored
      commit 09b04abb upstream.
      
      When building with Clang + -Wtautological-pointer-compare:
      
      drivers/usb/gadget/udc/bdc/bdc_ep.c:543:28: warning: comparison of
      address of 'req->queue' equal to a null pointer is always false
      [-Wtautological-pointer-compare]
              if (req == NULL  || &req->queue == NULL || &req->usb_req == NULL)
                                   ~~~~~^~~~~    ~~~~
      drivers/usb/gadget/udc/bdc/bdc_ep.c:543:51: warning: comparison of
      address of 'req->usb_req' equal to a null pointer is always false
      [-Wtautological-pointer-compare]
              if (req == NULL  || &req->queue == NULL || &req->usb_req == NULL)
                                                          ~~~~~^~~~~~~    ~~~~
      2 warnings generated.
      
      As it notes, these statements will always evaluate to false so remove
      them.
      
      Fixes: efed421a ("usb: gadget: Add UDC driver for Broadcom USB3.0 device controller IP BDC")
      Link: https://github.com/ClangBuiltLinux/linux/issues/749Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bfde821e
    • Thinh Nguyen's avatar
      usb: dwc3: gadget: Do link recovery for SS and SSP · 074e6e41
      Thinh Nguyen authored
      commit d0550cd2 upstream.
      
      The controller always supports link recovery for device in SS and SSP.
      Remove the speed limit check. Also, when the device is in RESUME or
      RESET state, it means the controller received the resume/reset request.
      The driver must send the link recovery to acknowledge the request. They
      are valid states for the driver to send link recovery.
      
      Fixes: 72246da4 ("usb: Introduce DesignWare USB3 DRD Driver")
      Fixes: ee5cd41c ("usb: dwc3: Update speed checks for SuperSpeedPlus")
      Signed-off-by: default avatarThinh Nguyen <thinhn@synopsys.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      074e6e41
    • Tyler Hicks's avatar
      binder: take read mode of mmap_sem in binder_alloc_free_page() · b4b9073a
      Tyler Hicks authored
      commit 60d48857 upstream.
      
      Restore the behavior of locking mmap_sem for reading in
      binder_alloc_free_page(), as was first done in commit 3013bf62
      ("binder: reduce mmap_sem write-side lock"). That change was
      inadvertently reverted by commit 5cec2d2e ("binder: fix race between
      munmap() and direct reclaim").
      
      In addition, change the name of the label for the error path to
      accurately reflect that we're taking the lock for reading.
      
      Backporting note: This fix is only needed when *both* of the commits
      mentioned above are applied. That's an unlikely situation since they
      both landed during the development of v5.1 but only one of them is
      targeted for stable.
      
      Fixes: 5cec2d2e ("binder: fix race between munmap() and direct reclaim")
      Signed-off-by: default avatarTyler Hicks <tyhicks@canonical.com>
      Acked-by: default avatarTodd Kjos <tkjos@android.com>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b4b9073a
    • Christian Borntraeger's avatar
      include/uapi/linux/swab.h: fix userspace breakage, use __BITS_PER_LONG for swap · a52262b8
      Christian Borntraeger authored
      commit 467d12f5 upstream.
      
      QEMU has a funny new build error message when I use the upstream kernel
      headers:
      
            CC      block/file-posix.o
          In file included from /home/cborntra/REPOS/qemu/include/qemu/timer.h:4,
                           from /home/cborntra/REPOS/qemu/include/qemu/timed-average.h:29,
                           from /home/cborntra/REPOS/qemu/include/block/accounting.h:28,
                           from /home/cborntra/REPOS/qemu/include/block/block_int.h:27,
                           from /home/cborntra/REPOS/qemu/block/file-posix.c:30:
          /usr/include/linux/swab.h: In function `__swab':
          /home/cborntra/REPOS/qemu/include/qemu/bitops.h:20:34: error: "sizeof" is not defined, evaluates to 0 [-Werror=undef]
             20 | #define BITS_PER_LONG           (sizeof (unsigned long) * BITS_PER_BYTE)
                |                                  ^~~~~~
          /home/cborntra/REPOS/qemu/include/qemu/bitops.h:20:41: error: missing binary operator before token "("
             20 | #define BITS_PER_LONG           (sizeof (unsigned long) * BITS_PER_BYTE)
                |                                         ^
          cc1: all warnings being treated as errors
          make: *** [/home/cborntra/REPOS/qemu/rules.mak:69: block/file-posix.o] Error 1
          rm tests/qemu-iotests/socket_scm_helper.o
      
      This was triggered by commit d5767057 ("uapi: rename ext2_swab() to
      swab() and share globally in swab.h").  That patch is doing
      
        #include <asm/bitsperlong.h>
      
      but it uses BITS_PER_LONG.
      
      The kernel file asm/bitsperlong.h provide only __BITS_PER_LONG.
      
      Let us use the __ variant in swap.h
      
      Link: http://lkml.kernel.org/r/20200213142147.17604-1-borntraeger@de.ibm.com
      Fixes: d5767057 ("uapi: rename ext2_swab() to swab() and share globally in swab.h")
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      Cc: Yury Norov <yury.norov@gmail.com>
      Cc: Allison Randal <allison@lohutok.net>
      Cc: Joe Perches <joe@perches.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: William Breathitt Gray <vilhelm.gray@gmail.com>
      Cc: Torsten Hilbrich <torsten.hilbrich@secunet.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a52262b8
    • Liu Jian's avatar
      mtd: cfi: fix deadloop in cfi_cmdset_0002.c do_write_buffer · 2303321f
      Liu Jian authored
      commit d9b8a67b upstream.
      
      In function do_write_buffer(), in the for loop, there is a case
      chip_ready() returns 1 while chip_good() returns 0, so it never
      break the loop.
      To fix this, chip_good() is enough and it should timeout if it stay
      bad for a while.
      
      Fixes: dfeae107("mtd: cfi_cmdset_0002: Change write buffer to check correct value")
      Signed-off-by: default avatarYi Huaijie <yihuaijie@huawei.com>
      Signed-off-by: default avatarLiu Jian <liujian56@huawei.com>
      Reviewed-by: default avatarTokunori Ikegami <ikegami_to@yahoo.co.jp>
      Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2303321f
    • Clement Leger's avatar
      remoteproc: Fix wrong rvring index computation · 90fb92bb
      Clement Leger authored
      commit 00a0eec5 upstream.
      
      Index of rvring is computed using pointer arithmetic. However, since
      rvring->rvdev->vring is the base of the vring array, computation
      of rvring idx should be reversed. It previously lead to writing at negative
      indices in the resource table.
      Signed-off-by: default avatarClement Leger <cleger@kalray.eu>
      Link: https://lore.kernel.org/r/20191004073736.8327-1-cleger@kalray.euSigned-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
      Cc: Doug Anderson <dianders@chromium.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      90fb92bb
  2. 29 Apr, 2020 22 commits