1. 28 Dec, 2017 34 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 2 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