1. 28 Dec, 2017 32 commits
  2. 17 Dec, 2017 4 commits
    • Jerry Hoemann's avatar
      watchdog: hpwdt: SMBIOS check · c42cbe41
      Jerry Hoemann authored
      This corrects:
      commit cce78da7 ("watchdog: hpwdt: Add check for UEFI bits")
      
      The test on HPE SMBIOS extension type 219 record "Misc Features"
      bits for UEFI support is incorrect.  The definition of the Misc Features
      bits in the HPE SMBIOS OEM Extensions specification (and related
      firmware) was changed to use a different pair of bits to
      represent UEFI supported.  Howerver, a corresponding change
      to Linux was missed.
      
      Current code/platform work because the iCRU test is working.
      But purpose of cce78da7 is to ensure correct functionality
      on future systems where iCRU isn't supported.
      Signed-off-by: default avatarJerry Hoemann <jerry.hoemann@hpe.com>
      Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      c42cbe41
    • Matt Redfearn's avatar
      watchdog: indydog: Add dependency on SGI_HAS_INDYDOG · 24f8d233
      Matt Redfearn authored
      Commit da2a68b3 ("watchdog: Enable COMPILE_TEST where possible")
      enabled building the Indy watchdog driver when COMPILE_TEST is enabled.
      However, the driver makes reference to symbols that are only defined for
      certain platforms are selected in the config. These platforms select
      SGI_HAS_INDYDOG. Without this, link time errors result, for example
      when building a MIPS allyesconfig.
      
      drivers/watchdog/indydog.o: In function `indydog_write':
      indydog.c:(.text+0x18): undefined reference to `sgimc'
      indydog.c:(.text+0x1c): undefined reference to `sgimc'
      drivers/watchdog/indydog.o: In function `indydog_start':
      indydog.c:(.text+0x54): undefined reference to `sgimc'
      indydog.c:(.text+0x58): undefined reference to `sgimc'
      drivers/watchdog/indydog.o: In function `indydog_stop':
      indydog.c:(.text+0xa4): undefined reference to `sgimc'
      drivers/watchdog/indydog.o:indydog.c:(.text+0xa8): more undefined
      references to `sgimc' follow
      make: *** [Makefile:1005: vmlinux] Error 1
      
      Fix this by ensuring that CONFIG_INDIDOG can only be selected when the
      necessary dependent platform symbols are built in.
      
      Fixes: da2a68b3 ("watchdog: Enable COMPILE_TEST where possible")
      Signed-off-by: default avatarMatt Redfearn <matt.redfearn@mips.com>
      Cc: <stable@vger.kernel.org> # 4.11 +
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      Suggested-by: default avatarJames Hogan <james.hogan@mips.com>
      Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      24f8d233
    • Guenter Roeck's avatar
      watchdog: Fix kref imbalance seen if handle_boot_enabled=0 · 914d65f3
      Guenter Roeck authored
      If handle_boot_enabled is set to 0, the watchdog driver module use
      counter will not be increased and kref_get() will not be called when
      registering the watchdog. Subsequently, on open, this does not happen
      either because the code believes that it was already done because the
      hardware watchdog is marked as running.
      
      We could introduce a state variable to indicate this state, but let's
      just increase the module use counter and call kref_get() unconditionally
      if the hardware watchdog is running when a driver is registering itself
      to keep the code simple.
      
      Fixes: 2501b015 ("watchdog: core: add option to avoid early ...")
      Cc: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      914d65f3
    • Guenter Roeck's avatar
      watchdog: Fix potential kref imbalance when opening watchdog · 4bcd615f
      Guenter Roeck authored
      If a watchdog driver's open function sets WDOG_HW_RUNNING with the
      expectation that the watchdog can not be stopped, but then stops the
      watchdog anyway in its stop function, kref_get() wil not be called in
      watchdog_open(). If the watchdog then stops on close, WDOG_HW_RUNNING
      will be cleared and kref_put() will be called, causing a kref imbalance.
      As result the character device data structure will be released, which in
      turn will cause the system to crash on the next call to watchdog_open().
      
      Fixes: ee142889 ("watchdog: Introduce WDOG_HW_RUNNING flag")
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      4bcd615f
  3. 16 Dec, 2017 4 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · f3b5ad89
      Linus Torvalds authored
      Pull rdma fixes from Jason Gunthorpe:
       "More fixes from testing done on the rc kernel, including more SELinux
        testing. Looking forward, lockdep found regression today in ipoib
        which is still being fixed.
      
        Summary:
      
         - Fix for SELinux on the umad SMI path. Some old hardware does not
           fill the PKey properly exposing another bug in the newer SELinux
           code.
      
         - Check the input port as we can exceed array bounds from this user
           supplied value
      
         - Users are unable to use the hash field support as they want due to
           incorrect checks on the field restrictions, correct that so the
           feature works as intended
      
         - User triggerable oops in the NETLINK_RDMA handler
      
         - cxgb4 driver fix for a bad interaction with CQ flushing in iser
           caused by patches in this merge window, and bad CQ flushing during
           normal close.
      
         - Unbalanced memalloc_noio in ipoib in an error path"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        IB/ipoib: Restore MM behavior in case of tx_ring allocation failure
        iw_cxgb4: only insert drain cqes if wq is flushed
        iw_cxgb4: only clear the ARMED bit if a notification is needed
        RDMA/netlink: Fix general protection fault
        IB/mlx4: Fix RSS hash fields restrictions
        IB/core: Don't enforce PKey security on SMI MADs
        IB/core: Bound check alternate path port number
      f3b5ad89
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · f25e2295
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "Two bugfixes for the AT24 I2C eeprom driver and some minor corrections
        for I2C bus drivers"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: piix4: Fix port number check on release
        i2c: stm32: Fix copyrights
        i2c-cht-wc: constify platform_device_id
        eeprom: at24: change nvmem stride to 1
        eeprom: at24: fix I2C device selection for runtime PM
      f25e2295
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-4.15-3' of git://git.linux-nfs.org/projects/anna/linux-nfs · d025fbf1
      Linus Torvalds authored
      Pull NFS client fixes from Anna Schumaker:
       "This has two stable bugfixes, one to fix a BUG_ON() when
        nfs_commit_inode() is called with no outstanding commit requests and
        another to fix a race in the SUNRPC receive codepath.
      
        Additionally, there are also fixes for an NFS client deadlock and an
        xprtrdma performance regression.
      
        Summary:
      
        Stable bugfixes:
         - NFS: Avoid a BUG_ON() in nfs_commit_inode() by not waiting for a
           commit in the case that there were no commit requests.
         - SUNRPC: Fix a race in the receive code path
      
        Other fixes:
         - NFS: Fix a deadlock in nfs client initialization
         - xprtrdma: Fix a performance regression for small IOs"
      
      * tag 'nfs-for-4.15-3' of git://git.linux-nfs.org/projects/anna/linux-nfs:
        SUNRPC: Fix a race in the receive code path
        nfs: don't wait on commit in nfs_commit_inode() if there were no commit requests
        xprtrdma: Spread reply processing over more CPUs
        nfs: fix a deadlock in nfs client initialization
      d025fbf1
    • Linus Torvalds's avatar
      Revert "mm: replace p??_write with pte_access_permitted in fault + gup paths" · f6f37321
      Linus Torvalds authored
      This reverts commits 5c9d2d5c, c7da82b8, and e7fe7b5c.
      
      We'll probably need to revisit this, but basically we should not
      complicate the get_user_pages_fast() case, and checking the actual page
      table protection key bits will require more care anyway, since the
      protection keys depend on the exact state of the VM in question.
      
      Particularly when doing a "remote" page lookup (ie in somebody elses VM,
      not your own), you need to be much more careful than this was.  Dave
      Hansen says:
      
       "So, the underlying bug here is that we now a get_user_pages_remote()
        and then go ahead and do the p*_access_permitted() checks against the
        current PKRU. This was introduced recently with the addition of the
        new p??_access_permitted() calls.
      
        We have checks in the VMA path for the "remote" gups and we avoid
        consulting PKRU for them. This got missed in the pkeys selftests
        because I did a ptrace read, but not a *write*. I also didn't
        explicitly test it against something where a COW needed to be done"
      
      It's also not entirely clear that it makes sense to check the protection
      key bits at this level at all.  But one possible eventual solution is to
      make the get_user_pages_fast() case just abort if it sees protection key
      bits set, which makes us fall back to the regular get_user_pages() case,
      which then has a vma and can do the check there if we want to.
      
      We'll see.
      
      Somewhat related to this all: what we _do_ want to do some day is to
      check the PAGE_USER bit - it should obviously always be set for user
      pages, but it would be a good check to have back.  Because we have no
      generic way to test for it, we lost it as part of moving over from the
      architecture-specific x86 GUP implementation to the generic one in
      commit e585513b ("x86/mm/gup: Switch GUP to the generic
      get_user_page_fast() implementation").
      
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Dan Williams <dan.j.williams@intel.com>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: "Jérôme Glisse" <jglisse@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f6f37321