Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull block fixes from Jens Axboe:

- Discard loop fix, caused by integer overflow (Dave)

- Blacklist of Samsung drive that hangs with power management (Diego)

- Copy bio priority when cloning it (Hannes)

- Fix race condition exposed in floppy (me)

- Fix SCSI queue cleanup regression. While elusive, it caused oopses in
queue running (Ming)

- Fix bad string copy in kyber tracing (Omar)

* tag 'for-linus-20181115' of git://git.kernel.dk/linux-block:
SCSI: fix queue cleanup race before queue initialization is done
block: fix 32 bit overflow in __blkdev_issue_discard()
libata: blacklist SAMSUNG MZ7TD256HAFV-000L9 SSD
block: copy ioprio in __bio_clone_fast() and bounce
kyber: fix wrong strlcpy() size in trace_kyber_latency()
floppy: fix race condition in __floppy_read_block_0()

+22 -10
+1
block/bio.c
··· 605 605 if (bio_flagged(bio_src, BIO_THROTTLED)) 606 606 bio_set_flag(bio, BIO_THROTTLED); 607 607 bio->bi_opf = bio_src->bi_opf; 608 + bio->bi_ioprio = bio_src->bi_ioprio; 608 609 bio->bi_write_hint = bio_src->bi_write_hint; 609 610 bio->bi_iter = bio_src->bi_iter; 610 611 bio->bi_io_vec = bio_src->bi_io_vec;
+2 -3
block/blk-core.c
··· 798 798 * dispatch may still be in-progress since we dispatch requests 799 799 * from more than one contexts. 800 800 * 801 - * No need to quiesce queue if it isn't initialized yet since 802 - * blk_freeze_queue() should be enough for cases of passthrough 803 - * request. 801 + * We rely on driver to deal with the race in case that queue 802 + * initialization isn't done. 804 803 */ 805 804 if (q->mq_ops && blk_queue_init_done(q)) 806 805 blk_mq_quiesce_queue(q);
+3 -1
block/blk-lib.c
··· 55 55 return -EINVAL; 56 56 57 57 while (nr_sects) { 58 - unsigned int req_sects = min_t(unsigned int, nr_sects, 58 + sector_t req_sects = min_t(sector_t, nr_sects, 59 59 bio_allowed_max_sectors(q)); 60 + 61 + WARN_ON_ONCE((req_sects << 9) > UINT_MAX); 60 62 61 63 bio = blk_next_bio(bio, 0, gfp_mask); 62 64 bio->bi_iter.bi_sector = sector;
+1
block/bounce.c
··· 248 248 return NULL; 249 249 bio->bi_disk = bio_src->bi_disk; 250 250 bio->bi_opf = bio_src->bi_opf; 251 + bio->bi_ioprio = bio_src->bi_ioprio; 251 252 bio->bi_write_hint = bio_src->bi_write_hint; 252 253 bio->bi_iter.bi_sector = bio_src->bi_iter.bi_sector; 253 254 bio->bi_iter.bi_size = bio_src->bi_iter.bi_size;
+1 -1
drivers/ata/libata-core.c
··· 4553 4553 /* These specific Samsung models/firmware-revs do not handle LPM well */ 4554 4554 { "SAMSUNG MZMPC128HBFU-000MV", "CXM14M1Q", ATA_HORKAGE_NOLPM, }, 4555 4555 { "SAMSUNG SSD PM830 mSATA *", "CXM13D1Q", ATA_HORKAGE_NOLPM, }, 4556 - { "SAMSUNG MZ7TD256HAFV-000L9", "DXT02L5Q", ATA_HORKAGE_NOLPM, }, 4556 + { "SAMSUNG MZ7TD256HAFV-000L9", NULL, ATA_HORKAGE_NOLPM, }, 4557 4557 4558 4558 /* devices that don't properly handle queued TRIM commands */ 4559 4559 { "Micron_M500IT_*", "MU01", ATA_HORKAGE_NO_NCQ_TRIM |
+2 -1
drivers/block/floppy.c
··· 4148 4148 bio.bi_end_io = floppy_rb0_cb; 4149 4149 bio_set_op_attrs(&bio, REQ_OP_READ, 0); 4150 4150 4151 + init_completion(&cbdata.complete); 4152 + 4151 4153 submit_bio(&bio); 4152 4154 process_fd_request(); 4153 4155 4154 - init_completion(&cbdata.complete); 4155 4156 wait_for_completion(&cbdata.complete); 4156 4157 4157 4158 __free_page(page);
+8
drivers/scsi/scsi_lib.c
··· 697 697 */ 698 698 scsi_mq_uninit_cmd(cmd); 699 699 700 + /* 701 + * queue is still alive, so grab the ref for preventing it 702 + * from being cleaned up during running queue. 703 + */ 704 + percpu_ref_get(&q->q_usage_counter); 705 + 700 706 __blk_mq_end_request(req, error); 701 707 702 708 if (scsi_target(sdev)->single_lun || ··· 710 704 kblockd_schedule_work(&sdev->requeue_work); 711 705 else 712 706 blk_mq_run_hw_queues(q, true); 707 + 708 + percpu_ref_put(&q->q_usage_counter); 713 709 } else { 714 710 unsigned long flags; 715 711
+4 -4
include/trace/events/kyber.h
··· 31 31 32 32 TP_fast_assign( 33 33 __entry->dev = disk_devt(dev_to_disk(kobj_to_dev(q->kobj.parent))); 34 - strlcpy(__entry->domain, domain, DOMAIN_LEN); 35 - strlcpy(__entry->type, type, DOMAIN_LEN); 34 + strlcpy(__entry->domain, domain, sizeof(__entry->domain)); 35 + strlcpy(__entry->type, type, sizeof(__entry->type)); 36 36 __entry->percentile = percentile; 37 37 __entry->numerator = numerator; 38 38 __entry->denominator = denominator; ··· 60 60 61 61 TP_fast_assign( 62 62 __entry->dev = disk_devt(dev_to_disk(kobj_to_dev(q->kobj.parent))); 63 - strlcpy(__entry->domain, domain, DOMAIN_LEN); 63 + strlcpy(__entry->domain, domain, sizeof(__entry->domain)); 64 64 __entry->depth = depth; 65 65 ), 66 66 ··· 82 82 83 83 TP_fast_assign( 84 84 __entry->dev = disk_devt(dev_to_disk(kobj_to_dev(q->kobj.parent))); 85 - strlcpy(__entry->domain, domain, DOMAIN_LEN); 85 + strlcpy(__entry->domain, domain, sizeof(__entry->domain)); 86 86 ), 87 87 88 88 TP_printk("%d,%d %s", MAJOR(__entry->dev), MINOR(__entry->dev),