Skip to content
  1. Apr 16, 2019
  2. Apr 15, 2019
    • Sean Christopherson's avatar
      KVM: x86/mmu: Fix an inverted list_empty() check when zapping sptes · cfd32acf
      Sean Christopherson authored
      A recently introduced helper for handling zap vs. remote flush
      incorrectly bails early, effectively leaking defunct shadow pages.
      Manifests as a slab BUG when exiting KVM due to the shadow pages
      being alive when their associated cache is destroyed.
      
      ==========================================================================
      BUG kvm_mmu_page_header: Objects remaining in kvm_mmu_page_header on ...
      --------------------------------------------------------------------------
      Disabling lock debugging due to kernel taint
      INFO: Slab 0x00000000fc436387 objects=26 used=23 fp=0x00000000d023caee ...
      CPU: 6 PID: 4315 Comm: rmmod Tainted: G    B             5.1.0-rc2+ #19
      Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015
      Call Trace:
       dump_stack+0x46/0x5b
       slab_err+0xad/0xd0
       ? on_each_cpu_mask+0x3c/0x50
       ? ksm_migrate_page+0x60/0x60
       ? on_each_cpu_cond_mask+0x7c/0xa0
       ? __kmalloc+0x1ca/0x1e0
       __kmem_cache_shutdown+0x13a/0x310
       shutdown_cache+0xf/0x130
       kmem_cache_destroy+0x1d5/0x200
       kvm_mmu_module_exit+0xa/0x30 [kvm]
       kvm_arch_exit+0x45/0x60 [kvm]
       kvm_exit+0x6f/0x80 [kvm]
       vmx_exit+0x1a/0x50 [kvm_intel]
       __x64_sys_delete_module+0x153/0x1f0
       ? exit_to_usermode_loop+0x88/0xc0
       do_syscall_64+0x4f/0x100
       entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      Fixes: a2113634
      
       ("KVM: x86/mmu: Split remote_flush+zap case out of kvm_mmu_flush_or_zap()")
      Signed-off-by: default avatarSean Christopherson <sean.j.christopherson@intel.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      cfd32acf
  3. Apr 10, 2019
    • Brian Norris's avatar
      Bluetooth: btusb: request wake pin with NOAUTOEN · 771acc7e
      Brian Norris authored
      Badly-designed systems might have (for example) active-high wake pins
      that default to high (e.g., because of external pull ups) until they
      have an active firmware which starts driving it low.  This can cause an
      interrupt storm in the time between request_irq() and disable_irq().
      
      We don't support shared interrupts here, so let's just pre-configure the
      interrupt to avoid auto-enabling it.
      
      Fixes: fd913ef7 ("Bluetooth: btusb: Add out-of-band wakeup support")
      Fixes: 5364a0b4
      
       ("arm64: dts: rockchip: move QCA6174A wakeup pin into its USB node")
      Signed-off-by: default avatarBrian Norris <briannorris@chromium.org>
      Reviewed-by: default avatarMatthias Kaehlcke <mka@chromium.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      771acc7e
    • Linus Torvalds's avatar
      Merge tag 'mips_fixes_5.1_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · 0ee7fb36
      Linus Torvalds authored
      Pull MIPS fixes from Paul Burton:
       "A few minor MIPS fixes:
      
         - Provide struct pt_regs * from get_irq_regs() to kgdb_nmicallback()
           when handling an IPI triggered by kgdb_roundup_cpus(), matching the
           behavior of other architectures & resolving kgdb issues for SMP
           systems.
      
         - Defer a pointer dereference until after a NULL check in the
           irq_shutdown callback for SGI IP27 HUB interrupts.
      
         - A defconfig update for the MSCC Ocelot to enable some necessary
           drivers"
      
      * tag 'mips_fixes_5.1_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MIPS: generic: Add switchdev, pinctrl and fit to ocelot_defconfig
        MIPS: SGI-IP27: Fix use of unchecked pointer in shutdown_bridge_irq
        MIPS: KGDB: fix kgdb support for SMP platforms.
      0ee7fb36
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 972acfb4
      Linus Torvalds authored
      Pull misc fixes from Al Viro:
       "A few regression fixes from this cycle"
      
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        aio: use kmem_cache_free() instead of kfree()
        iov_iter: Fix build error without CONFIG_CRYPTO
        aio: Fix an error code in __io_submit_one()
      972acfb4
  4. Apr 09, 2019
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 869e3305
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Off by one and bounds checking fixes in NFC, from Dan Carpenter.
      
       2) There have been many weird regressions in r8169 since we turned ASPM
          support on, some are still not understood nor completely resolved.
          Let's turn this back off for now. From Heiner Kallweit.
      
       3) Signess fixes for ethtool speed value handling, from Michael
          Zhivich.
      
       4) Handle timestamps properly in macb driver, from Paul Thomas.
      
       5) Two erspan fixes, it's the usual "skb ->data potentially reallocated
          and we're holding a stale protocol header pointer". From Lorenzo
          Bianconi.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        bnxt_en: Reset device on RX buffer errors.
        bnxt_en: Improve RX consumer index validity check.
        net: macb driver, check for SKBTX_HW_TSTAMP
        qlogic: qlcnic: fix use of SPEED_UNKNOWN ethtool constant
        broadcom: tg3: fix use of SPEED_UNKNOWN ethtool constant
        ethtool: avoid signed-unsigned comparison in ethtool_validate_speed()
        net: ip6_gre: fix possible use-after-free in ip6erspan_rcv
        net: ip_gre: fix possible use-after-free in erspan_rcv
        r8169: disable ASPM again
        MAINTAINERS: ieee802154: update documentation file pattern
        net: vrf: Fix ping failed when vrf mtu is set to 0
        selftests: add a tc matchall test case
        nfc: nci: Potential off by one in ->pipes[] array
        NFC: nci: Add some bounds checking in nci_hci_cmd_received()
      869e3305
    • Linus Torvalds's avatar
      Merge branch 'fixes-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security · a556810d
      Linus Torvalds authored
      Pull TPM fixes from James Morris:
       "From Jarkko: These are critical fixes for v5.1. Contains also couple
        of new selftests for v5.1 features (partial reads in /dev/tpm0)"
      
      * 'fixes-v5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
        selftests/tpm2: Open tpm dev in unbuffered mode
        selftests/tpm2: Extend tests to cover partial reads
        KEYS: trusted: fix -Wvarags warning
        tpm: Fix the type of the return value in calc_tpm2_event_size()
        KEYS: trusted: allow trusted.ko to initialize w/o a TPM
        tpm: fix an invalid condition in tpm_common_poll
        tpm: turn on TPM on suspend for TPM 1.x
      a556810d
    • Linus Torvalds's avatar
      Merge tag 'xtensa-20190408' of git://github.com/jcmvbkbc/linux-xtensa · 10d43397
      Linus Torvalds authored
      Pull xtensa fixes from Max Filippov:
      
       - fix syscall number passed to trace_sys_exit
      
       - fix syscall number initialization in start_thread
      
       - fix level interpretation in the return_address
      
       - fix format string warning in init_pmd
      
      * tag 'xtensa-20190408' of git://github.com/jcmvbkbc/linux-xtensa:
        xtensa: fix format string warning in init_pmd
        xtensa: fix return_address
        xtensa: fix initialization of pt_regs::syscall in start_thread
        xtensa: use actual syscall number in do_syscall_trace_leave
      10d43397
    • David S. Miller's avatar
      Merge branch 'bnxt_en-fixes' · e063f459
      David S. Miller authored
      
      
      Michael Chan says:
      
      ====================
      bnxt_en: 2 bug fixes.
      
      The first patch prevents possible driver crash if we get a bad RX index
      from the hardware.  The second patch resets the device when the hardware
      reports buffer error to recover from the error.
      
      Please queue these for -stable also.  Thanks.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e063f459
    • Michael Chan's avatar
      bnxt_en: Reset device on RX buffer errors. · 8e44e96c
      Michael Chan authored
      If the RX completion indicates RX buffers errors, the RX ring will be
      disabled by firmware and no packets will be received on that ring from
      that point on.  Recover by resetting the device.
      
      Fixes: c0c050c5
      
       ("bnxt_en: New Broadcom ethernet driver.")
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8e44e96c
    • Michael Chan's avatar
      bnxt_en: Improve RX consumer index validity check. · a1b0e4e6
      Michael Chan authored
      There is logic to check that the RX/TPA consumer index is the expected
      index to work around a hardware problem.  However, the potentially bad
      consumer index is first used to index into an array to reference an entry.
      This can potentially crash if the bad consumer index is beyond legal
      range.  Improve the logic to use the consumer index for dereferencing
      after the validity check and log an error message.
      
      Fixes: fa7e2812
      
       ("bnxt_en: Add workaround to detect bad opaque in rx completion (part 2)")
      Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a1b0e4e6
    • Paul Thomas's avatar
      net: macb driver, check for SKBTX_HW_TSTAMP · a6252047
      Paul Thomas authored
      
      
      Make sure SKBTX_HW_TSTAMP (i.e. SOF_TIMESTAMPING_TX_HARDWARE) has been
      enabled for this skb. It does fix the issue where normal socks that
      aren't expecting a timestamp will not wake up on select, but when a
      user does want a SOF_TIMESTAMPING_TX_HARDWARE it does work.
      
      Signed-off-by: default avatarPaul Thomas <pthomas8589@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a6252047
    • David S. Miller's avatar
      Merge branch 'ethtool-fix-use-of-SPEED_UNKNOWN-constant' · 738de00c
      David S. Miller authored
      
      
      Michael Zhivich says:
      
      ====================
      ethtool: fix use of SPEED_UNKNOWN constant
      
      This patch series addresses 2 related issues:
      
      1. ethtool_validate_speed() triggers a "signed-unsigned comparison"
      warning due to type difference of SPEED_UNKNOWN constant (int)
      and argument to ethtool_validate_speed (__u32).
      
      2. some drivers use u16 storage for SPEED_UNKNOWN constant,
      resulting in value truncation and thus failure to test against
      SPEED_UNKNOWN correctly.
      
      This revised series addresses several feedback comments:
      - split up the patch in to series
      - do not unnecessarily change drivers that use "int" storage
        for speed values
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      738de00c
    • Michael Zhivich's avatar
      qlogic: qlcnic: fix use of SPEED_UNKNOWN ethtool constant · d63da85a
      Michael Zhivich authored
      
      
      qlcnic driver uses u16 to store SPEED_UKNOWN ethtool constant,
      which is defined as -1, resulting in value truncation and
      thus incorrect test results against SPEED_UNKNOWN.
      
      For example, the following test will print "False":
      
          u16 speed = SPEED_UNKNOWN;
      
          if (speed == SPEED_UNKNOWN)
              printf("True");
          else
              printf("False");
      
      Change storage of speed to use u32 to avoid this issue.
      
      Signed-off-by: default avatarMichael Zhivich <mzhivich@akamai.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d63da85a