Skip to content
  1. Aug 20, 2019
  2. Jul 08, 2019
  3. Jul 07, 2019
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20190706' of git://git.kernel.dk/linux-block · 46713c3d
      Linus Torvalds authored
      Pull block fix from Jens Axboe:
       "Just a single fix for a patch from Greg KH, which reportedly break
        block debugfs locations for certain setups. Trivial enough that I
        think we should include it now, rather than wait and release 5.2 with
        it, since it's a regression in this series"
      
      * tag 'for-linus-20190706' of git://git.kernel.dk/linux-block:
        blk-mq: fix up placement of debugfs directory of queue files
      46713c3d
    • Linus Torvalds's avatar
      Merge tag 'mips_fixes_5.2_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · bcc0e65f
      Linus Torvalds authored
      Pull MIPS fixes from Paul Burton:
       "A few more MIPS fixes:
      
         - Fix a silly typo in virt_addr_valid which led to completely bogus
           behavior (that happened to stop tripping up hardened usercopy
           despite being broken).
      
         - Fix UART parity setup on AR933x systems.
      
         - A build fix for non-Linux build machines.
      
         - Have the 'all' make target build DTBs, primarily to fit in with the
           behavior of scripts/package/builddeb.
      
         - Handle an execution hazard in TLB exceptions that use KScratch
           registers, which could inadvertently clobber the $1 register on
           some generally higher-end out-of-order CPUs.
      
         - A MAINTAINERS update to fix the path to the NAND driver for Ingenic
           systems"
      
      * tag 'mips_fixes_5.2_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MAINTAINERS: Correct path to moved files
        MIPS: Add missing EHB in mtc0 -> mfc0 sequence.
        MIPS: have "plain" make calls build dtbs for selected platforms
        MIPS: fix build on non-linux hosts
        MIPS: ath79: fix ar933x uart parity mode
        MIPS: Fix bounds check virt_addr_valid
      bcc0e65f
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-fix-5.2' of git://git.infradead.org/users/vkoul/slave-dma · 2692982b
      Linus Torvalds authored
      Pull dmaengine fixes from Vinod Koul:
      
       - bam_dma fix for completed descriptor count
      
       - fix for imx-sdma remove BD_INTR for channel0 and use-after-free on
         probe error path
      
       - endian bug fix in jz4780 IRQ handler
      
      * tag 'dmaengine-fix-5.2' of git://git.infradead.org/users/vkoul/slave-dma:
        dmaengine: qcom: bam_dma: Fix completed descriptors count
        dmaengine: imx-sdma: remove BD_INTR for channel0
        dmaengine: imx-sdma: fix use-after-free on probe error path
        dmaengine: jz4780: Fix an endian bug in IRQ handler
      2692982b
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 4f8b4909
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Two iscsi fixes.
      
        One for an oops in the client which can be triggered by the server
        authentication protocol and the other in the target code which causes
        data corruption"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: iscsi: set auth_protocol back to NULL if CHAP_A value is not supported
        scsi: target/iblock: Fix overrun in WRITE SAME emulation
      4f8b4909
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · ceacbc0e
      Linus Torvalds authored
      Pull vfs fixlet from Al Viro:
       "Fix bogus default y in Kconfig (VALIDATE_FS_PARSER)
      
        That thing should not be turned on by default, especially since it's
        not quiet in case it finds no problems. Geert has sent the obvious fix
        quite a few times, but it fell through the cracks"
      
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        fs: VALIDATE_FS_PARSER should default to n
      ceacbc0e
    • Greg Kroah-Hartman's avatar
      blk-mq: fix up placement of debugfs directory of queue files · 7e41c3c9
      Greg Kroah-Hartman authored
      When the blk-mq debugfs file creation logic was "cleaned up" it was
      cleaned up too much, causing the queue file to not be created in the
      correct location.  Turns out the check for the directory being present
      is needed as if that has not happened yet, the files should not be
      created, and the function will be called later on in the initialization
      code so that the files can be created in the correct location.
      
      Fixes: 6cfc0081
      
       ("blk-mq: no need to check return value of debugfs_create functions")
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Cc: linux-block@vger.kernel.org
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      7e41c3c9
  4. Jul 06, 2019
    • Linus Torvalds's avatar
      Revert "mm: page cache: store only head pages in i_pages" · 69bf4b6b
      Linus Torvalds authored
      This reverts commit 5fd4ca2d
      
      .
      
      Mikhail Gavrilov reports that it causes the VM_BUG_ON_PAGE() in
      __delete_from_swap_cache() to trigger:
      
         page:ffffd6d34dff0000 refcount:1 mapcount:1 mapping:ffff97812323a689 index:0xfecec363
         anon
         flags: 0x17fffe00080034(uptodate|lru|active|swapbacked)
         raw: 0017fffe00080034 ffffd6d34c67c508 ffffd6d3504b8d48 ffff97812323a689
         raw: 00000000fecec363 0000000000000000 0000000100000000 ffff978433ace000
         page dumped because: VM_BUG_ON_PAGE(entry != page)
         page->mem_cgroup:ffff978433ace000
         ------------[ cut here ]------------
         kernel BUG at mm/swap_state.c:170!
         invalid opcode: 0000 [#1] SMP NOPTI
         CPU: 1 PID: 221 Comm: kswapd0 Not tainted 5.2.0-0.rc2.git0.1.fc31.x86_64 #1
         Hardware name: System manufacturer System Product Name/ROG STRIX X470-I GAMING, BIOS 2202 04/11/2019
         RIP: 0010:__delete_from_swap_cache+0x20d/0x240
         Code: 30 65 48 33 04 25 28 00 00 00 75 4a 48 83 c4 38 5b 5d 41 5c 41 5d 41 5e 41 5f c3 48 c7 c6 2f dc 0f 8a 48 89 c7 e8 93 1b fd ff <0f> 0b 48 c7 c6 a8 74 0f 8a e8 85 1b fd ff 0f 0b 48 c7 c6 a8 7d 0f
         RSP: 0018:ffffa982036e7980 EFLAGS: 00010046
         RAX: 0000000000000021 RBX: 0000000000000040 RCX: 0000000000000006
         RDX: 0000000000000000 RSI: 0000000000000086 RDI: ffff97843d657900
         RBP: 0000000000000001 R08: ffffa982036e7835 R09: 0000000000000535
         R10: ffff97845e21a46c R11: ffffa982036e7835 R12: ffff978426387120
         R13: 0000000000000000 R14: ffffd6d34dff0040 R15: ffffd6d34dff0000
         FS:  0000000000000000(0000) GS:ffff97843d640000(0000) knlGS:0000000000000000
         CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
         CR2: 00002cba88ef5000 CR3: 000000078a97c000 CR4: 00000000003406e0
         Call Trace:
          delete_from_swap_cache+0x46/0xa0
          try_to_free_swap+0xbc/0x110
          swap_writepage+0x13/0x70
          pageout.isra.0+0x13c/0x350
          shrink_page_list+0xc14/0xdf0
          shrink_inactive_list+0x1e5/0x3c0
          shrink_node_memcg+0x202/0x760
          shrink_node+0xe0/0x470
          balance_pgdat+0x2d1/0x510
          kswapd+0x220/0x420
          kthread+0xfb/0x130
          ret_from_fork+0x22/0x40
      
      and it's not immediately obvious why it happens.  It's too late in the
      rc cycle to do anything but revert for now.
      
      Link: https://lore.kernel.org/lkml/CABXGCsN9mYmBD-4GaaeW_NrDu+FDXLzr_6x+XNxfmFV6QkYCDg@mail.gmail.com/
      Reported-and-bisected-by: default avatarMikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
      Suggested-by: default avatarJan Kara <jack@suse.cz>
      Cc: Michal Hocko <mhocko@kernel.org>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Kirill Shutemov <kirill@shutemov.name>
      Cc: William Kucharski <william.kucharski@oracle.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      69bf4b6b
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 9fdb86c8
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
       "x86 bugfix patches and one compilation fix for ARM"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: arm64/sve: Fix vq_present() macro to yield a bool
        KVM: LAPIC: Fix pending interrupt in IRR blocked by software disable LAPIC
        KVM: nVMX: Change KVM_STATE_NESTED_EVMCS to signal vmcs12 is copied from eVMCS
        KVM: nVMX: Allow restore nested-state to enable eVMCS when vCPU in SMM
        KVM: x86: degrade WARN to pr_warn_ratelimited
      9fdb86c8
    • Linus Torvalds's avatar
      Merge tag 'mtd/fixes-for-5.2-final' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux · 0e63665a
      Linus Torvalds authored
      Pull mtf fixes from Miquel Raynal:
      
       - Fix the memory organization structure of a Macronix SPI-NAND chip.
      
       - Fix a build dependency wrongly described.
      
       - Fix the sunxi NAND driver for A23/A33 SoCs by (a) reverting the
         faulty commit introducing broken DMA support and (b) applying another
         commit bringing working DMA support.
      
      * tag 'mtd/fixes-for-5.2-final' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
        mtd: rawnand: sunxi: Add A23/A33 DMA support with extra MBUS configuration
        Revert "mtd: rawnand: sunxi: Add A23/A33 DMA support"
        mtd: rawnand: ingenic: Fix ingenic_ecc dependency
        mtd: spinand: Fix max_bad_eraseblocks_per_lun info in memorg
      0e63665a
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 881ed91f
      Linus Torvalds authored
      Pull i2c fixlet from Wolfram Sang:
       "I2C has a MAINTAINERS update which will be benfitial for developers,
        so let's add it right away"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: tegra: Add Dmitry as a reviewer
      881ed91f
    • Linus Torvalds's avatar
      Merge tag 'nfsd-5.2-2' of git://linux-nfs.org/~bfields/linux · a8f46b5a
      Linus Torvalds authored
      Pull nfsd fixes from Bruce Fields:
       "Two more quick bugfixes for nfsd: fixing a regression causing mount
        failures on high-memory machines and fixing the DRC over RDMA"
      
      * tag 'nfsd-5.2-2' of git://linux-nfs.org/~bfields/linux:
        nfsd: Fix overflow causing non-working mounts on 1 TB machines
        svcrdma: Ignore source port when computing DRC hash
      a8f46b5a
    • Miquel Raynal's avatar
      mtd: rawnand: sunxi: Add A23/A33 DMA support with extra MBUS configuration · c7a87ceb
      Miquel Raynal authored
      Allwinner NAND controllers can make use of DMA to enhance the I/O
      throughput thanks to ECC pipelining. DMA handling with A23/A33 NAND IP
      is a bit different than with the older SoCs, hence the introduction of
      a new compatible to handle:
      * the differences between register offsets,
      * the burst length change from 4 to minimum 8,
      * manage SRAM accesses through MBUS with extra configuration.
      
      Fixes: c49836f0
      
       ("mtd: rawnand: sunxi: Add A23/A33 DMA support")
      Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
      c7a87ceb
    • Miquel Raynal's avatar
      Revert "mtd: rawnand: sunxi: Add A23/A33 DMA support" · 4f032640
      Miquel Raynal authored
      This reverts commit c49836f0.
      
      The commit is wrong and its approach actually does not work. Let's
      revert it in order to add the feature with a clean patch.
      
      Fixes: c49836f0
      
       ("mtd: rawnand: sunxi: Add A23/A33 DMA support")
      Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
      4f032640
    • Dmitry Osipenko's avatar
      i2c: tegra: Add Dmitry as a reviewer · f3a3ea28
      Dmitry Osipenko authored
      
      
      I'm contributing to Tegra's upstream development in general and happened
      to review the Tegra's I2C patches for awhile because I'm actively using
      upstream kernel on all of my Tegra-powered devices and initially some of
      the submitted patches were getting my attention since they were causing
      problems. Recently Wolfram Sang asked whether I'm interested in becoming
      a reviewer for the driver and I don't mind at all.
      
      Signed-off-by: default avatarDmitry Osipenko <digetx@gmail.com>
      [wsa: ack was expressed by Thierry Reding in a mail thread]
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      f3a3ea28
  5. Jul 05, 2019
    • Geert Uytterhoeven's avatar
      fs: VALIDATE_FS_PARSER should default to n · 75f2d86b
      Geert Uytterhoeven authored
      CONFIG_VALIDATE_FS_PARSER is a debugging tool to check that the parser
      tables are vaguely sane.  It was set to default to 'Y' for the moment to
      catch errors in upcoming fs conversion development.
      
      Make sure it is not enabled by default in the final release of v5.1.
      
      Fixes: 31d921c7
      
       ("vfs: Add configuration parser helpers")
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      75f2d86b
    • Zhang Lei's avatar
      KVM: arm64/sve: Fix vq_present() macro to yield a bool · e644fa18
      Zhang Lei authored
      The original implementation of vq_present() relied on aggressive
      inlining in order for the compiler to know that the code is
      correct, due to some const-casting issues.  This was causing sparse
      and clang to complain, while GCC compiled cleanly.
      
      Commit 0c529ff7
      
       addressed this problem, but since vq_present()
      is no longer a function, there is now no implicit casting of the
      returned value to the return type (bool).
      
      In set_sve_vls(), this uncast bit value is compared against a bool,
      and so may spuriously compare as unequal when both are nonzero.  As
      a result, KVM may reject valid SVE vector length configurations as
      invalid, and vice versa.
      
      Fix it by forcing the returned value to a bool.
      
      Signed-off-by: default avatarZhang Lei <zhang.lei@jp.fujitsu.com>
      Fixes: 0c529ff7
      
       ("KVM: arm64: Implement vq_present() as a macro")
      Signed-off-by: Dave Martin <Dave.Martin@arm.com> [commit message rewrite]
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      e644fa18
    • Sricharan R's avatar
      dmaengine: qcom: bam_dma: Fix completed descriptors count · f6034225
      Sricharan R authored
      
      
      One space is left unused in circular FIFO to differentiate
      'full' and 'empty' cases. So take that in to account while
      counting for the descriptors completed.
      
      Fixes the issue reported here,
      	https://lkml.org/lkml/2019/6/18/669
      
      Cc: stable@vger.kernel.org
      Reported-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Signed-off-by: default avatarSricharan R <sricharan@codeaurora.org>
      Tested-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      f6034225
    • Robin Gong's avatar
      dmaengine: imx-sdma: remove BD_INTR for channel0 · 3f93a4f2
      Robin Gong authored
      It is possible for an irq triggered by channel0 to be received later
      after clks are disabled once firmware loaded during sdma probe. If
      that happens then clearing them by writing to SDMA_H_INTR won't work
      and the kernel will hang processing infinite interrupts. Actually,
      don't need interrupt triggered on channel0 since it's pollling
      SDMA_H_STATSTOP to know channel0 done rather than interrupt in
      current code, just clear BD_INTR to disable channel0 interrupt to
      avoid the above case.
      This issue was brought by commit 1d069bfa ("dmaengine: imx-sdma:
      ack channel 0 IRQ in the interrupt handler") which didn't take care
      the above case.
      
      Fixes: 1d069bfa
      
       ("dmaengine: imx-sdma: ack channel 0 IRQ in the interrupt handler")
      Cc: stable@vger.kernel.org #5.0+
      Signed-off-by: default avatarRobin Gong <yibin.gong@nxp.com>
      Reported-by: default avatarSven Van Asbroeck <thesven73@gmail.com>
      Tested-by: default avatarSven Van Asbroeck <thesven73@gmail.com>
      Reviewed-by: default avatarMichael Olbrich <m.olbrich@pengutronix.de>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      3f93a4f2
    • Sven Van Asbroeck's avatar
      dmaengine: imx-sdma: fix use-after-free on probe error path · 2b8066c3
      Sven Van Asbroeck authored
      
      
      If probe() fails anywhere beyond the point where
      sdma_get_firmware() is called, then a kernel oops may occur.
      
      Problematic sequence of events:
      1. probe() calls sdma_get_firmware(), which schedules the
         firmware callback to run when firmware becomes available,
         using the sdma instance structure as the context
      2. probe() encounters an error, which deallocates the
         sdma instance structure
      3. firmware becomes available, firmware callback is
         called with deallocated sdma instance structure
      4. use after free - kernel oops !
      
      Solution: only attempt to load firmware when we're certain
      that probe() will succeed. This guarantees that the firmware
      callback's context will remain valid.
      
      Note that the remove() path is unaffected by this issue: the
      firmware loader will increment the driver module's use count,
      ensuring that the module cannot be unloaded while the
      firmware callback is pending or running.
      
      Signed-off-by: default avatarSven Van Asbroeck <TheSven73@gmail.com>
      Reviewed-by: default avatarRobin Gong <yibin.gong@nxp.com>
      [vkoul: fixed braces for if condition]
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      2b8066c3
    • Dan Carpenter's avatar
      dmaengine: jz4780: Fix an endian bug in IRQ handler · 4c89cc73
      Dan Carpenter authored
      The "pending" variable was a u32 but we cast it to an unsigned long
      pointer when we do the for_each_set_bit() loop.  The problem is that on
      big endian 64bit systems that results in an out of bounds read.
      
      Fixes: 4e4106f5
      
       ("dmaengine: jz4780: Fix transfers being ACKed too soon")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      4c89cc73
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2019-07-05-1' of git://anongit.freedesktop.org/drm/drm · 3f9c4dc6
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "I skipped last week because there wasn't much worth doing, this week
        got a few more fixes in.
      
        amdgpu:
         - default register value change
         - runpm regression fix
         - fan control fix
      
        i915:
         - fix Ironlake regression
      
        panfrost:
         - fix a double free
      
        virtio:
         - fix a locking bug
      
        imx:
         - crtc disable fixes"
      
      * tag 'drm-fixes-2019-07-05-1' of git://anongit.freedesktop.org/drm/drm:
        drm/imx: only send event on crtc disable if kept disabled
        drm/imx: notify drm core before sending event during crtc disable
        drm/i915/ringbuffer: EMIT_INVALIDATE *before* switch context
        drm/amdgpu/gfx9: use reset default for PA_SC_FIFO_SIZE
        drm/amdgpu: Don't skip display settings in hwmgr_resume()
        drm/amd/powerplay: use hardware fan control if no powerplay fan table
        drm/panfrost: Fix a double-free error
        drm/etnaviv: add missing failure path to destroy suballoc
        drm/virtio: move drm_connector_update_edid_property() call
      3f9c4dc6
    • Dave Airlie's avatar
      Merge tag 'imx-drm-fixes-2019-07-04' of git://git.pengutronix.de/git/pza/linux into drm-fixes · a0b2cf79
      Dave Airlie authored
      
      
      drm/imx: fix stale vblank timestamp after a modeset
      
      This series fixes stale vblank timestamps in the first event sent after
      a crtc was disabled. The core now is notified via drm_crtc_vblank_off
      before sending the last pending event in atomic_disable. If the crtc is
      reenabled right away during to a modeset, the event is not sent at all,
      as the next vblank will take care of it.
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Philipp Zabel <p.zabel@pengutronix.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/1562237119.6641.16.camel@pengutronix.de
      a0b2cf79
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · ee39d46d
      Linus Torvalds authored
      Pull crypto fixes from Herbert Xu:
       "This fixes two memory leaks and a list corruption bug"
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: user - prevent operating on larval algorithms
        crypto: cryptd - Fix skcipher instance memory leak
        lib/mpi: Fix karactx leak in mpi_powm
      ee39d46d
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · a5fff14a
      Linus Torvalds authored
      Merge more fixes from Andrew Morton:
       "5 fixes"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        swap_readpage(): avoid blk_wake_io_task() if !synchronous
        devres: allow const resource arguments
        mm/vmscan.c: prevent useless kswapd loops
        fs/userfaultfd.c: disable irqs for fault_pending and event locks
        mm/page_alloc.c: fix regression with deferred struct page init
      a5fff14a
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · ecbe5086
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "Likely our final small batch of fixes for 5.2:
      
         - Some fixes for USB on davinci, regressions were due to the recent
           conversion of the OCHI driver to use GPIO regulators
      
         - A fixup of kconfig dependencies for a TI irq controller
      
         - A switch of armada-38x to avoid dropped characters on uart, caused
           by switch of base inherited platform description earlier this year"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        ARM: davinci: da830-evm: fix GPIO lookup for OHCI
        ARM: davinci: omapl138-hawk: add missing regulator constraints for OHCI
        ARM: davinci: da830-evm: add missing regulator constraints for OHCI
        soc: ti: fix irq-ti-sci link error
        ARM: dts: armada-xp-98dx3236: Switch to armada-38x-uart serial node
      ecbe5086
    • Linus Torvalds's avatar
      Merge tag 'dax-fix-5.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · cde357c3
      Linus Torvalds authored
      Pull dax fix from Dan Williams:
       "A single dax fix that has been soaking awaiting other fixes under
        discussion to join it. As it is getting late in the cycle lets proceed
        with this fix and save follow-on changes for post-v5.3-rc1.
      
         - Fix xarray entry association for mixed mappings"
      
      * tag 'dax-fix-5.2-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        dax: Fix xarray entry association for mixed mappings
      cde357c3
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 2cd7cdc7
      Linus Torvalds authored
      Pull do_move_mount() fix from Al Viro:
       "Regression fix"
      
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        vfs: move_mount: reject moving kernel internal mounts
      2cd7cdc7
    • Oleg Nesterov's avatar
      swap_readpage(): avoid blk_wake_io_task() if !synchronous · 87518530
      Oleg Nesterov authored
      swap_readpage() sets waiter = bio->bi_private even if synchronous = F,
      this means that the caller can get the spurious wakeup after return.
      
      This can be fatal if blk_wake_io_task() does
      set_current_state(TASK_RUNNING) after the caller does
      set_special_state(), in the worst case the kernel can crash in
      do_task_dead().
      
      Link: http://lkml.kernel.org/r/20190704160301.GA5956@redhat.com
      Fixes: 0619317f
      
       ("block: add polled wakeup task helper")
      Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
      Reported-by: default avatarQian Cai <cai@lca.pw>
      Acked-by: default avatarHugh Dickins <hughd@google.com>
      Reviewed-by: default avatarJens Axboe <axboe@kernel.dk>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      87518530
    • Arnd Bergmann's avatar
      devres: allow const resource arguments · eef778c9
      Arnd Bergmann authored
      
      
      devm_ioremap_resource() does not currently take 'const' arguments, which
      results in a warning from the first driver trying to do it anyway:
      
        drivers/gpio/gpio-amd-fch.c: In function 'amd_fch_gpio_probe':
        drivers/gpio/gpio-amd-fch.c:171:49: error: passing argument 2 of 'devm_ioremap_resource' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
          priv->base = devm_ioremap_resource(&pdev->dev, &amd_fch_gpio_iores);
                                                         ^~~~~~~~~~~~~~~~~~~
      
      Change the prototype to allow it, as there is no real reason not to.
      
      Link: http://lkml.kernel.org/r/20190628150049.1108048-1-arnd@arndb.de
      Fixes: 9bb2e0452508 ("gpio: amd: Make resource struct const")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Reviewed-by: default avatarEnrico Weigelt <info@metux.net>
      Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
      Cc: Ulf Hansson <ulf.hansson@linaro.org>
      Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
      Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      eef778c9
    • Shakeel Butt's avatar
      mm/vmscan.c: prevent useless kswapd loops · dffcac2c
      Shakeel Butt authored
      In production we have noticed hard lockups on large machines running
      large jobs due to kswaps hoarding lru lock within isolate_lru_pages when
      sc->reclaim_idx is 0 which is a small zone.  The lru was couple hundred
      GiBs and the condition (page_zonenum(page) > sc->reclaim_idx) in
      isolate_lru_pages() was basically skipping GiBs of pages while holding
      the LRU spinlock with interrupt disabled.
      
      On further inspection, it seems like there are two issues:
      
      (1) If kswapd on the return from balance_pgdat() could not sleep (i.e.
          node is still unbalanced), the classzone_idx is unintentionally set
          to 0 and the whole reclaim cycle of kswapd will try to reclaim only
          the lowest and smallest zone while traversing the whole memory.
      
      (2) Fundamentally isolate_lru_pages() is really bad when the
          allocation has woken kswapd for a smaller zone on a very large machine
          running very large jobs.  It can hoard the LRU spinlock while skipping
          over 100s of GiBs of pages.
      
      This patch only fixes (1).  (2) needs a more fundamental solution.  To
      fix (1), in the kswapd context, if pgdat->kswapd_classzone_idx is
      invalid use the classzone_idx of the previous kswapd loop otherwise use
      the one the waker has requested.
      
      Link: http://lkml.kernel.org/r/20190701201847.251028-1-shakeelb@google.com
      Fixes: e716f2eb
      
       ("mm, vmscan: prevent kswapd sleeping prematurely due to mismatched classzone_idx")
      Signed-off-by: default avatarShakeel Butt <shakeelb@google.com>
      Reviewed-by: default avatarYang Shi <yang.shi@linux.alibaba.com>
      Acked-by: default avatarMel Gorman <mgorman@techsingularity.net>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: Hillf Danton <hdanton@sina.com>
      Cc: Roman Gushchin <guro@fb.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      dffcac2c
    • Eric Biggers's avatar
      fs/userfaultfd.c: disable irqs for fault_pending and event locks · cbcfa130
      Eric Biggers authored
      When IOCB_CMD_POLL is used on a userfaultfd, aio_poll() disables IRQs
      and takes kioctx::ctx_lock, then userfaultfd_ctx::fd_wqh.lock.
      
      This may have to wait for userfaultfd_ctx::fd_wqh.lock to be released by
      userfaultfd_ctx_read(), which in turn can be waiting for
      userfaultfd_ctx::fault_pending_wqh.lock or
      userfaultfd_ctx::event_wqh.lock.
      
      But elsewhere the fault_pending_wqh and event_wqh locks are taken with
      IRQs enabled.  Since the IRQ handler may take kioctx::ctx_lock, lockdep
      reports that a deadlock is possible.
      
      Fix it by always disabling IRQs when taking the fault_pending_wqh and
      event_wqh locks.
      
      Commit ae62c16e ("userfaultfd: disable irqs when taking the
      waitqueue lock") didn't fix this because it only accounted for the
      fd_wqh lock, not the other locks nested inside it.
      
      Link: http://lkml.kernel.org/r/20190627075004.21259-1-ebiggers@kernel.org
      Fixes: bfe4037e
      
       ("aio: implement IOCB_CMD_POLL")
      Signed-off-by: default avatarEric Biggers <ebiggers@google.com>
      Reported-by: default avatar <syzbot+fab6de82892b6b9c6191@syzkaller.appspotmail.com>
      Reported-by: default avatar <syzbot+53c0b767f7ca0dc0c451@syzkaller.appspotmail.com>
      Reported-by: default avatar <syzbot+a3accb352f9c22041cfa@syzkaller.appspotmail.com>
      Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: <stable@vger.kernel.org>	[4.19+]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cbcfa130
    • Juergen Gross's avatar
      mm/page_alloc.c: fix regression with deferred struct page init · b9705d87
      Juergen Gross authored
      Commit 0e56acae ("mm: initialize MAX_ORDER_NR_PAGES at a time
      instead of doing larger sections") is causing a regression on some
      systems when the kernel is booted as Xen dom0.
      
      The system will just hang in early boot.
      
      Reason is an endless loop in get_page_from_freelist() in case the first
      zone looked at has no free memory.  deferred_grow_zone() is always
      returning true due to the following code snipplet:
      
        /* If the zone is empty somebody else may have cleared out the zone */
        if (!deferred_init_mem_pfn_range_in_zone(&i, zone, &spfn, &epfn,
                                                 first_deferred_pfn)) {
                pgdat->first_deferred_pfn = ULONG_MAX;
                pgdat_resize_unlock(pgdat, &flags);
                return true;
        }
      
      This in turn results in the loop as get_page_from_freelist() is assuming
      forward progress can be made by doing some more struct page
      initialization.
      
      Link: http://lkml.kernel.org/r/20190620160821.4210-1-jgross@suse.com
      Fixes: 0e56acae
      
       ("mm: initialize MAX_ORDER_NR_PAGES at a time instead of doing larger sections")
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      Suggested-by: default avatarAlexander Duyck <alexander.h.duyck@linux.intel.com>
      Acked-by: default avatarAlexander Duyck <alexander.h.duyck@linux.intel.com>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Pavel Tatashin <pasha.tatashin@soleen.com>
      Cc: Mike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b9705d87
    • Linus Torvalds's avatar
      Merge tag 'sound-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · c212ddae
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Here are a collection of small fixes for:
      
         - A race with ASoC HD-audio registration
      
         - LINE6 usb-audio memory overwrite by malformed descriptor
      
         - FireWire MIDI handling
      
         - Missing cast for bit shifts in a few USB-audio quirks
      
         - The wrong function calls in minor OSS sequencer code paths
      
         - A couple of HD-audio quirks"
      
      * tag 'sound-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: line6: Fix write on zero-sized buffer
        ALSA: hda: Fix widget_mutex incomplete protection
        ALSA: firewire-lib/fireworks: fix miss detection of received MIDI messages
        ALSA: seq: fix incorrect order of dest_client/dest_ports arguments
        ALSA: hda/realtek - Change front mic location for Lenovo M710q
        ALSA: usb-audio: fix sign unintended sign extension on left shifts
        ALSA: hda/realtek: Add quirks for several Clevo notebook barebones
      c212ddae
    • Jann Horn's avatar
      ptrace: Fix ->ptracer_cred handling for PTRACE_TRACEME · 6994eefb
      Jann Horn authored
      Fix two issues:
      
      When called for PTRACE_TRACEME, ptrace_link() would obtain an RCU
      reference to the parent's objective credentials, then give that pointer
      to get_cred().  However, the object lifetime rules for things like
      struct cred do not permit unconditionally turning an RCU reference into
      a stable reference.
      
      PTRACE_TRACEME records the parent's credentials as if the parent was
      acting as the subject, but that's not the case.  If a malicious
      unprivileged child uses PTRACE_TRACEME and the parent is privileged, and
      at a later point, the parent process becomes attacker-controlled
      (because it drops privileges and calls execve()), the attacker ends up
      with control over two processes with a privileged ptrace relationship,
      which can be abused to ptrace a suid binary and obtain root privileges.
      
      Fix both of these by always recording the credentials of the process
      that is requesting the creation of the ptrace relationship:
      current_cred() can't change under us, and current is the proper subject
      for access control.
      
      This change is theoretically userspace-visible, but I am not aware of
      any code that it will actually break.
      
      Fixes: 64b875f7
      
       ("ptrace: Capture the ptracer's creds not PT_PTRACE_CAP")
      Signed-off-by: default avatarJann Horn <jannh@google.com>
      Acked-by: default avatarOleg Nesterov <oleg@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6994eefb
  6. Jul 04, 2019
    • Robert Beckett's avatar
      drm/imx: only send event on crtc disable if kept disabled · 5aeab2bf
      Robert Beckett authored
      The event will be sent as part of the vblank enable during the modeset
      if the crtc is not being kept disabled.
      
      Fixes: 5f2f9115
      
       ("drm/imx: atomic phase 3 step 1: Use atomic configuration")
      
      Signed-off-by: default avatarRobert Beckett <bob.beckett@collabora.com>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
      5aeab2bf
    • Robert Beckett's avatar
      drm/imx: notify drm core before sending event during crtc disable · 78c68e8f
      Robert Beckett authored
      Notify drm core before sending pending events during crtc disable.
      This fixes the first event after disable having an old stale timestamp
      by having drm_crtc_vblank_off update the timestamp to now.
      
      This was seen while debugging weston log message:
      Warning: computed repaint delay is insane: -8212 msec
      
      This occurred due to:
      1. driver starts up
      2. fbcon comes along and restores fbdev, enabling vblank
      3. vblank_disable_fn fires via timer disabling vblank, keeping vblank
      seq number and time set at current value
      (some time later)
      4. weston starts and does a modeset
      5. atomic commit disables crtc while it does the modeset
      6. ipu_crtc_atomic_disable sends vblank with old seq number and time
      
      Fixes: a4744786
      
       ("drm/imx: fix crtc vblank state regression")
      
      Signed-off-by: default avatarRobert Beckett <bob.beckett@collabora.com>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
      78c68e8f
    • Linus Torvalds's avatar
      Merge tag 'trace-v5.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 550d1f5b
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt:
       "This includes three fixes:
      
         - Fix a deadlock from a previous fix to keep module loading and
           function tracing text modifications from stepping on each other
           (this has a few patches to help document the issue in comments)
      
         - Fix a crash when the snapshot buffer gets out of sync with the main
           ring buffer
      
         - Fix a memory leak when reading the memory logs"
      
      * tag 'trace-v5.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        ftrace/x86: Anotate text_mutex split between ftrace_arch_code_modify_post_process() and ftrace_arch_code_modify_prepare()
        tracing/snapshot: Resize spare buffer if size changed
        tracing: Fix memory leak in tracing_err_log_open()
        ftrace/x86: Add a comment to why we take text_mutex in ftrace_arch_code_modify_prepare()
        ftrace/x86: Remove possible deadlock between register_kprobe() and ftrace_run_update_code()
      550d1f5b