From 6003d048594f42fe653085dc53a94920788dc38f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 3 Dec 2025 16:16:59 +0100 Subject: [PATCH] drop some duplicate commits in 5.15. --- ...-t-add-or-resize-partition-on-the-di.patch | 73 ------------------- ...e-checking-genhd_fl_no_part-to-bdev_.patch | 73 ------------------- queue-5.15/series | 2 - 3 files changed, 148 deletions(-) delete mode 100644 queue-5.15/revert-block-don-t-add-or-resize-partition-on-the-di.patch delete mode 100644 queue-5.15/revert-block-move-checking-genhd_fl_no_part-to-bdev_.patch diff --git a/queue-5.15/revert-block-don-t-add-or-resize-partition-on-the-di.patch b/queue-5.15/revert-block-don-t-add-or-resize-partition-on-the-di.patch deleted file mode 100644 index 542d8a977f..0000000000 --- a/queue-5.15/revert-block-don-t-add-or-resize-partition-on-the-di.patch +++ /dev/null @@ -1,73 +0,0 @@ -From cf477fe84e1ca4677cb1b3c358f48e95facc12da Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 26 Nov 2025 17:54:15 +0000 -Subject: Revert "block: don't add or resize partition on the disk with - GENHD_FL_NO_PART" - -From: Gulam Mohamed - -This reverts commit 1a721de8489fa559ff4471f73c58bb74ac5580d3. - -The commit 1a721de8489f ("block: don't add or resize partition on the disk -with GENHD_FL_NO_PART") and the commit 7777f47f2ea6 ("block: Move checking -GENHD_FL_NO_PART to bdev_add_partition()") used the flag GENHD_FL_NO_PART -to prevent the add or resize of partitions in 5.15 stable kernels.But in -these 5.15 kernels, this is giving an issue with the following error -where the loop driver wants to create a partition when the partscan is -disabled on the loop device: - -dd if=/dev/zero of=loopDisk.dsk bs=1M count=1 seek=10240; -losetup -f loopDisk.dsk;parted -s /dev/loop0 -- mklabel gpt mkpart primary - 2048s 4096s -1+0 records in -1+0 records out -1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0016293 s, 644 MB/s -"" -Error: Partition(s) 1 on /dev/loop0 have been written, but we have been -unable to inform the kernel of the change, probably because it/they are -in use. As a result, the old partition(s) will remain in use. You should -reboot now before making further changes. -"" -If the partition scan is not enabled on the loop device, this flag -GENHD_FL_NO_PART is getting set and when partition creation is tried, -it returns an error EINVAL thereby preventing the creation of partitions. -So, there is no such distinction between disabling of partition scan and -partition creation. - -Later in 6.xxx kernels, the commit b9684a71fca7 ("block, loop: support -partitions without scanning") a new flag GD_SUPPRESS_PART_SCAN was -introduced that just disables the partition scan and uses GENHD_FL_NO_PART -only to prevent creating partition scan. So, the partition creationg can -proceed with even if partition scan is disabled. - -As the commit b9684a71fca7 ("block, loop: support partitions without -scanning") is not available in 5.15 stable kernel, and since there is no -distinction between disabling of "partition scan" and "partition -creation", we need to revert the commits 1a721de8489f and 7777f47f2ea6 -from 5.15 stable kernel to allow partition creation when partscan is -disabled. - -Cc: stable@vger.kernel.org -Signed-off-by: Gulam Mohamed -Signed-off-by: Greg Kroah-Hartman -Signed-off-by: Sasha Levin ---- - block/ioctl.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/block/ioctl.c b/block/ioctl.c -index d25b844412378..a260e39e56a48 100644 ---- a/block/ioctl.c -+++ b/block/ioctl.c -@@ -20,8 +20,6 @@ static int blkpg_do_ioctl(struct block_device *bdev, - struct blkpg_partition p; - sector_t start, length; - -- if (disk->flags & GENHD_FL_NO_PART) -- return -EINVAL; - if (!capable(CAP_SYS_ADMIN)) - return -EACCES; - if (copy_from_user(&p, upart, sizeof(struct blkpg_partition))) --- -2.51.0 - diff --git a/queue-5.15/revert-block-move-checking-genhd_fl_no_part-to-bdev_.patch b/queue-5.15/revert-block-move-checking-genhd_fl_no_part-to-bdev_.patch deleted file mode 100644 index 32079cb15d..0000000000 --- a/queue-5.15/revert-block-move-checking-genhd_fl_no_part-to-bdev_.patch +++ /dev/null @@ -1,73 +0,0 @@ -From f8e2b74a8c26db44964e8cb800305f135fc53f2b Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 26 Nov 2025 17:54:14 +0000 -Subject: Revert "block: Move checking GENHD_FL_NO_PART to - bdev_add_partition()" - -From: Gulam Mohamed - -This reverts commit 7777f47f2ea64efd1016262e7b59fab34adfb869. - -The commit 1a721de8489f ("block: don't add or resize partition on the disk -with GENHD_FL_NO_PART") and the commit 7777f47f2ea6 ("block: Move checking -GENHD_FL_NO_PART to bdev_add_partition()") used the flag GENHD_FL_NO_PART -to prevent the add or resize of partitions in 5.15 stable kernels.But in -these 5.15 kernels, this is giving an issue with the following error -where the loop driver wants to create a partition when the partscan is -disabled on the loop device: - -dd if=/dev/zero of=loopDisk.dsk bs=1M count=1 seek=10240; -losetup -f loopDisk.dsk;parted -s /dev/loop0 -- mklabel gpt mkpart primary - 2048s 4096s -1+0 records in -1+0 records out -1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0016293 s, 644 MB/s -"" -Error: Partition(s) 1 on /dev/loop0 have been written, but we have been -unable to inform the kernel of the change, probably because it/they are -in use. As a result, the old partition(s) will remain in use. You should -reboot now before making further changes. -"" -If the partition scan is not enabled on the loop device, this flag -GENHD_FL_NO_PART is getting set and when partition creation is tried, -it returns an error EINVAL thereby preventing the creation of partitions. -So, there is no such distinction between disabling of partition scan and -partition creation. - -Later in 6.xxx kernels, the commit b9684a71fca7 ("block, loop: support -partitions without scanning") a new flag GD_SUPPRESS_PART_SCAN was -introduced that just disables the partition scan and uses GENHD_FL_NO_PART -only to prevent creating partition scan. So, the partition creationg can -proceed with even if partition scan is disabled. - -As the commit b9684a71fca7 ("block, loop: support partitions without -scanning") is not available in 5.15 stable kernel, and since there is no -distinction between disabling of "partition scan" and "partition -creation", we need to revert the commits 1a721de8489f and 7777f47f2ea6 -from 5.15 stable kernel to allow partition creation when partscan is -disabled. - -Cc: stable@vger.kernel.org -Signed-off-by: Gulam Mohamed -Signed-off-by: Greg Kroah-Hartman -Signed-off-by: Sasha Levin ---- - block/ioctl.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/block/ioctl.c b/block/ioctl.c -index a260e39e56a48..d25b844412378 100644 ---- a/block/ioctl.c -+++ b/block/ioctl.c -@@ -20,6 +20,8 @@ static int blkpg_do_ioctl(struct block_device *bdev, - struct blkpg_partition p; - sector_t start, length; - -+ if (disk->flags & GENHD_FL_NO_PART) -+ return -EINVAL; - if (!capable(CAP_SYS_ADMIN)) - return -EACCES; - if (copy_from_user(&p, upart, sizeof(struct blkpg_partition))) --- -2.51.0 - diff --git a/queue-5.15/series b/queue-5.15/series index a1bc0caa2a..a2648176d5 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -334,8 +334,6 @@ mptcp-fix-a-race-in-mptcp_pm_del_add_timer.patch mptcp-do-not-fallback-when-ooo-is-present.patch revert-block-move-checking-genhd_fl_no_part-to-bdev_add_partition.patch revert-block-don-t-add-or-resize-partition-on-the-disk-with-genhd_fl_no_part.patch -revert-block-move-checking-genhd_fl_no_part-to-bdev_.patch -revert-block-don-t-add-or-resize-partition-on-the-di.patch can-kvaser_usb-leaf-fix-potential-infinite-loop-in-c.patch bluetooth-smp-fix-not-generating-mackey-and-ltk-when.patch platform-x86-intel-punit_ipc-fix-memory-corruption.patch -- 2.47.3