linux-stable/drivers/md
Xiao Ni 3decc9df10 It's wrong to add len to sector_nr in raid10 reshape twice
commit b761dcf121 upstream.

In reshape_request it already adds len to sector_nr already. It's wrong to add len to
sector_nr again after adding pages to bio. If there is bad block it can't copy one chunk
at a time, it needs to goto read_more. Now the sector_nr is wrong. It can cause data
corruption.

Cc: stable@vger.kernel.org # v3.16+
Signed-off-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-19 13:14:11 +01:00
..
bcache bcache: fix miss key refill->end in writeback 2018-11-13 11:16:45 -08:00
persistent-data dm btree: fix serious bug in btree_split_beneath() 2018-01-23 19:57:08 +01:00
bitmap.c md: free unused memory after bitmap resize 2017-12-16 16:25:47 +01:00
bitmap.h
dm-bio-prison.c
dm-bio-prison.h
dm-bio-record.h
dm-bufio.c dm bufio: don't take the lock in dm_bufio_shrink_count 2018-07-11 16:26:46 +02:00
dm-bufio.h
dm-builtin.c
dm-cache-block-types.h
dm-cache-metadata.c dm cache metadata: ignore hints array being too small during resize 2018-10-13 09:18:55 +02:00
dm-cache-metadata.h
dm-cache-policy-cleaner.c dm cache: speed up writing of the hint array 2016-09-22 11:15:02 -04:00
dm-cache-policy-internal.h dm cache: speed up writing of the hint array 2016-09-22 11:15:02 -04:00
dm-cache-policy-smq.c dm cache policy smq: distribute entries to random levels when switching to smq 2016-09-22 11:15:03 -04:00
dm-cache-policy.c
dm-cache-policy.h dm cache: speed up writing of the hint array 2016-09-22 11:15:02 -04:00
dm-cache-target.c dm cache: fix resize crash if user doesn't reload cache table 2018-10-13 09:18:55 +02:00
dm-core.h dm: allocate struct mapped_device with kvzalloc 2017-11-30 08:39:02 +00:00
dm-crypt.c dm crypt: mark key as invalid until properly loaded 2017-01-06 10:40:15 +01:00
dm-delay.c
dm-era-target.c dm era: save spacemap metadata root after the pre-commit 2017-05-20 14:28:37 +02:00
dm-exception-store.c
dm-exception-store.h
dm-flakey.c dm flakey: return -EINVAL on interval bounds error in flakey_ctr() 2017-01-06 10:40:15 +01:00
dm-io.c dm io: fix duplicate bio completion due to missing ref count 2018-03-11 16:21:30 +01:00
dm-ioctl.c dm ioctl: harden copy_params()'s copy_from_user() from malicious users 2018-11-13 11:17:02 -08:00
dm-kcopyd.c dm kcopyd: Fix bug causing workqueue stalls 2019-01-26 09:38:35 +01:00
dm-linear.c libnvdimm for 4.8 2016-07-28 17:38:16 -07:00
dm-log-userspace-base.c
dm-log-userspace-transfer.c
dm-log-userspace-transfer.h
dm-log-writes.c Merge branch 'for-4.9/block' of git://git.kernel.dk/linux-block 2016-10-07 14:42:05 -07:00
dm-log.c dm log: fix unitialized bio operation flags 2016-08-24 21:55:05 -04:00
dm-mpath.c dm mpath: cleanup -Wbool-operation warning in choose_pgpath() 2017-07-27 15:07:55 -07:00
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-queue-length.c
dm-raid.c dm raid: fix rebuild of specific devices by updating superblock 2018-10-10 08:53:21 +02:00
dm-raid1.c dm mirror: use all available legs on multiple failures 2016-10-14 11:55:17 -04:00
dm-region-hash.c block: rename bio bi_rw to bi_opf 2016-08-07 14:41:02 -06:00
dm-round-robin.c dm round robin: revert "use percpu 'repeat_count' and 'current_path'" 2017-03-12 06:41:44 +01:00
dm-rq.c dm rq: check blk_mq_register_dev() return value in dm_mq_init_request_queue() 2017-05-20 14:28:37 +02:00
dm-rq.h dm rq: introduce dm_mq_kick_requeue_list() 2016-09-15 11:16:05 -04:00
dm-service-time.c
dm-snap-persistent.c
dm-snap-transient.c
dm-snap.c dm snapshot: Fix excessive memory usage and workqueue stalls 2019-01-26 09:38:35 +01:00
dm-stats.c dm stats: fix a leaked s->histogram_boundaries array 2017-03-12 06:41:44 +01:00
dm-stats.h
dm-stripe.c block: rename bio bi_rw to bi_opf 2016-08-07 14:41:02 -06:00
dm-switch.c
dm-sysfs.c
dm-table.c dm table: an 'all_blk_mq' table must be loaded for a blk-mq DM device 2017-01-06 10:40:15 +01:00
dm-target.c libnvdimm for 4.8 2016-07-28 17:38:16 -07:00
dm-thin-metadata.c dm thin: fix passdown_double_checking_shared_status() 2019-01-31 08:12:36 +01:00
dm-thin-metadata.h dm thin: fix passdown_double_checking_shared_status() 2019-01-31 08:12:36 +01:00
dm-thin.c dm thin: fix bug where bio that overwrites thin block ignores FUA 2019-02-20 10:18:33 +01:00
dm-uevent.c
dm-uevent.h
dm-verity-fec.c dm verity fec: fix bufio leaks 2017-04-12 12:41:12 +02:00
dm-verity-fec.h dm verity fec: limit error correction recursion 2017-04-12 12:41:12 +02:00
dm-verity-target.c
dm-verity.h
dm-zero.c block: rename bio bi_rw to bi_opf 2016-08-07 14:41:02 -06:00
dm.c dm: correctly handle chained bios in dec_pending() 2018-02-22 15:43:51 +01:00
dm.h dm: add infrastructure for DAX support 2016-07-20 23:49:49 -04:00
faulty.c
Kconfig dm raid: select the Kconfig option CONFIG_MD_RAID0 2017-05-25 15:44:33 +02:00
linear.c md/linear: shutup lockdep warnning 2017-10-21 17:21:35 +02:00
linear.h md linear: fix a race between linear_add() and linear_congested() 2017-03-12 06:41:52 +01:00
Makefile
md-cluster.c md-cluster: clear another node's suspend_area after the copy is finished 2018-10-03 17:01:43 -07:00
md-cluster.h
md.c MD: fix invalid stored role for a disk - try2 2018-11-13 11:17:05 -08:00
md.h md: changes for MD_STILL_CLOSED flag 2016-09-21 09:09:44 -07:00
multipath.c block: rename bio bi_rw to bi_opf 2016-08-07 14:41:02 -06:00
multipath.h
raid0.c block: rename bio bi_rw to bi_opf 2016-08-07 14:41:02 -06:00
raid0.h
raid1.c MD: fix invalid stored role for a disk - try2 2018-11-13 11:17:05 -08:00
raid1.h
raid5-cache.c raid5-cache: correct condition for empty metadata write 2016-10-28 22:04:03 -07:00
raid5.c md/raid5: fix data corruption of replacements after originals dropped 2018-09-19 22:47:12 +02:00
raid5.h md/raid5: Convert to hotplug state machine 2016-09-06 18:30:23 +02:00
raid10.c It's wrong to add len to sector_nr in raid10 reshape twice 2019-03-19 13:14:11 +01:00
raid10.h raid10: improve random reads performance 2016-07-19 15:20:28 -07:00