]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop 2 patches from 6.1 and 6.2
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Mar 2023 15:25:07 +0000 (16:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Mar 2023 15:25:07 +0000 (16:25 +0100)
queue-6.1/block-fix-scan-partition-for-exclusively-open-device-again.patch [deleted file]
queue-6.1/sched-fair-sanitize-vruntime-of-entity-being-placed.patch [deleted file]
queue-6.1/series
queue-6.2/block-fix-scan-partition-for-exclusively-open-device-again.patch [deleted file]
queue-6.2/sched-fair-sanitize-vruntime-of-entity-being-placed.patch [deleted file]
queue-6.2/series

diff --git a/queue-6.1/block-fix-scan-partition-for-exclusively-open-device-again.patch b/queue-6.1/block-fix-scan-partition-for-exclusively-open-device-again.patch
deleted file mode 100644 (file)
index 782a2ae..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-From e5cfefa97bccf956ea0bb6464c1f6c84fd7a8d9f Mon Sep 17 00:00:00 2001
-From: Yu Kuai <yukuai3@huawei.com>
-Date: Fri, 17 Feb 2023 10:22:00 +0800
-Subject: block: fix scan partition for exclusively open device again
-
-From: Yu Kuai <yukuai3@huawei.com>
-
-commit e5cfefa97bccf956ea0bb6464c1f6c84fd7a8d9f upstream.
-
-As explained in commit 36369f46e917 ("block: Do not reread partition table
-on exclusively open device"), reread partition on the device that is
-exclusively opened by someone else is problematic.
-
-This patch will make sure partition scan will only be proceed if current
-thread open the device exclusively, or the device is not opened
-exclusively, and in the later case, other scanners and exclusive openers
-will be blocked temporarily until partition scan is done.
-
-Fixes: 10c70d95c0f2 ("block: remove the bd_openers checks in blk_drop_partitions")
-Cc: <stable@vger.kernel.org>
-Suggested-by: Jan Kara <jack@suse.cz>
-Signed-off-by: Yu Kuai <yukuai3@huawei.com>
-Reviewed-by: Christoph Hellwig <hch@lst.de>
-Link: https://lore.kernel.org/r/20230217022200.3092987-3-yukuai1@huaweicloud.com
-Signed-off-by: Jens Axboe <axboe@kernel.dk>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- block/genhd.c |   30 ++++++++++++++++++++++++++----
- block/ioctl.c |    3 +--
- 2 files changed, 27 insertions(+), 6 deletions(-)
-
---- a/block/genhd.c
-+++ b/block/genhd.c
-@@ -359,6 +359,7 @@ EXPORT_SYMBOL_GPL(disk_uevent);
- int disk_scan_partitions(struct gendisk *disk, fmode_t mode, void *owner)
- {
-       struct block_device *bdev;
-+      int ret = 0;
-       if (disk->flags & (GENHD_FL_NO_PART | GENHD_FL_HIDDEN))
-               return -EINVAL;
-@@ -371,11 +372,27 @@ int disk_scan_partitions(struct gendisk
-               return -EBUSY;
-       set_bit(GD_NEED_PART_SCAN, &disk->state);
--      bdev = blkdev_get_by_dev(disk_devt(disk), mode, NULL);
-+      /*
-+       * If the device is opened exclusively by current thread already, it's
-+       * safe to scan partitons, otherwise, use bd_prepare_to_claim() to
-+       * synchronize with other exclusive openers and other partition
-+       * scanners.
-+       */
-+      if (!(mode & FMODE_EXCL)) {
-+              ret = bd_prepare_to_claim(disk->part0, disk_scan_partitions);
-+              if (ret)
-+                      return ret;
-+      }
-+
-+      bdev = blkdev_get_by_dev(disk_devt(disk), mode & ~FMODE_EXCL, NULL);
-       if (IS_ERR(bdev))
--              return PTR_ERR(bdev);
--      blkdev_put(bdev, mode);
--      return 0;
-+              ret =  PTR_ERR(bdev);
-+      else
-+              blkdev_put(bdev, mode);
-+
-+      if (!(mode & FMODE_EXCL))
-+              bd_abort_claiming(disk->part0, disk_scan_partitions);
-+      return ret;
- }
- /**
-@@ -501,6 +518,11 @@ int __must_check device_add_disk(struct
-               if (ret)
-                       goto out_unregister_bdi;
-+              /* Make sure the first partition scan will be proceed */
-+              if (get_capacity(disk) && !(disk->flags & GENHD_FL_NO_PART) &&
-+                  !test_bit(GD_SUPPRESS_PART_SCAN, &disk->state))
-+                      set_bit(GD_NEED_PART_SCAN, &disk->state);
-+
-               bdev_add(disk->part0, ddev->devt);
-               if (get_capacity(disk))
-                       disk_scan_partitions(disk, FMODE_READ, NULL);
---- a/block/ioctl.c
-+++ b/block/ioctl.c
-@@ -528,8 +528,7 @@ static int blkdev_common_ioctl(struct fi
-                       return -EACCES;
-               if (bdev_is_partition(bdev))
-                       return -EINVAL;
--              return disk_scan_partitions(bdev->bd_disk, mode & ~FMODE_EXCL,
--                                          file);
-+              return disk_scan_partitions(bdev->bd_disk, mode, file);
-       case BLKTRACESTART:
-       case BLKTRACESTOP:
-       case BLKTRACETEARDOWN:
diff --git a/queue-6.1/sched-fair-sanitize-vruntime-of-entity-being-placed.patch b/queue-6.1/sched-fair-sanitize-vruntime-of-entity-being-placed.patch
deleted file mode 100644 (file)
index b9199ac..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-From 1060dbce9da5fa5466b2cfd66c0867705e2972fc Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 30 Jan 2023 13:22:16 +0100
-Subject: sched/fair: sanitize vruntime of entity being placed
-
-From: Zhang Qiao <zhangqiao22@huawei.com>
-
-[ Upstream commit 829c1651e9c4a6f78398d3e67651cef9bb6b42cc ]
-
-When a scheduling entity is placed onto cfs_rq, its vruntime is pulled
-to the base level (around cfs_rq->min_vruntime), so that the entity
-doesn't gain extra boost when placed backwards.
-
-However, if the entity being placed wasn't executed for a long time, its
-vruntime may get too far behind (e.g. while cfs_rq was executing a
-low-weight hog), which can inverse the vruntime comparison due to s64
-overflow.  This results in the entity being placed with its original
-vruntime way forwards, so that it will effectively never get to the cpu.
-
-To prevent that, ignore the vruntime of the entity being placed if it
-didn't execute for much longer than the characteristic sheduler time
-scale.
-
-[rkagan: formatted, adjusted commit log, comments, cutoff value]
-Signed-off-by: Zhang Qiao <zhangqiao22@huawei.com>
-Co-developed-by: Roman Kagan <rkagan@amazon.de>
-Signed-off-by: Roman Kagan <rkagan@amazon.de>
-Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
-Link: https://lkml.kernel.org/r/20230130122216.3555094-1-rkagan@amazon.de
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- kernel/sched/fair.c | 15 +++++++++++++--
- 1 file changed, 13 insertions(+), 2 deletions(-)
-
-diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
-index 2c3d0d49c80ea..a976e80920594 100644
---- a/kernel/sched/fair.c
-+++ b/kernel/sched/fair.c
-@@ -4640,6 +4640,7 @@ static void
- place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
- {
-       u64 vruntime = cfs_rq->min_vruntime;
-+      u64 sleep_time;
-       /*
-        * The 'current' period is already promised to the current tasks,
-@@ -4669,8 +4670,18 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
-               vruntime -= thresh;
-       }
--      /* ensure we never gain time by being placed backwards. */
--      se->vruntime = max_vruntime(se->vruntime, vruntime);
-+      /*
-+       * Pull vruntime of the entity being placed to the base level of
-+       * cfs_rq, to prevent boosting it if placed backwards.  If the entity
-+       * slept for a long time, don't even try to compare its vruntime with
-+       * the base as it may be too far off and the comparison may get
-+       * inversed due to s64 overflow.
-+       */
-+      sleep_time = rq_clock_task(rq_of(cfs_rq)) - se->exec_start;
-+      if ((s64)sleep_time > 60LL * NSEC_PER_SEC)
-+              se->vruntime = vruntime;
-+      else
-+              se->vruntime = max_vruntime(se->vruntime, vruntime);
- }
- static void check_enqueue_throttle(struct cfs_rq *cfs_rq);
--- 
-2.39.2
-
index f783e90f7cae773f3cb5072fed22a05fe2520d56..1864c5e1c02097f34ae2b3a472c6a91ee79d1c81 100644 (file)
@@ -535,7 +535,6 @@ blk-iocost-fix-divide-by-0-error-in-calc_lcoefs.patch
 blk-cgroup-dropping-parent-refcount-after-pd_free_fn.patch
 blk-cgroup-synchronize-pd_free_fn-from-blkg_free_wor.patch
 trace-blktrace-fix-memory-leak-with-using-debugfs_lo.patch
-sched-fair-sanitize-vruntime-of-entity-being-placed.patch
 btrfs-scrub-improve-tree-block-error-reporting.patch
 arm64-zynqmp-enable-hs-termination-flag-for-usb-dwc3.patch
 cpuidle-intel_idle-fix-cpuidle_flag_init_xstate.patch
@@ -821,7 +820,6 @@ fuse-add-inode-permission-checks-to-fileattr_get-fileattr_set.patch
 rbd-avoid-use-after-free-in-do_rbd_add-when-rbd_dev_create-fails.patch
 ceph-update-the-time-stamps-and-try-to-drop-the-suid-sgid.patch
 regulator-core-use-ktime_get_boottime-to-determine-how-long-a-regulator-was-off.patch
-block-fix-scan-partition-for-exclusively-open-device-again.patch
 panic-fix-the-panic_print-nmi-backtrace-setting.patch
 mm-hwpoison-convert-ttu_ignore_hwpoison-to-ttu_hwpoison.patch
 alpha-fix-fen-fault-handling.patch
diff --git a/queue-6.2/block-fix-scan-partition-for-exclusively-open-device-again.patch b/queue-6.2/block-fix-scan-partition-for-exclusively-open-device-again.patch
deleted file mode 100644 (file)
index 5a2bd3c..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-From e5cfefa97bccf956ea0bb6464c1f6c84fd7a8d9f Mon Sep 17 00:00:00 2001
-From: Yu Kuai <yukuai3@huawei.com>
-Date: Fri, 17 Feb 2023 10:22:00 +0800
-Subject: block: fix scan partition for exclusively open device again
-
-From: Yu Kuai <yukuai3@huawei.com>
-
-commit e5cfefa97bccf956ea0bb6464c1f6c84fd7a8d9f upstream.
-
-As explained in commit 36369f46e917 ("block: Do not reread partition table
-on exclusively open device"), reread partition on the device that is
-exclusively opened by someone else is problematic.
-
-This patch will make sure partition scan will only be proceed if current
-thread open the device exclusively, or the device is not opened
-exclusively, and in the later case, other scanners and exclusive openers
-will be blocked temporarily until partition scan is done.
-
-Fixes: 10c70d95c0f2 ("block: remove the bd_openers checks in blk_drop_partitions")
-Cc: <stable@vger.kernel.org>
-Suggested-by: Jan Kara <jack@suse.cz>
-Signed-off-by: Yu Kuai <yukuai3@huawei.com>
-Reviewed-by: Christoph Hellwig <hch@lst.de>
-Link: https://lore.kernel.org/r/20230217022200.3092987-3-yukuai1@huaweicloud.com
-Signed-off-by: Jens Axboe <axboe@kernel.dk>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- block/genhd.c |   30 ++++++++++++++++++++++++++----
- block/ioctl.c |    3 +--
- 2 files changed, 27 insertions(+), 6 deletions(-)
-
---- a/block/genhd.c
-+++ b/block/genhd.c
-@@ -359,6 +359,7 @@ EXPORT_SYMBOL_GPL(disk_uevent);
- int disk_scan_partitions(struct gendisk *disk, fmode_t mode, void *owner)
- {
-       struct block_device *bdev;
-+      int ret = 0;
-       if (disk->flags & (GENHD_FL_NO_PART | GENHD_FL_HIDDEN))
-               return -EINVAL;
-@@ -371,11 +372,27 @@ int disk_scan_partitions(struct gendisk
-               return -EBUSY;
-       set_bit(GD_NEED_PART_SCAN, &disk->state);
--      bdev = blkdev_get_by_dev(disk_devt(disk), mode, NULL);
-+      /*
-+       * If the device is opened exclusively by current thread already, it's
-+       * safe to scan partitons, otherwise, use bd_prepare_to_claim() to
-+       * synchronize with other exclusive openers and other partition
-+       * scanners.
-+       */
-+      if (!(mode & FMODE_EXCL)) {
-+              ret = bd_prepare_to_claim(disk->part0, disk_scan_partitions);
-+              if (ret)
-+                      return ret;
-+      }
-+
-+      bdev = blkdev_get_by_dev(disk_devt(disk), mode & ~FMODE_EXCL, NULL);
-       if (IS_ERR(bdev))
--              return PTR_ERR(bdev);
--      blkdev_put(bdev, mode);
--      return 0;
-+              ret =  PTR_ERR(bdev);
-+      else
-+              blkdev_put(bdev, mode);
-+
-+      if (!(mode & FMODE_EXCL))
-+              bd_abort_claiming(disk->part0, disk_scan_partitions);
-+      return ret;
- }
- /**
-@@ -497,6 +514,11 @@ int __must_check device_add_disk(struct
-               if (ret)
-                       goto out_unregister_bdi;
-+              /* Make sure the first partition scan will be proceed */
-+              if (get_capacity(disk) && !(disk->flags & GENHD_FL_NO_PART) &&
-+                  !test_bit(GD_SUPPRESS_PART_SCAN, &disk->state))
-+                      set_bit(GD_NEED_PART_SCAN, &disk->state);
-+
-               bdev_add(disk->part0, ddev->devt);
-               if (get_capacity(disk))
-                       disk_scan_partitions(disk, FMODE_READ, NULL);
---- a/block/ioctl.c
-+++ b/block/ioctl.c
-@@ -528,8 +528,7 @@ static int blkdev_common_ioctl(struct fi
-                       return -EACCES;
-               if (bdev_is_partition(bdev))
-                       return -EINVAL;
--              return disk_scan_partitions(bdev->bd_disk, mode & ~FMODE_EXCL,
--                                          file);
-+              return disk_scan_partitions(bdev->bd_disk, mode, file);
-       case BLKTRACESTART:
-       case BLKTRACESTOP:
-       case BLKTRACETEARDOWN:
diff --git a/queue-6.2/sched-fair-sanitize-vruntime-of-entity-being-placed.patch b/queue-6.2/sched-fair-sanitize-vruntime-of-entity-being-placed.patch
deleted file mode 100644 (file)
index 5ac4ec0..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-From 486bd7470ca8f8ab6fb1e6720bad3313d9c6d1d6 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Mon, 30 Jan 2023 13:22:16 +0100
-Subject: sched/fair: sanitize vruntime of entity being placed
-
-From: Zhang Qiao <zhangqiao22@huawei.com>
-
-[ Upstream commit 829c1651e9c4a6f78398d3e67651cef9bb6b42cc ]
-
-When a scheduling entity is placed onto cfs_rq, its vruntime is pulled
-to the base level (around cfs_rq->min_vruntime), so that the entity
-doesn't gain extra boost when placed backwards.
-
-However, if the entity being placed wasn't executed for a long time, its
-vruntime may get too far behind (e.g. while cfs_rq was executing a
-low-weight hog), which can inverse the vruntime comparison due to s64
-overflow.  This results in the entity being placed with its original
-vruntime way forwards, so that it will effectively never get to the cpu.
-
-To prevent that, ignore the vruntime of the entity being placed if it
-didn't execute for much longer than the characteristic sheduler time
-scale.
-
-[rkagan: formatted, adjusted commit log, comments, cutoff value]
-Signed-off-by: Zhang Qiao <zhangqiao22@huawei.com>
-Co-developed-by: Roman Kagan <rkagan@amazon.de>
-Signed-off-by: Roman Kagan <rkagan@amazon.de>
-Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
-Link: https://lkml.kernel.org/r/20230130122216.3555094-1-rkagan@amazon.de
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- kernel/sched/fair.c | 15 +++++++++++++--
- 1 file changed, 13 insertions(+), 2 deletions(-)
-
-diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
-index 0f87369914274..717c3ca970e15 100644
---- a/kernel/sched/fair.c
-+++ b/kernel/sched/fair.c
-@@ -4656,6 +4656,7 @@ static void
- place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
- {
-       u64 vruntime = cfs_rq->min_vruntime;
-+      u64 sleep_time;
-       /*
-        * The 'current' period is already promised to the current tasks,
-@@ -4685,8 +4686,18 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
-               vruntime -= thresh;
-       }
--      /* ensure we never gain time by being placed backwards. */
--      se->vruntime = max_vruntime(se->vruntime, vruntime);
-+      /*
-+       * Pull vruntime of the entity being placed to the base level of
-+       * cfs_rq, to prevent boosting it if placed backwards.  If the entity
-+       * slept for a long time, don't even try to compare its vruntime with
-+       * the base as it may be too far off and the comparison may get
-+       * inversed due to s64 overflow.
-+       */
-+      sleep_time = rq_clock_task(rq_of(cfs_rq)) - se->exec_start;
-+      if ((s64)sleep_time > 60LL * NSEC_PER_SEC)
-+              se->vruntime = vruntime;
-+      else
-+              se->vruntime = max_vruntime(se->vruntime, vruntime);
- }
- static void check_enqueue_throttle(struct cfs_rq *cfs_rq);
--- 
-2.39.2
-
index b170550c3c5ff79425a0e999dae839e314d6480a..a1685b0018b61ba16de95e706895e22e0d17179f 100644 (file)
@@ -626,7 +626,6 @@ blk-iocost-fix-divide-by-0-error-in-calc_lcoefs.patch
 blk-cgroup-dropping-parent-refcount-after-pd_free_fn.patch
 blk-cgroup-synchronize-pd_free_fn-from-blkg_free_wor.patch
 trace-blktrace-fix-memory-leak-with-using-debugfs_lo.patch
-sched-fair-sanitize-vruntime-of-entity-being-placed.patch
 btrfs-scrub-improve-tree-block-error-reporting.patch
 arm64-zynqmp-enable-hs-termination-flag-for-usb-dwc3.patch
 cpuidle-intel_idle-fix-cpuidle_flag_init_xstate.patch
@@ -931,7 +930,6 @@ fuse-add-inode-permission-checks-to-fileattr_get-fileattr_set.patch
 rbd-avoid-use-after-free-in-do_rbd_add-when-rbd_dev_create-fails.patch
 ceph-update-the-time-stamps-and-try-to-drop-the-suid-sgid.patch
 regulator-core-use-ktime_get_boottime-to-determine-how-long-a-regulator-was-off.patch
-block-fix-scan-partition-for-exclusively-open-device-again.patch
 panic-fix-the-panic_print-nmi-backtrace-setting.patch
 mm-hwpoison-convert-ttu_ignore_hwpoison-to-ttu_hwpoison.patch
 genirq-msi-platform-msi-ensure-that-msi-descriptors-are-unreferenced.patch