1. 03 Sep, 2019 5 commits
  2. 31 Aug, 2019 3 commits
    • Wenwen Wang's avatar
      hwmon (coretemp) Fix a memory leak bug · e027a2de
      Wenwen Wang authored
      In coretemp_init(), 'zone_devices' is allocated through kcalloc().
      However, it is not deallocated in the following execution if
      platform_driver_register() fails, leading to a memory leak. To fix this
      issue, introduce the 'outzone' label to free 'zone_devices' before
      returning the error.
      Signed-off-by: default avatarWenwen Wang <wenwen@cs.uga.edu>
      Link: https://lore.kernel.org/r/1566248402-6538-1-git-send-email-wenwen@cs.uga.eduSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      e027a2de
    • Guenter Roeck's avatar
      hwmon: (lm75) Fix write operations for negative temperatures · 7d82fcc9
      Guenter Roeck authored
      Writes into limit registers fail if the temperature written is negative.
      The regmap write operation checks the value range, regmap_write accepts
      an unsigned int as parameter, and the temperature value passed to
      regmap_write is kept in a variable declared as long. Negative values
      are converted large unsigned integers, which fails the range check.
      Fix by type casting the temperature to u16 when calling regmap_write().
      
      Cc: Iker Perez del Palomar Sustatxa <iker.perez@codethink.co.uk>
      Fixes: e65365fe ("hwmon: (lm75) Convert to use regmap")
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      7d82fcc9
    • Bartosz Golaszewski's avatar
      hwmon: pmbus: ucd9000: remove unneeded include · 6f8c8f3c
      Bartosz Golaszewski authored
      Build bot reports the following build issue after commit 9091373a
      ("gpio: remove less important #ifdef around declarations):
      
         In file included from drivers/hwmon/pmbus/ucd9000.c:19:0:
      >> include/linux/gpio/driver.h:576:1: error: redefinition of 'gpiochip_add_pin_range'
          gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
          ^~~~~~~~~~~~~~~~~~~~~~
         In file included from drivers/hwmon/pmbus/ucd9000.c:18:0:
         include/linux/gpio.h:245:1: note: previous definition of 'gpiochip_add_pin_range' was here
          gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
          ^~~~~~~~~~~~~~~~~~~~~~
         In file included from drivers/hwmon/pmbus/ucd9000.c:19:0:
      >> include/linux/gpio/driver.h:583:1: error: redefinition of 'gpiochip_add_pingroup_range'
          gpiochip_add_pingroup_range(struct gpio_chip *chip,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
         In file included from drivers/hwmon/pmbus/ucd9000.c:18:0:
         include/linux/gpio.h:254:1: note: previous definition of 'gpiochip_add_pingroup_range' was here
          gpiochip_add_pingroup_range(struct gpio_chip *chip,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
         In file included from drivers/hwmon/pmbus/ucd9000.c:19:0:
      >> include/linux/gpio/driver.h:591:1: error: redefinition of 'gpiochip_remove_pin_ranges'
          gpiochip_remove_pin_ranges(struct gpio_chip *chip)
          ^~~~~~~~~~~~~~~~~~~~~~~~~~
         In file included from drivers/hwmon/pmbus/ucd9000.c:18:0:
         include/linux/gpio.h:263:1: note: previous definition of 'gpiochip_remove_pin_ranges' was here
          gpiochip_remove_pin_ranges(struct gpio_chip *chip)
      
      This is caused by conflicting defines from linux/gpio.h and
      linux/gpio/driver.h. Drivers should not include both the legacy and
      the new API headers. This driver doesn't even use linux/gpio.h so
      remove it.
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
      Link: https://lore.kernel.org/r/20190808080144.6183-1-brgl@bgdev.plSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      6f8c8f3c
  3. 25 Aug, 2019 22 commits
  4. 24 Aug, 2019 8 commits
  5. 23 Aug, 2019 2 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · 9140d8bd
      Linus Torvalds authored
      Pull rdma fixes from Doug Ledford:
       "No beating around the bush: this is a monster pull request for an -rc5
        kernel. Intel hit me with a series of fixes for TID processing.
        Mellanox hit me with a series for their UMR memory support.
      
        And we had one fix for siw that fixes the 32bit build warnings and
        because of the number of casts that had to be changed to properly
        silence the warnings, that one patch alone is a full 40% of the LOC of
        this entire pull request. Given that this is the initial release
        kernel for siw, I'm trying to fix anything in it that we can, so that
        adds to the impetus to take fixes for it like this one.
      
        I had to do a rebase early in the week. Jason had thought he put a
        patch on the rc queue that he needed to be there so he could base some
        work off of it, and it had actually not been placed there. So he asked
        me (on Tuesday) to fix that up before pushing my wip branch to the
        official rc branch. I did, and that's why the early patches look like
        they were all committed at the same time on Tuesday. That bunch had
        been in my queue prior.
      
        The various patches all pass my test for being legitimate fixes and
        not attempts to slide new features or development into a late rc.
        Well, they were all fixes with the exception of a couple clean up
        patches people wrote for making the fixes they also wrote better (like
        a cleanup patch to move UMR checking into a function so that the
        remaining UMR fix patches can reference that function), so I left
        those in place too.
      
        My apologies for the LOC count and the number of patches here, it's
        just how the cards fell this cycle.
      
        Summary:
      
         - Fix siw buffer mapping issue
      
         - Fix siw 32/64 casting issues
      
         - Fix a KASAN access issue in bnxt_re
      
         - Fix several memory leaks (hfi1, mlx4)
      
         - Fix a NULL deref in cma_cleanup
      
         - Fixes for UMR memory support in mlx5 (4 patch series)
      
         - Fix namespace check for restrack
      
         - Fixes for counter support
      
         - Fixes for hfi1 TID processing (5 patch series)
      
         - Fix potential NULL deref in siw
      
         - Fix memory page calculations in mlx5"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (21 commits)
        RDMA/siw: Fix 64/32bit pointer inconsistency
        RDMA/siw: Fix SGL mapping issues
        RDMA/bnxt_re: Fix stack-out-of-bounds in bnxt_qplib_rcfw_send_message
        infiniband: hfi1: fix memory leaks
        infiniband: hfi1: fix a memory leak bug
        IB/mlx4: Fix memory leaks
        RDMA/cma: fix null-ptr-deref Read in cma_cleanup
        IB/mlx5: Block MR WR if UMR is not possible
        IB/mlx5: Fix MR re-registration flow to use UMR properly
        IB/mlx5: Report and handle ODP support properly
        IB/mlx5: Consolidate use_umr checks into single function
        RDMA/restrack: Rewrite PID namespace check to be reliable
        RDMA/counters: Properly implement PID checks
        IB/core: Fix NULL pointer dereference when bind QP to counter
        IB/hfi1: Drop stale TID RDMA packets that cause TIDErr
        IB/hfi1: Add additional checks when handling TID RDMA WRITE DATA packet
        IB/hfi1: Add additional checks when handling TID RDMA READ RESP packet
        IB/hfi1: Unsafe PSN checking for TID RDMA READ Resp packet
        IB/hfi1: Drop stale TID RDMA packets
        RDMA/siw: Fix potential NULL de-ref
        ...
      9140d8bd
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20190823' of git://git.kernel.dk/linux-block · b9bd6806
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Here's a set of fixes that should go into this release. This contains:
      
         - Three minor fixes for NVMe.
      
         - Three minor tweaks for the io_uring polling logic.
      
         - Officially mark Song as the MD maintainer, after he's been filling
           that role sucessfully for the last 6 months or so"
      
      * tag 'for-linus-20190823' of git://git.kernel.dk/linux-block:
        io_uring: add need_resched() check in inner poll loop
        md: update MAINTAINERS info
        io_uring: don't enter poll loop if we have CQEs pending
        nvme: Add quirk for LiteON CL1 devices running FW 22301111
        nvme: Fix cntlid validation when not using NVMEoF
        nvme-multipath: fix possible I/O hang when paths are updated
        io_uring: fix potential hang with polled IO
      b9bd6806