android_kernel_motorola_sm6375/block
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ming Lei db5e1fbf5e BACKPORT: blk-mq: fix is_flush_rq
is_flush_rq() is called from bt_iter()/bt_tags_iter(), and runs the
following check:

	hctx->fq->flush_rq == req

but the passed hctx from bt_iter()/bt_tags_iter() may be NULL because:

1) memory re-order in blk_mq_rq_ctx_init():

	rq->mq_hctx = data->hctx;
	...
	refcount_set(&rq->ref, 1);

OR

2) tag re-use and ->rqs[] isn't updated with new request.

Fix the issue by re-writing is_flush_rq() as:

	return rq->end_io == flush_end_io;

which turns out simpler to follow and immune to data race since we have
ordered WRITE rq->end_io and refcount_set(&rq->ref, 1).

Fixes: 2e315dc07df0 ("blk-mq: grab rq->refcount before calling ->fn in
    blk_mq_tagset_busy_iter")
Cc: "Blank-Burian, Markus, Dr." <blankburian@uni-muenster.de>
Cc: Yufen Yu <yuyufen@huawei.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>.

Bug: 197804811
Change-Id: I4c19fc2c7d39235b0e95a622f26646a353a19ee9
[Upstream: cherry picked from commit a9ed27a764156929efe714033edb3e9023c5f321]
[Pradeep: Resolved conflicts in block/blk.h]
Signed-off-by: Pradeep P V K <pragalla@codeaurora.org>
Git-commit: ec1b6ab9fe
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Pradeep P V K <pragalla@codeaurora.org>
2021-09-03 05:21:21 -07:00
..
partitions
badblocks.c
bfq-cgroup.c bfq: fix blkio cgroup leakage v4 2020-09-03 11:26:54 +02:00
bfq-iosched.c block: only call sched requeue_request() for scheduled requests 2020-09-23 12:40:37 +02:00
bfq-iosched.h bfq: fix blkio cgroup leakage v4 2020-09-03 11:26:54 +02:00
bfq-wf2q.c bfq: fix blkio cgroup leakage v4 2020-09-03 11:26:54 +02:00
bio-crypt-ctx.c ANDROID: dm: add dm-default-key target for metadata encryption 2020-01-24 10:52:54 -08:00
bio-integrity.c block: release bip in a right way in error path 2020-07-16 08:16:36 +02:00
bio.c Merge android11-5.4.86+ (75c93eb) into msm-5.4 2021-04-22 09:44:51 +05:30
blk-cgroup.c blk-cgroup: Pre-allocate tree node on blkg_conf_prep 2020-11-10 12:37:30 +01:00
blk-core.c This is the 5.4.73 stable release 2020-10-29 11:38:08 +01:00
blk-crypto-fallback.c ANDROID: block: require drivers to declare supported crypto key type(s) 2020-04-07 17:58:49 +00:00
blk-crypto-internal.h ANDROID: block: make blk_crypto_start_using_mode() properly check for support 2020-04-07 17:58:39 +00:00
blk-crypto.c ANDROID: block: backport the ability to specify max_dun_bytes 2020-05-15 22:01:33 +00:00
blk-exec.c
blk-flush.c BACKPORT: blk-mq: fix is_flush_rq 2021-09-03 05:21:21 -07:00
blk-integrity.c
blk-ioc.c block: Fix use-after-free issue accessing struct io_cq 2020-04-17 10:50:04 +02:00
blk-iocost.c blk-iocost: ioc_pd_free() shouldn't assume irq disabled 2020-09-09 19:12:35 +02:00
blk-iolatency.c
blk-lib.c
blk-map.c block: fix memleak when __blk_rq_map_user_iov() is failed 2020-01-12 12:21:43 +01:00
blk-merge.c block: fix get_max_io_size() 2020-09-28 02:54:35 -07:00
blk-mq-cpumap.c
blk-mq-debugfs-zoned.c
blk-mq-debugfs.c blk-mq-debugfs: update blk_queue_flag_name[] accordingly for new flags 2020-07-22 09:32:52 +02:00
blk-mq-debugfs.h
blk-mq-pci.c
blk-mq-rdma.c
blk-mq-sched.c blk-mq: order adding requests to hctx->dispatch and checking SCHED_RESTART 2020-09-03 11:27:01 +02:00
blk-mq-sched.h block: only call sched requeue_request() for scheduled requests 2020-09-23 12:40:37 +02:00
blk-mq-sysfs.c blk-mq: move cancel of hctx->run_work to the front of blk_exit_queue 2020-10-29 09:57:34 +01:00
blk-mq-tag.c BACKPORT: blk-mq: clear stale request in tags->rq[] before freeing one request pool 2021-09-03 05:19:17 -07:00
blk-mq-tag.h BACKPORT: blk-mq: clear stale request in tags->rq[] before freeing one request pool 2021-09-03 05:19:17 -07:00
blk-mq-virtio.c ANDROID: modularize BLK_MQ_VIRTIO 2020-01-31 16:27:30 -08:00
blk-mq.c BACKPORT: blk-mq: fix is_flush_rq 2021-09-03 05:21:21 -07:00
blk-mq.h BACKPORT: blk-mq: grab rq->refcount before calling ->fn in blk_mq_tagset_busy_iter 2021-09-03 05:17:29 -07:00
blk-pm.c block: Fix a race in the runtime power management code 2020-08-20 12:17:49 +08:00
blk-pm.h
blk-rq-qos.c
blk-rq-qos.h
blk-settings.c block: keep bdi->io_pages in sync with max_sectors_kb for stacked devices 2020-04-17 10:50:01 +02:00
blk-softirq.c
blk-stat.c
blk-stat.h
blk-sysfs.c blk-mq: move cancel of hctx->run_work to the front of blk_exit_queue 2020-10-29 09:57:34 +01:00
blk-throttle.c
blk-timeout.c
blk-wbt.c
blk-wbt.h
blk-zoned.c block: Simplify REQ_OP_ZONE_RESET_ALL handling 2020-12-30 11:50:54 +01:00
blk.h BACKPORT: blk-mq: fix is_flush_rq 2021-09-03 05:21:21 -07:00
bounce.c BACKPORT: FROMLIST: Update Inline Encryption from v5 to v6 of patch series 2020-01-13 18:46:44 +00:00
bsg-lib.c block: Fix the type of 'sts' in bsg_queue_rq() 2020-01-23 08:22:44 +01:00
bsg.c
cmdline-parser.c
compat_ioctl.c
elevator.c Revert "block: Enable BFQ io scheduler as default" 2021-06-27 07:09:30 -07:00
genhd.c
ioctl.c
ioprio.c
Kconfig ANDROID: modularize BLK_MQ_VIRTIO 2020-01-31 16:27:30 -08:00
Kconfig.iosched
keyslot-manager.c ANDROID: block: backport the ability to specify max_dun_bytes 2020-05-15 22:01:33 +00:00
kyber-iosched.c
Makefile BACKPORT: FROMLIST: Update Inline Encryption from v5 to v6 of patch series 2020-01-13 18:46:44 +00:00
mq-deadline.c
opal_proto.h
OWNERS ANDROID: Add OWNERS files referring to the respective android-mainline OWNERS 2021-04-01 13:45:14 +00:00
partition-generic.c
scsi_ioctl.c
sed-opal.c
t10-pi.c