]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop some bfq patches from 4.14 and 4.19
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Jun 2022 14:48:23 +0000 (16:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Jun 2022 14:48:23 +0000 (16:48 +0200)
queue-4.14/bfq-track-whether-bfq_group-is-still-online.patch [deleted file]
queue-4.14/bfq-update-cgroup-information-before-merging-bio.patch [deleted file]
queue-4.14/series
queue-4.19/bfq-track-whether-bfq_group-is-still-online.patch [deleted file]
queue-4.19/bfq-update-cgroup-information-before-merging-bio.patch [deleted file]
queue-4.19/series

diff --git a/queue-4.14/bfq-track-whether-bfq_group-is-still-online.patch b/queue-4.14/bfq-track-whether-bfq_group-is-still-online.patch
deleted file mode 100644 (file)
index 26fac34..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-From 09f871868080c33992cd6a9b72a5ca49582578fa Mon Sep 17 00:00:00 2001
-From: Jan Kara <jack@suse.cz>
-Date: Fri, 1 Apr 2022 12:27:48 +0200
-Subject: bfq: Track whether bfq_group is still online
-
-From: Jan Kara <jack@suse.cz>
-
-commit 09f871868080c33992cd6a9b72a5ca49582578fa upstream.
-
-Track whether bfq_group is still online. We cannot rely on
-blkcg_gq->online because that gets cleared only after all policies are
-offlined and we need something that gets updated already under
-bfqd->lock when we are cleaning up our bfq_group to be able to guarantee
-that when we see online bfq_group, it will stay online while we are
-holding bfqd->lock lock.
-
-CC: stable@vger.kernel.org
-Tested-by: "yukuai (C)" <yukuai3@huawei.com>
-Signed-off-by: Jan Kara <jack@suse.cz>
-Reviewed-by: Christoph Hellwig <hch@lst.de>
-Link: https://lore.kernel.org/r/20220401102752.8599-7-jack@suse.cz
-Signed-off-by: Jens Axboe <axboe@kernel.dk>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- block/bfq-cgroup.c  |    3 ++-
- block/bfq-iosched.h |    2 ++
- 2 files changed, 4 insertions(+), 1 deletion(-)
-
---- a/block/bfq-cgroup.c
-+++ b/block/bfq-cgroup.c
-@@ -442,6 +442,7 @@ static void bfq_pd_init(struct blkg_poli
-                                  */
-       bfqg->bfqd = bfqd;
-       bfqg->active_entities = 0;
-+      bfqg->online = true;
-       bfqg->rq_pos_tree = RB_ROOT;
- }
-@@ -488,7 +489,6 @@ struct bfq_group *bfq_find_set_group(str
-       struct bfq_entity *entity;
-       bfqg = bfq_lookup_bfqg(bfqd, blkcg);
--
-       if (unlikely(!bfqg))
-               return NULL;
-@@ -788,6 +788,7 @@ static void bfq_pd_offline(struct blkg_p
- put_async_queues:
-       bfq_put_async_queues(bfqd, bfqg);
-+      bfqg->online = false;
-       spin_unlock_irqrestore(&bfqd->lock, flags);
-       /*
---- a/block/bfq-iosched.h
-+++ b/block/bfq-iosched.h
-@@ -776,6 +776,8 @@ struct bfq_group {
-       /* reference counter (see comments in bfq_bic_update_cgroup) */
-       int ref;
-+      /* Is bfq_group still online? */
-+      bool online;
-       struct bfq_entity entity;
-       struct bfq_sched_data sched_data;
diff --git a/queue-4.14/bfq-update-cgroup-information-before-merging-bio.patch b/queue-4.14/bfq-update-cgroup-information-before-merging-bio.patch
deleted file mode 100644 (file)
index 2bd76f9..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-From ea591cd4eb270393810e7be01feb8fde6a34fbbe Mon Sep 17 00:00:00 2001
-From: Jan Kara <jack@suse.cz>
-Date: Fri, 1 Apr 2022 12:27:45 +0200
-Subject: bfq: Update cgroup information before merging bio
-
-From: Jan Kara <jack@suse.cz>
-
-commit ea591cd4eb270393810e7be01feb8fde6a34fbbe upstream.
-
-When the process is migrated to a different cgroup (or in case of
-writeback just starts submitting bios associated with a different
-cgroup) bfq_merge_bio() can operate with stale cgroup information in
-bic. Thus the bio can be merged to a request from a different cgroup or
-it can result in merging of bfqqs for different cgroups or bfqqs of
-already dead cgroups and causing possible use-after-free issues. Fix the
-problem by updating cgroup information in bfq_merge_bio().
-
-CC: stable@vger.kernel.org
-Fixes: e21b7a0b9887 ("block, bfq: add full hierarchical scheduling and cgroups support")
-Tested-by: "yukuai (C)" <yukuai3@huawei.com>
-Signed-off-by: Jan Kara <jack@suse.cz>
-Reviewed-by: Christoph Hellwig <hch@lst.de>
-Link: https://lore.kernel.org/r/20220401102752.8599-4-jack@suse.cz
-Signed-off-by: Jens Axboe <axboe@kernel.dk>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- block/bfq-iosched.c |   11 +++++++++--
- 1 file changed, 9 insertions(+), 2 deletions(-)
-
---- a/block/bfq-iosched.c
-+++ b/block/bfq-iosched.c
-@@ -1638,10 +1638,17 @@ static bool bfq_bio_merge(struct blk_mq_
-       spin_lock_irq(&bfqd->lock);
--      if (bic)
-+      if (bic) {
-+              /*
-+               * Make sure cgroup info is uptodate for current process before
-+               * considering the merge.
-+               */
-+              bfq_bic_update_cgroup(bic, bio);
-+
-               bfqd->bio_bfqq = bic_to_bfqq(bic, op_is_sync(bio->bi_opf));
--      else
-+      } else {
-               bfqd->bio_bfqq = NULL;
-+      }
-       bfqd->bio_bic = bic;
-       ret = blk_mq_sched_try_merge(q, bio, &free);
index 1a336c860968fc27a7921f10f4cbf1e6e9a94a21..f912db11be56a0010dcf510f2458081b7374fd11 100644 (file)
@@ -103,8 +103,6 @@ perf-jevents-fix-event-syntax-error-caused-by-extsel.patch
 wifi-mac80211-fix-use-after-free-in-chanctx-code.patch
 iwlwifi-mvm-fix-assert-1f04-upon-reconfig.patch
 fs-writeback-writeback_sb_inodes-recalculate-wrote-according-skipped-pages.patch
-bfq-update-cgroup-information-before-merging-bio.patch
-bfq-track-whether-bfq_group-is-still-online.patch
 ext4-fix-use-after-free-in-ext4_rename_dir_prepare.patch
 ext4-fix-bug_on-in-ext4_writepages.patch
 ext4-verify-dir-block-before-splitting-it.patch
diff --git a/queue-4.19/bfq-track-whether-bfq_group-is-still-online.patch b/queue-4.19/bfq-track-whether-bfq_group-is-still-online.patch
deleted file mode 100644 (file)
index a455e2e..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-From 09f871868080c33992cd6a9b72a5ca49582578fa Mon Sep 17 00:00:00 2001
-From: Jan Kara <jack@suse.cz>
-Date: Fri, 1 Apr 2022 12:27:48 +0200
-Subject: bfq: Track whether bfq_group is still online
-
-From: Jan Kara <jack@suse.cz>
-
-commit 09f871868080c33992cd6a9b72a5ca49582578fa upstream.
-
-Track whether bfq_group is still online. We cannot rely on
-blkcg_gq->online because that gets cleared only after all policies are
-offlined and we need something that gets updated already under
-bfqd->lock when we are cleaning up our bfq_group to be able to guarantee
-that when we see online bfq_group, it will stay online while we are
-holding bfqd->lock lock.
-
-CC: stable@vger.kernel.org
-Tested-by: "yukuai (C)" <yukuai3@huawei.com>
-Signed-off-by: Jan Kara <jack@suse.cz>
-Reviewed-by: Christoph Hellwig <hch@lst.de>
-Link: https://lore.kernel.org/r/20220401102752.8599-7-jack@suse.cz
-Signed-off-by: Jens Axboe <axboe@kernel.dk>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- block/bfq-cgroup.c  |    3 ++-
- block/bfq-iosched.h |    2 ++
- 2 files changed, 4 insertions(+), 1 deletion(-)
-
---- a/block/bfq-cgroup.c
-+++ b/block/bfq-cgroup.c
-@@ -468,6 +468,7 @@ static void bfq_pd_init(struct blkg_poli
-                                  */
-       bfqg->bfqd = bfqd;
-       bfqg->active_entities = 0;
-+      bfqg->online = true;
-       bfqg->rq_pos_tree = RB_ROOT;
- }
-@@ -514,7 +515,6 @@ struct bfq_group *bfq_find_set_group(str
-       struct bfq_entity *entity;
-       bfqg = bfq_lookup_bfqg(bfqd, blkcg);
--
-       if (unlikely(!bfqg))
-               return NULL;
-@@ -814,6 +814,7 @@ static void bfq_pd_offline(struct blkg_p
- put_async_queues:
-       bfq_put_async_queues(bfqd, bfqg);
-+      bfqg->online = false;
-       spin_unlock_irqrestore(&bfqd->lock, flags);
-       /*
---- a/block/bfq-iosched.h
-+++ b/block/bfq-iosched.h
-@@ -854,6 +854,8 @@ struct bfq_group {
-       /* reference counter (see comments in bfq_bic_update_cgroup) */
-       int ref;
-+      /* Is bfq_group still online? */
-+      bool online;
-       struct bfq_entity entity;
-       struct bfq_sched_data sched_data;
diff --git a/queue-4.19/bfq-update-cgroup-information-before-merging-bio.patch b/queue-4.19/bfq-update-cgroup-information-before-merging-bio.patch
deleted file mode 100644 (file)
index 3633bae..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-From ea591cd4eb270393810e7be01feb8fde6a34fbbe Mon Sep 17 00:00:00 2001
-From: Jan Kara <jack@suse.cz>
-Date: Fri, 1 Apr 2022 12:27:45 +0200
-Subject: bfq: Update cgroup information before merging bio
-
-From: Jan Kara <jack@suse.cz>
-
-commit ea591cd4eb270393810e7be01feb8fde6a34fbbe upstream.
-
-When the process is migrated to a different cgroup (or in case of
-writeback just starts submitting bios associated with a different
-cgroup) bfq_merge_bio() can operate with stale cgroup information in
-bic. Thus the bio can be merged to a request from a different cgroup or
-it can result in merging of bfqqs for different cgroups or bfqqs of
-already dead cgroups and causing possible use-after-free issues. Fix the
-problem by updating cgroup information in bfq_merge_bio().
-
-CC: stable@vger.kernel.org
-Fixes: e21b7a0b9887 ("block, bfq: add full hierarchical scheduling and cgroups support")
-Tested-by: "yukuai (C)" <yukuai3@huawei.com>
-Signed-off-by: Jan Kara <jack@suse.cz>
-Reviewed-by: Christoph Hellwig <hch@lst.de>
-Link: https://lore.kernel.org/r/20220401102752.8599-4-jack@suse.cz
-Signed-off-by: Jens Axboe <axboe@kernel.dk>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- block/bfq-iosched.c |   11 +++++++++--
- 1 file changed, 9 insertions(+), 2 deletions(-)
-
---- a/block/bfq-iosched.c
-+++ b/block/bfq-iosched.c
-@@ -1864,10 +1864,17 @@ static bool bfq_bio_merge(struct blk_mq_
-       spin_lock_irq(&bfqd->lock);
--      if (bic)
-+      if (bic) {
-+              /*
-+               * Make sure cgroup info is uptodate for current process before
-+               * considering the merge.
-+               */
-+              bfq_bic_update_cgroup(bic, bio);
-+
-               bfqd->bio_bfqq = bic_to_bfqq(bic, op_is_sync(bio->bi_opf));
--      else
-+      } else {
-               bfqd->bio_bfqq = NULL;
-+      }
-       bfqd->bio_bic = bic;
-       ret = blk_mq_sched_try_merge(q, bio, &free);
index 2d4bd8d3b4ad1ac23b7acd84d258c9f4a737f84b..054a397477ac369997d8ac41c02d229ad25b0322 100644 (file)
@@ -144,8 +144,6 @@ f2fs-fix-deadloop-in-foreground-gc.patch
 wifi-mac80211-fix-use-after-free-in-chanctx-code.patch
 iwlwifi-mvm-fix-assert-1f04-upon-reconfig.patch
 fs-writeback-writeback_sb_inodes-recalculate-wrote-according-skipped-pages.patch
-bfq-update-cgroup-information-before-merging-bio.patch
-bfq-track-whether-bfq_group-is-still-online.patch
 netfilter-nf_tables-disallow-non-stateful-expression-in-sets-earlier.patch
 ext4-fix-use-after-free-in-ext4_rename_dir_prepare.patch
 ext4-fix-bug_on-in-ext4_writepages.patch