1. 22 Apr, 2019 6 commits
    • Jens Axboe's avatar
      Merge branch 'md-next' of https://github.com/liu-song-6/linux into for-5.2/block · 6c88d735
      Jens Axboe authored
      Pull MD fixes from Song.
      
      * 'md-next' of https://github.com/liu-song-6/linux:
        md/raid: raid5 preserve the writeback action after the parity check
        Revert "Don't jump to compute_result state from check_result state"
        md: return -ENODEV if rdev has no mddev assigned
        block: fix use-after-free on gendisk
      6c88d735
    • Weiping Zhang's avatar
      block: don't show io_timeout if driver has no timeout handler · 4d25339e
      Weiping Zhang authored
      If the low level driver has no timeout handler, the
      /sys/block/<disk>/queue/io_timeout will not be displayed.
      Reviewed-by: default avatarBart Van Assche <bvanassche@acm.org>
      Signed-off-by: default avatarWeiping Zhang <zhangweiping@didiglobal.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      4d25339e
    • Christoph Hellwig's avatar
      block: avoid scatterlist offsets > PAGE_SIZE · f9f76879
      Christoph Hellwig authored
      While we generally allow scatterlists to have offsets larger than page
      size for an entry, and other subsystems like the crypto code make use of
      that, the block layer isn't quite ready for that.  Flip the switch back
      to avoid them for now, and revisit that decision early in a merge window
      once the known offenders are fixed.
      
      Fixes: 8a96a0e4 ("block: rewrite blk_bvec_map_sg to avoid a nth_page call")
      Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
      Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      f9f76879
    • Hou Tao's avatar
      brd: re-enable __GFP_HIGHMEM in brd_insert_page() · f6b50160
      Hou Tao authored
      __GFP_HIGHMEM is disabled if dax is enabled on brd, however
      dax support for brd has been removed since commit (7a862fbb
      "brd: remove dax support"), so restore __GFP_HIGHMEM in
      brd_insert_page().
      
      Also remove the no longer applicable comments about DAX and highmem.
      
      Cc: stable@vger.kernel.org
      Fixes: 7a862fbb ("brd: remove dax support")
      Signed-off-by: default avatarHou Tao <houtao1@huawei.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      f6b50160
    • Yufen Yu's avatar
      block: fix use-after-free on gendisk · 6fcc44d1
      Yufen Yu authored
      commit 2da78092 "block: Fix dev_t minor allocation lifetime"
      specifically moved blk_free_devt(dev->devt) call to part_release()
      to avoid reallocating device number before the device is fully
      shutdown.
      
      However, it can cause use-after-free on gendisk in get_gendisk().
      We use md device as example to show the race scenes:
      
      Process1		Worker			Process2
      md_free
      						blkdev_open
      del_gendisk
        add delete_partition_work_fn() to wq
        						__blkdev_get
      						get_gendisk
      put_disk
        disk_release
          kfree(disk)
          						find part from ext_devt_idr
      						get_disk_and_module(disk)
          					  	cause use after free
      
          			delete_partition_work_fn
      			put_device(part)
          		  	part_release
      		    	remove part from ext_devt_idr
      
      Before <devt, hd_struct pointer> is removed from ext_devt_idr by
      delete_partition_work_fn(), we can find the devt and then access
      gendisk by hd_struct pointer. But, if we access the gendisk after
      it have been freed, it can cause in use-after-freeon gendisk in
      get_gendisk().
      
      We fix this by adding a new helper blk_invalidate_devt() in
      delete_partition() and del_gendisk(). It replaces hd_struct
      pointer in idr with value 'NULL', and deletes the entry from
      idr in part_release() as we do now.
      
      Thanks to Jan Kara for providing the solution and more clear comments
      for the code.
      
      Fixes: 2da78092 ("block: Fix dev_t minor allocation lifetime")
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Reviewed-by: default avatarBart Van Assche <bvanassche@acm.org>
      Reviewed-by: default avatarKeith Busch <keith.busch@intel.com>
      Reviewed-by: default avatarJan Kara <jack@suse.cz>
      Suggested-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarYufen Yu <yuyufen@huawei.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      6fcc44d1
    • Jens Axboe's avatar
      Merge tag 'v5.1-rc6' into for-5.2/block · 5c61ee2c
      Jens Axboe authored
      Pull in v5.1-rc6 to resolve two conflicts. One is in BFQ, in just a
      comment, and is trivial. The other one is a conflict due to a later fix
      in the bio multi-page work, and needs a bit more care.
      
      * tag 'v5.1-rc6': (770 commits)
        Linux 5.1-rc6
        block: make sure that bvec length can't be overflow
        block: kill all_q_node in request_queue
        x86/cpu/intel: Lower the "ENERGY_PERF_BIAS: Set to normal" message's log priority
        coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping
        mm/kmemleak.c: fix unused-function warning
        init: initialize jump labels before command line option parsing
        kernel/watchdog_hld.c: hard lockup message should end with a newline
        kcov: improve CONFIG_ARCH_HAS_KCOV help text
        mm: fix inactive list balancing between NUMA nodes and cgroups
        mm/hotplug: treat CMA pages as unmovable
        proc: fixup proc-pid-vm test
        proc: fix map_files test on F29
        mm/vmstat.c: fix /proc/vmstat format for CONFIG_DEBUG_TLBFLUSH=y CONFIG_SMP=n
        mm/memory_hotplug: do not unlock after failing to take the device_hotplug_lock
        mm: swapoff: shmem_unuse() stop eviction without igrab()
        mm: swapoff: take notice of completion sooner
        mm: swapoff: remove too limiting SWAP_UNUSE_MAX_TRIES
        mm: swapoff: shmem_find_swap_entries() filter out other types
        slab: store tagged freelist for off-slab slabmgmt
        ...
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      5c61ee2c
  2. 21 Apr, 2019 1 commit
  3. 20 Apr, 2019 11 commits
  4. 19 Apr, 2019 22 commits