1. 12 Sep, 2019 1 commit
  2. 22 Aug, 2019 2 commits
    • Tony Camuso's avatar
      ipmi: move message error checking to avoid deadlock · 38303521
      Tony Camuso authored
      V1->V2: in handle_one_rcv_msg, if data_size > 2, set requeue to zero and
              goto out instead of calling ipmi_free_msg.
              Kosuke Tatsukawa <tatsu@ab.jp.nec.com>
      
      In the source stack trace below, function set_need_watch tries to
      take out the same si_lock that was taken earlier by ipmi_thread.
      
      ipmi_thread() [drivers/char/ipmi/ipmi_si_intf.c:995]
       smi_event_handler() [drivers/char/ipmi/ipmi_si_intf.c:765]
        handle_transaction_done() [drivers/char/ipmi/ipmi_si_intf.c:555]
         deliver_recv_msg() [drivers/char/ipmi/ipmi_si_intf.c:283]
          ipmi_smi_msg_received() [drivers/char/ipmi/ipmi_msghandler.c:4503]
           intf_err_seq() [drivers/char/ipmi/ipmi_msghandler.c:1149]
            smi_remove_watch() [drivers/char/ipmi/ipmi_msghandler.c:999]
             set_need_watch() [drivers/char/ipmi/ipmi_si_intf.c:1066]
      
      Upstream commit e1891cff adds code to
      ipmi_smi_msg_received() to call smi_remove_watch() via intf_err_seq()
      and this seems to be causing the deadlock.
      
      commit e1891cff
      Author: Corey Minyard <cminyard@mvista.com>
      Date:   Wed Oct 24 15:17:04 2018 -0500
          ipmi: Make the smi watcher be disabled immediately when not needed
      
      The fix is to put all messages in the queue and move the message
      checking code out of ipmi_smi_msg_received and into handle_one_recv_msg,
      which processes the message checking after ipmi_thread releases its
      locks.
      
      Additionally,Kosuke Tatsukawa <tatsu@ab.jp.nec.com> reported that
      handle_new_recv_msgs calls ipmi_free_msg when handle_one_rcv_msg returns
      zero, so that the call to ipmi_free_msg in handle_one_rcv_msg introduced
      another panic when "ipmitool sensor list" was run in a loop. He
      submitted this part of the patch.
      
      +free_msg:
      +               requeue = 0;
      +               goto out;
      
      Reported by: Osamu Samukawa <osa-samukawa@tg.jp.nec.com>
      Characterized by: Kosuke Tatsukawa <tatsu@ab.jp.nec.com>
      Signed-off-by: default avatarTony Camuso <tcamuso@redhat.com>
      Fixes: e1891cff ("ipmi: Make the smi watcher be disabled immediately when not needed")
      Cc: stable@vger.kernel.org # 5.1
      Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
      38303521
    • Kamlakant Patel's avatar
      ipmi_ssif: avoid registering duplicate ssif interface · c4436c91
      Kamlakant Patel authored
      It is possible that SSIF interface entry is present in both DMI and ACPI
      tables. In SMP systems, in such cases it is possible that ssif_probe could
      be called simultaneously from i2c interface (from ACPI) and from DMI on
      different CPUs at kernel boot. Both try to register same SSIF interface
      simultaneously and result in race.
      
      In such cases where ACPI and SMBIOS both IPMI entries are available, we
      need to prefer ACPI over SMBIOS so that ACPI functions work properly if
      they use IPMI.
      So, if we get an ACPI interface and have already registered an SMBIOS
      at the same address, we need to remove the SMBIOS one and add the ACPI.
      
      Log:
      [   38.774743] ipmi device interface
      [   38.805006] ipmi_ssif: IPMI SSIF Interface driver
      [   38.861979] ipmi_ssif i2c-IPI0001:06: ssif_probe CPU 99 ***
      [   38.863655] ipmi_ssif 0-000e: ssif_probe CPU 14 ***
      [   38.863658] ipmi_ssif: Trying SMBIOS-specified SSIF interface at i2c address 0xe, adapter xlp9xx-i2c, slave address 0x0
      [   38.869500] ipmi_ssif: Trying ACPI-specified SSIF interface at i2c address 0xe, adapter xlp9xx-i2c, slave address 0x0
      [   38.914530] ipmi_ssif: Unable to clear message flags: -22 7 c7
      [   38.952429] ipmi_ssif: Unable to clear message flags: -22 7 00
      [   38.994734] ipmi_ssif: Error getting global enables: -22 7 00
      [   39.015877] ipmi_ssif 0-000e: IPMI message handler: Found new BMC (man_id: 0x00b3d1, prod_id: 0x0001, dev_id: 0x20)
      [   39.377645] ipmi_ssif i2c-IPI0001:06: IPMI message handler: Found new BMC (man_id: 0x00b3d1, prod_id: 0x0001, dev_id: 0x20)
      [   39.387863] ipmi_ssif 0-000e: IPMI message handler: BMC returned incorrect response, expected netfn 7 cmd 42, got netfn 7 cmd 1
      ...
      [NOTE] : Added custom prints to explain the problem.
      
      In the above log, ssif_probe is executed simultaneously on two different
      CPUs.
      
      This patch fixes this issue in following way:
       - Adds ACPI entry also to the 'ssif_infos' list.
       - Checks the list if SMBIOS is already registered, removes it and adds
         ACPI.
       - If ACPI is already registered, it ignores SMBIOS.
       - Adds mutex lock throughout the probe process to avoid race.
      Signed-off-by: default avatarKamlakant Patel <kamlakantp@marvell.com>
      Message-Id: <1566389064-27356-1-git-send-email-kamlakantp@marvell.com>
      Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
      c4436c91
  3. 16 Aug, 2019 1 commit
  4. 05 Aug, 2019 1 commit
    • Corey Minyard's avatar
      ipmi_si: Only schedule continuously in the thread in maintenance mode · 340ff31a
      Corey Minyard authored
      ipmi_thread() uses back-to-back schedule() to poll for command
      completion which, on some machines, can push up CPU consumption and
      heavily tax the scheduler locks leading to noticeable overall
      performance degradation.
      
      This was originally added so firmware updates through IPMI would
      complete in a timely manner.  But we can't kill the scheduler
      locks for that one use case.
      
      Instead, only run schedule() continuously in maintenance mode,
      where firmware updates should run.
      Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
      340ff31a
  5. 02 Aug, 2019 3 commits
  6. 01 Aug, 2019 1 commit
  7. 31 Jul, 2019 9 commits
  8. 30 Jul, 2019 6 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20190730' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux · 629f8205
      Linus Torvalds authored
      Pull pidfd fixes from Christian Brauner:
       "This makes setting the exit_state in exit_notify() consistent after
        fixing the pidfd polling race pre-rc1. Related to the race fix, this
        adds a WARN_ON() to do_notify_pidfd() to catch any future exit_state
        races.
      
        Last, this removes an obsolete comment from the pidfd tests"
      
      * tag 'for-linus-20190730' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux:
        exit: make setting exit_state consistent
        pidfd: Add warning if exit_state is 0 during notification
        pidfd: remove obsolete comments from test
      629f8205
    • Linus Torvalds's avatar
      Merge tag 'f2fs-for-5.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs · 0572d766
      Linus Torvalds authored
      Pull f2fs fixes from Jaegeuk Kim:
       "This set of patches adjust to follow recent setflags changes and fix
        two regressions"
      
      * tag 'f2fs-for-5.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs:
        f2fs: use EINVAL for superblock with invalid magic
        f2fs: fix to read source block before invalidating it
        f2fs: remove redundant check from f2fs_setflags_common()
        f2fs: use generic checking function for FS_IOC_FSSETXATTR
        f2fs: use generic checking and prep function for FS_IOC_SETFLAGS
      0572d766
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-5.3-rc3' of... · 2f6f0a99
      Linus Torvalds authored
      Merge tag 'linux-kselftest-5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kselftest fixes from Shuah Khan:
       "Minor fixes to tests and one major fix to livepatch test to add skip
        handling to avoid false fail reports when livepatch is disabled"
      
      * tag 'linux-kselftest-5.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests/livepatch: add test skip handling
        selftests: mlxsw: Fix typo in qos_mc_aware.sh
        selftests/x86: fix spelling mistake "FAILT" -> "FAIL"
        selftests: kmod: Fix typo in kmod.sh
      2f6f0a99
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · 32a024b9
      Linus Torvalds authored
      Pull rdma fixes from Jason Gunthorpe:
       "A few regression and bug fixes for the patches merged in the last
        cycle:
      
         - hns fixes a subtle crash from the ib core SGL rework
      
         - hfi1 fixes various error handling, oops and protocol errors
      
         - bnxt_re fixes a regression where nvmeof doesn't work on some
           configurations
      
         - mlx5 fixes a serious 'use after free' bug in how MR caching is
           handled
      
         - some edge case crashers in the new statistic core code
      
         - more siw static checker fixups"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        IB/mlx5: Fix RSS Toeplitz setup to be aligned with the HW specification
        IB/counters: Always initialize the port counter object
        IB/core: Fix querying total rdma stats
        IB/mlx5: Prevent concurrent MR updates during invalidation
        IB/mlx5: Fix clean_mr() to work in the expected order
        IB/mlx5: Move MRs to a kernel PD when freeing them to the MR cache
        IB/mlx5: Use direct mkey destroy command upon UMR unreg failure
        IB/mlx5: Fix unreg_umr to ignore the mkey state
        RDMA/siw: Remove set but not used variables 'rv'
        IB/mlx5: Replace kfree with kvfree
        RDMA/bnxt_re: Honor vlan_id in GID entry comparison
        IB/hfi1: Drop all TID RDMA READ RESP packets after r_next_psn
        IB/hfi1: Field not zero-ed when allocating TID flow memory
        IB/hfi1: Unreserve a flushed OPFN request
        IB/hfi1: Check for error on call to alloc_rsm_map_table
        RDMA/hns: Fix sg offset non-zero issue
        RDMA/siw: Fix error return code in siw_init_module()
      32a024b9
    • Linus Torvalds's avatar
      Merge tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · 515f12b9
      Linus Torvalds authored
      Pull HMM fixes from Jason Gunthorpe:
       "Fix the locking around nouveau's use of the hmm_range_* APIs. It works
        correctly in the success case, but many of the the edge cases have
        missing unlocks or double unlocks.
      
        The diffstat is a bit big as Christoph did a comprehensive job to move
        the obsolete API from the core header and into the driver before
        fixing its flow, but the risk of regression from this code motion is
        low"
      
      * tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        nouveau: unlock mmap_sem on all errors from nouveau_range_fault
        nouveau: remove the block parameter to nouveau_range_fault
        mm/hmm: move hmm_vma_range_done and hmm_vma_fault to nouveau
        mm/hmm: always return EBUSY for invalid ranges in hmm_range_{fault,snapshot}
      515f12b9
    • Christian Brauner's avatar
      exit: make setting exit_state consistent · 30b692d3
      Christian Brauner authored
      Since commit b191d649 ("pidfd: fix a poll race when setting exit_state")
      we unconditionally set exit_state to EXIT_ZOMBIE before calling into
      do_notify_parent(). This was done to eliminate a race when querying
      exit_state in do_notify_pidfd().
      Back then we decided to do the absolute minimal thing to fix this and
      not touch the rest of the exit_notify() function where exit_state is
      set.
      Since this fix has not caused any issues change the setting of
      exit_state to EXIT_DEAD in the autoreap case to account for the fact hat
      exit_state is set to EXIT_ZOMBIE unconditionally. This fix was planned
      but also explicitly requested in [1] and makes the whole code more
      consistent.
      
      /* References */
      [1]: https://lore.kernel.org/lkml/CAHk-=wigcxGFR2szue4wavJtH5cYTTeNES=toUBVGsmX0rzX+g@mail.gmail.comSigned-off-by: default avatarChristian Brauner <christian@brauner.io>
      Acked-by: default avatarOleg Nesterov <oleg@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      30b692d3
  9. 29 Jul, 2019 7 commits
  10. 28 Jul, 2019 9 commits
    • Linus Torvalds's avatar
      Linux 5.3-rc2 · 609488bc
      Linus Torvalds authored
      609488bc
    • Linus Torvalds's avatar
      Merge tag 'meminit-v5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · c622fc5f
      Linus Torvalds authored
      Pull structleak fix from Kees Cook:
       "Disable gcc-based stack variable auto-init under KASAN (Arnd
        Bergmann).
      
        This fixes a bunch of build warnings under KASAN and the
        gcc-plugin-based stack auto-initialization features (which are
        arguably redundant, so better to let KASAN control this)"
      
      * tag 'meminit-v5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        structleak: disable STRUCTLEAK_BYREF in combination with KASAN_STACK
      c622fc5f
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v5.3' of... · 8e61ea11
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - add compile_commands.json to .gitignore
      
       - fix false-positive warning from gen_compile_commands.py after
         allnoconfig build
      
       - remove unused code
      
      * tag 'kbuild-fixes-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        kbuild: remove unused single-used-m
        gen_compile_commands: lower the entry count threshold
        .gitignore: Add compilation database file
        kbuild: remove unused objectify macro
      8e61ea11
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 04ce9318
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are some small char and misc driver fixes for 5.3-rc2 to resolve
        some reported issues.
      
        Nothing major at all, some binder bugfixes for issues found, some new
        mei device ids, firmware building warning fixes, habanalabs fixes, a
        few other build fixes, and a MAINTAINERS update.
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'char-misc-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        test_firmware: fix a memory leak bug
        hpet: Fix division by zero in hpet_time_div()
        eeprom: make older eeprom drivers select NVMEM_SYSFS
        vmw_balloon: Remove Julien from the maintainers list
        fpga-manager: altera-ps-spi: Fix build error
        mei: me: add mule creek canyon (EHL) device ids
        binder: prevent transactions to context manager from its own process.
        binder: Set end of SG buffer area properly.
        firmware: Fix missing inline
        firmware: fix build errors in paged buffer handling code
        habanalabs: don't reset device when getting VRHOT
        habanalabs: use %pad for printing a dma_addr_t
      04ce9318
    • Linus Torvalds's avatar
      Merge tag 'tty-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 572782b2
      Linus Torvalds authored
      Pull tty fixes from Greg KH:
       "Here are two tty/vt fixes:
      
         - delete the netx-serial driver as the arch has been removed, no need
           to keep the serial driver for it around either.
      
         - vt console_lock fix to resolve a reported noisy warning at runtime
      
        Both of these have been in linux-next with no reported issues"
      
      * tag 'tty-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        vt: Grab console_lock around con_is_bound in show_bind
        tty: serial: netx: Delete driver
      572782b2
    • Linus Torvalds's avatar
      Merge tag 'spdx-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx · ad28fd1c
      Linus Torvalds authored
      Pull SPDX fixes from Greg KH:
       "Here are some small SPDX fixes for 5.3-rc2 for things that came in
        during the 5.3-rc1 merge window that we previously missed.
      
        Only three small patches here:
      
         - two uapi patches to resolve some SPDX tags that were not correct
      
         - fix an invalid SPDX tag in the iomap Makefile file
      
        All have been properly reviewed on the public mailing lists"
      
      * tag 'spdx-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx:
        iomap: fix Invalid License ID
        treewide: remove SPDX "WITH Linux-syscall-note" from kernel-space headers again
        treewide: add "WITH Linux-syscall-note" to SPDX tag of uapi headers
      ad28fd1c
    • Linus Torvalds's avatar
      Merge tag 'usb-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 29af915c
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some small fixes for 5.3-rc2. All of these resolve some
        reported issues, some more than others :)
      
        Included in here is:
      
         - xhci fix for an annoying issue with odd devices
      
         - reversion of some usb251xb patches that should not have been merged
      
         - usb pci quirk additions and fixups
      
         - usb storage fix
      
         - usb host controller error test fix
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'usb-5.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        xhci: Fix crash if scatter gather is used with Immediate Data Transfer (IDT).
        usb: usb251xb: Reallow swap-dx-lanes to apply to the upstream port
        Revert "usb: usb251xb: Add US port lanes inversion property"
        Revert "usb: usb251xb: Add US lanes inversion dts-bindings"
        usb: wusbcore: fix unbalanced get/put cluster_id
        usb/hcd: Fix a NULL vs IS_ERR() bug in usb_hcd_setup_local_mem()
        usb-storage: Add a limitation for blk_queue_max_hw_sectors()
        usb: pci-quirks: Minor cleanup for AMD PLL quirk
        usb: pci-quirks: Correct AMD PLL quirk detection
      29af915c
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · 5bb575bc
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "Here's the first batch of fixes for this release cycle.
      
        Main diffstat here is the re-deletion of netx. I messed up and most
        likely didn't remove the files from the index when I test-merged this
        and saw conflicts, and from there on out 'git rerere' remembered the
        mistake and I missed checking it. Here it's done again as expected.
      
        Besides that:
      
         - A defconfig refresh + enabling of new drivers for u8500
      
         - i.MX fixlets for i2c/SAI/pinmux
      
         - sleep.S build fix for Davinci
      
         - Broadcom devicetree build/warning fix"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        ARM: defconfig: u8500: Add new drivers
        ARM: defconfig: u8500: Refresh defconfig
        ARM: dts: bcm: bcm47094: add missing #cells for mdio-bus-mux
        ARM: davinci: fix sleep.S build error on ARMv4
        arm64: dts: imx8mq: fix SAI compatible
        arm64: dts: imx8mm: Correct SAI3 RXC/TXFS pin's mux option #1
        ARM: dts: imx6ul: fix clock frequency property name of I2C buses
        ARM: Delete netx a second time
        ARM: dts: imx7ulp: Fix usb-phy unit address format
      5bb575bc
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a9815a4f
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "A set of x86 fixes and functional updates:
      
         - Prevent stale huge I/O TLB mappings on 32bit. A long standing bug
           which got exposed by KPTI support for 32bit
      
         - Prevent bogus access_ok() warnings in arch_stack_walk_user()
      
         - Add display quirks for Lenovo devices which have height and width
           swapped
      
         - Add the missing CR2 fixup for 32 bit async pagefaults. Fallout of
           the CR2 bug fix series.
      
         - Unbreak handling of force enabled HPET by moving the 'is HPET
           counting' check back to the original place.
      
         - A more accurate check for running on a hypervisor platform in the
           MDS mitigation code. Not perfect, but more accurate than the
           previous one.
      
         - Update a stale and confusing comment vs. IRQ stacks"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/speculation/mds: Apply more accurate check on hypervisor platform
        x86/hpet: Undo the early counter is counting check
        x86/entry/32: Pass cr2 to do_async_page_fault()
        x86/irq/64: Update stale comment
        x86/sysfb_efi: Add quirks for some devices with swapped width and height
        x86/stacktrace: Prevent access_ok() warnings in arch_stack_walk_user()
        mm/vmalloc: Sync unmappings in __purge_vmap_area_lazy()
        x86/mm: Sync also unmappings in vmalloc_sync_all()
        x86/mm: Check for pfn instead of page in vmalloc_sync_one()
      a9815a4f