Commit 10e5ddd7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-linus-20190802' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
 "Here's a small collection of fixes that should go into this series.
  This contains:

   - io_uring potential use-after-free fix (Jackie)

   - loop regression fix (Jan)

   - O_DIRECT fragmented bio regression fix (Damien)

   - Mark Denis as the new floppy maintainer (Denis)

   - ataflop switch fall-through annotation (Gustavo)

   - libata zpodd overflow fix (Kees)

   - libata ahci deferred probe fix (Miquel)

   - nbd invalidation BUG_ON() fix (Munehisa)

   - dasd endless loop fix (Stefan)"

* tag 'for-linus-20190802' of git://git.kernel.dk/linux-block:
  s390/dasd: fix endless loop after read unit address configuration
  block: Fix __blkdev_direct_IO() for bio fragments
  MAINTAINERS: floppy: take over maintainership
  nbd: replace kill_bdev() with __invalidate_device() again
  ata: libahci: do not complain in case of deferred probe
  io_uring: fix KASAN use after free in io_sq_wq_submit_work
  loop: Fix mount(2) failure due to race with LOOP_SET_FD
  libata: zpodd: Fix small read overflow in zpodd_get_mech_type()
  ataflop: Mark expected switch fall-through
parents b2c74237 41995342
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -6322,7 +6322,8 @@ F: Documentation/devicetree/bindings/counter/ftm-quaddec.txt
F:	drivers/counter/ftm-quaddec.c

FLOPPY DRIVER
S:	Orphan
M:	Denis Efremov <efremov@linux.com>
S:	Odd Fixes
L:	linux-block@vger.kernel.org
F:	drivers/block/floppy.c

+3 −0
Original line number Diff line number Diff line
@@ -338,6 +338,9 @@ static int ahci_platform_get_phy(struct ahci_host_priv *hpriv, u32 port,
		hpriv->phys[port] = NULL;
		rc = 0;
		break;
	case -EPROBE_DEFER:
		/* Do not complain yet */
		break;

	default:
		dev_err(dev,
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ static enum odd_mech_type zpodd_get_mech_type(struct ata_device *dev)
	unsigned int ret;
	struct rm_feature_desc *desc;
	struct ata_taskfile tf;
	static const char cdb[] = {  GPCMD_GET_CONFIGURATION,
	static const char cdb[ATAPI_CDB_LEN] = {  GPCMD_GET_CONFIGURATION,
			2,      /* only 1 feature descriptor requested */
			0, 3,   /* 3, removable medium feature */
			0, 0, 0,/* reserved */
+1 −0
Original line number Diff line number Diff line
@@ -1726,6 +1726,7 @@ static int fd_locked_ioctl(struct block_device *bdev, fmode_t mode,
		/* MSch: invalidate default_params */
		default_params[drive].blocks  = 0;
		set_capacity(floppy->disk, MAX_DISK_SIZE * 2);
		/* Fall through */
	case FDFMTEND:
	case FDFLUSH:
		/* invalidate the buffer track to force a reread */
+9 −7
Original line number Diff line number Diff line
@@ -924,6 +924,7 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
	struct file	*file;
	struct inode	*inode;
	struct address_space *mapping;
	struct block_device *claimed_bdev = NULL;
	int		lo_flags = 0;
	int		error;
	loff_t		size;
@@ -942,11 +943,12 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
	 * here to avoid changing device under exclusive owner.
	 */
	if (!(mode & FMODE_EXCL)) {
		bdgrab(bdev);
		error = blkdev_get(bdev, mode | FMODE_EXCL, loop_set_fd);
		if (error)
		claimed_bdev = bd_start_claiming(bdev, loop_set_fd);
		if (IS_ERR(claimed_bdev)) {
			error = PTR_ERR(claimed_bdev);
			goto out_putf;
		}
	}

	error = mutex_lock_killable(&loop_ctl_mutex);
	if (error)
@@ -1015,15 +1017,15 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
	mutex_unlock(&loop_ctl_mutex);
	if (partscan)
		loop_reread_partitions(lo, bdev);
	if (!(mode & FMODE_EXCL))
		blkdev_put(bdev, mode | FMODE_EXCL);
	if (claimed_bdev)
		bd_abort_claiming(bdev, claimed_bdev, loop_set_fd);
	return 0;

out_unlock:
	mutex_unlock(&loop_ctl_mutex);
out_bdev:
	if (!(mode & FMODE_EXCL))
		blkdev_put(bdev, mode | FMODE_EXCL);
	if (claimed_bdev)
		bd_abort_claiming(bdev, claimed_bdev, loop_set_fd);
out_putf:
	fput(file);
out:
Loading