Skip to content
  1. Jun 15, 2019
  2. Jun 14, 2019
  3. Jun 13, 2019
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid · c11fb13a
      Linus Torvalds authored
      Pull HID fixes from Jiri Kosina:
      
       - regression fixes (reverts) for module loading changes that turned out
         to be incompatible with some userspace, from Benjamin Tissoires
      
       - regression fix for special Logitech unifiying receiver 0xc52f, from
         Hans de Goede
      
       - a few device ID additions to logitech driver, from Hans de Goede
      
       - fix for Bluetooth support on 2nd-gen Wacom Intuos Pro, from Jason
         Gerecke
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
        HID: logitech-dj: Fix 064d:c52f receiver support
        Revert "HID: core: Call request_module before doing device_add"
        Revert "HID: core: Do not call request_module() in async context"
        Revert "HID: Increase maximum report size allowed by hid_field_extract()"
        HID: a4tech: fix horizontal scrolling
        HID: hyperv: Add a module description line
        HID: logitech-hidpp: Add support for the S510 remote control
        HID: multitouch: handle faulty Elo touch device
        HID: wacom: Sync INTUOSP2_BT touch state after each frame if necessary
        HID: wacom: Correct button numbering 2nd-gen Intuos Pro over Bluetooth
        HID: wacom: Send BTN_TOUCH in response to INTUOSP2_BT eraser contact
        HID: wacom: Don't report anything prior to the tool entering range
        HID: wacom: Don't set tool type until we're in range
        HID: rmi: Use SET_REPORT request on control endpoint for Acer Switch 3 and 5
        HID: logitech-hidpp: add support for the MX5500 keyboard
        HID: logitech-dj: add support for the Logitech MX5500's Bluetooth Mini-Receiver
        HID: i2c-hid: add iBall Aer3 to descriptor override
      c11fb13a
    • Takashi Iwai's avatar
      Merge tag 'asoc-fix-v5.2-rc4' of... · 84396d14
      Takashi Iwai authored
      Merge tag 'asoc-fix-v5.2-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
      
      ASoC: Fixes for v5.2
      
      There's an awful lot of fixes here, almost all for the newly introduced
      SoF DSP drivers (including a few things it turned up in shared code).
      This is a large and complex piece of code so it's not surprising that
      there have been quite a few issues here, fortunately things seem to have
      mostly calmed down now.  Otherwise there's just a smattering of small fixes.
      84396d14
    • Geert Uytterhoeven's avatar
      block/ps3vram: Use %llu to format sector_t after LBDAF removal · 1d0c0651
      Geert Uytterhoeven authored
      
      
      The removal of CONFIG_LBDAF changed the type of sector_t from "unsigned
      long" to "u64" aka "unsigned long long" on 64-bit platforms, leading to
      a compiler warning regression:
      
          drivers/block/ps3vram.c: In function ‘ps3vram_probe’:
          drivers/block/ps3vram.c:770:23: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘sector_t {aka long long unsigned int}’ [-Wformat=]
      
      Fix this by using "%llu" instead.
      
      Fixes: 72deb455 ("block: remove CONFIG_LBDAF")
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      1d0c0651
    • Hans de Goede's avatar
      libata: Extend quirks for the ST1000LM024 drives with NOLPM quirk · 31f6264e
      Hans de Goede authored
      We've received a bugreport that using LPM with ST1000LM024 drives leads
      to system lockups. So it seems that these models are buggy in more then
      1 way. Add NOLPM quirk to the existing quirks entry for BROKEN_FPDMA_AA.
      
      BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1571330
      
      
      Cc: stable@vger.kernel.org
      Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      31f6264e
    • Coly Li's avatar
      bcache: only set BCACHE_DEV_WB_RUNNING when cached device attached · 1f0ffa67
      Coly Li authored
      
      
      When people set a writeback percent via sysfs file,
        /sys/block/bcache<N>/bcache/writeback_percent
      current code directly sets BCACHE_DEV_WB_RUNNING to dc->disk.flags
      and schedules kworker dc->writeback_rate_update.
      
      If there is no cache set attached to, the writeback kernel thread is
      not running indeed, running dc->writeback_rate_update does not make
      sense and may cause NULL pointer deference when reference cache set
      pointer inside update_writeback_rate().
      
      This patch checks whether the cache set point (dc->disk.c) is NULL in
      sysfs interface handler, and only set BCACHE_DEV_WB_RUNNING and
      schedule dc->writeback_rate_update when dc->disk.c is not NULL (it
      means the cache device is attached to a cache set).
      
      This problem might be introduced from initial bcache commit, but
      commit 3fd47bfe ("bcache: stop dc->writeback_rate_update properly")
      changes part of the original code piece, so I add 'Fixes: 3fd47bfe'
      to indicate from which commit this patch can be applied.
      
      Fixes: 3fd47bfe ("bcache: stop dc->writeback_rate_update properly")
      Reported-by: default avatarBjørn Forsman <bjorn.forsman@gmail.com>
      Signed-off-by: default avatarColy Li <colyli@suse.de>
      Reviewed-by: default avatarBjørn Forsman <bjorn.forsman@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      1f0ffa67
    • Coly Li's avatar
      bcache: fix stack corruption by PRECEDING_KEY() · 31b90956
      Coly Li authored
      
      
      Recently people report bcache code compiled with gcc9 is broken, one of
      the buggy behavior I observe is that two adjacent 4KB I/Os should merge
      into one but they don't. Finally it turns out to be a stack corruption
      caused by macro PRECEDING_KEY().
      
      See how PRECEDING_KEY() is defined in bset.h,
      437 #define PRECEDING_KEY(_k)                                       \
      438 ({                                                              \
      439         struct bkey *_ret = NULL;                               \
      440                                                                 \
      441         if (KEY_INODE(_k) || KEY_OFFSET(_k)) {                  \
      442                 _ret = &KEY(KEY_INODE(_k), KEY_OFFSET(_k), 0);  \
      443                                                                 \
      444                 if (!_ret->low)                                 \
      445                         _ret->high--;                           \
      446                 _ret->low--;                                    \
      447         }                                                       \
      448                                                                 \
      449         _ret;                                                   \
      450 })
      
      At line 442, _ret points to address of a on-stack variable combined by
      KEY(), the life range of this on-stack variable is in line 442-446,
      once _ret is returned to bch_btree_insert_key(), the returned address
      points to an invalid stack address and this address is overwritten in
      the following called bch_btree_iter_init(). Then argument 'search' of
      bch_btree_iter_init() points to some address inside stackframe of
      bch_btree_iter_init(), exact address depends on how the compiler
      allocates stack space. Now the stack is corrupted.
      
      Fixes: 0eacac22 ("bcache: PRECEDING_KEY()")
      Signed-off-by: default avatarColy Li <colyli@suse.de>
      Reviewed-by: default avatarRolf Fokkens <rolf@rolffokkens.nl>
      Reviewed-by: default avatarPierre JUHEN <pierre.juhen@orange.fr>
      Tested-by: default avatarShenghui Wang <shhuiw@foxmail.com>
      Tested-by: default avatarPierre JUHEN <pierre.juhen@orange.fr>
      Cc: Kent Overstreet <kent.overstreet@gmail.com>
      Cc: Nix <nix@esperi.org.uk>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      31b90956
    • Dave Martin's avatar
      arm64/sve: Fix missing SVE/FPSIMD endianness conversions · 41040cf7
      Dave Martin authored
      
      
      The in-memory representation of SVE and FPSIMD registers is
      different: the FPSIMD V-registers are stored as single 128-bit
      host-endian values, whereas SVE registers are stored in an
      endianness-invariant byte order.
      
      This means that the two representations differ when running on a
      big-endian host.  But we blindly copy data from one representation
      to another when converting between the two, resulting in the
      register contents being unintentionally byteswapped in certain
      situations.  Currently this can be triggered by the first SVE
      instruction after a syscall, for example (though the potential
      trigger points may vary in future).
      
      So, fix the conversion functions fpsimd_to_sve(), sve_to_fpsimd()
      and sve_sync_from_fpsimd_zeropad() to swab where appropriate.
      
      There is no common swahl128() or swab128() that we could use here.
      Maybe it would be worth making this generic, but for now add a
      simple local hack.
      
      Since the byte order differences are exposed in ABI, also clarify
      the documentation.
      
      Cc: Alex Bennée <alex.bennee@linaro.org>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Alan Hayward <alan.hayward@arm.com>
      Cc: Julien Grall <julien.grall@arm.com>
      Fixes: bc0ee476 ("arm64/sve: Core task context handling")
      Fixes: 8cd969d2 ("arm64/sve: Signal handling support")
      Fixes: 43d4da2c ("arm64/sve: ptrace and ELF coredump support")
      Signed-off-by: default avatarDave Martin <Dave.Martin@arm.com>
      [will: Fix typos in comments and docs spotted by Julien]
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      41040cf7
    • Ming Lei's avatar
      blk-mq: remove WARN_ON(!q->elevator) from blk_mq_sched_free_requests · c326f846
      Ming Lei authored
      
      
      blk_mq_sched_free_requests() may be called in failure path in which
      q->elevator may not be setup yet, so remove WARN_ON(!q->elevator) from
      blk_mq_sched_free_requests for avoiding the false positive.
      
      This function is actually safe to call in case of !q->elevator because
      hctx->sched_tags is checked.
      
      Cc: Bart Van Assche <bvanassche@acm.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Yi Zhang <yi.zhang@redhat.com>
      Fixes: c3e22192 ("block: free sched's request pool in blk_cleanup_queue")
      Reported-by: default avatar <syzbot+b9d0d56867048c7bcfde@syzkaller.appspotmail.com>
      Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      c326f846
    • Andreas Herrmann's avatar
      blkio-controller.txt: Remove references to CFQ · fb5772cb
      Andreas Herrmann authored
      
      
      CFQ is gone. No need anymore to document its "proportional weight time
      based division of disk policy".
      
      Signed-off-by: default avatarAndreas Herrmann <aherrmann@suse.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      fb5772cb
    • Andreas Herrmann's avatar
      block/switching-sched.txt: Update to blk-mq schedulers · 8614b008
      Andreas Herrmann authored
      
      
      Remove references to CFQ and legacy block layer which are gone.
      Update example with what's available under blk-mq.
      
      Signed-off-by: default avatarAndreas Herrmann <aherrmann@suse.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      8614b008
    • Chaitanya Kulkarni's avatar
      null_blk: remove duplicate check for report zone · 154085ff
      Chaitanya Kulkarni authored
      
      
      This patch removes the check in the null_blk_zoned for report zone
      command, where it checks for the dev-,>zoned before executing the report
      zone.
      
      The null_zone_report() function is a block_device operation callback
      which is initialized in the null_blk_main.c and gets called as a part
      of blkdev for report zone IOCTL (BLKREPORTZONE).
      
      blkdev_ioctl()
      blkdev_report_zones_ioctl()
              blkdev_report_zones()
                      blk_report_zones()
                              disk->fops->report_zones()
                                      nullb_zone_report();
      
      The null_zone_report() will never get executed on the non-zoned block
      device, in the non zoned block device blk_queue_is_zoned() will always
      be false which is first check the blkdev_report_zones_ioctl()
      before actual low level driver report zone callback is executed.
      
      Here is the detailed scenario:-
      
      1. modprobe null_blk
      null_init
      null_alloc_dev
              dev->zoned = 0
      null_add_dev
              dev->zoned == 0
                      so we don't set the q->limits.zoned = BLK_ZONED_HR
      
      2. blkzone report /dev/nullb0
      
      blkdev_ioctl()
      blkdev_report_zones_ioctl()
              blk_queue_is_zoned()
                      blk_queue_is_zoned
                              q->limits.zoned == 0
                              return false
              if (!blk_queue_is_zoned(q)) <--- true
                      return -ENOTTY;
      
      Reviewed-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
      Reviewed-by: default avatarBob Liu <bob.liu@oracle.com>
      Signed-off-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      154085ff
    • Greg Kroah-Hartman's avatar
      blk-mq: no need to check return value of debugfs_create functions · 6cfc0081
      Greg Kroah-Hartman authored
      
      
      When calling debugfs functions, there is no need to ever check the
      return value.  The function can work or not, but the code logic should
      never do something different based on this.
      
      When all of these checks are cleaned up, lots of the functions used in
      the blk-mq-debugfs code can now return void, as no need to check the
      return value of them either.
      
      Overall, this ends up cleaning up the code and making it smaller, always
      a nice win.
      
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: linux-block@vger.kernel.org
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      6cfc0081
Loading