From: Greg Kroah-Hartman Date: Thu, 16 Sep 2021 08:37:33 +0000 (+0200) Subject: 5.10-stable patches X-Git-Tag: v5.14.5~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ad87442845aea15b6a93f5049defd3395ac54de8;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: revert-block-nbd-add-sanity-check-for-first_minor.patch --- diff --git a/queue-5.10/revert-block-nbd-add-sanity-check-for-first_minor.patch b/queue-5.10/revert-block-nbd-add-sanity-check-for-first_minor.patch new file mode 100644 index 00000000000..0688238806b --- /dev/null +++ b/queue-5.10/revert-block-nbd-add-sanity-check-for-first_minor.patch @@ -0,0 +1,44 @@ +From edf59055b2b832f4a57f6b1787812c368599ce9d Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Thu, 16 Sep 2021 10:17:11 +0200 +Subject: Revert "block: nbd: add sanity check for first_minor" + +From: Greg Kroah-Hartman + +This reverts commit 4b21d4e820bb9a1415ec76dfe565e4c5937337dd which is +commit b1a811633f7321cf1ae2bb76a66805b7720e44c9 upstream. + +The backport of this is reported to be causing some problems, so revert +this for now until they are worked out. + +Link: https://lore.kernel.org/r/CACPK8XfUWoOHr-0RwRoYoskia4fbAbZ7DYf5wWBnv6qUnGq18w@mail.gmail.com +Reported-by: Joel Stanley +Cc: Christoph Hellwig +Cc: Pavel Skripkin +Cc: Jens Axboe +Cc: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +--- + drivers/block/nbd.c | 10 ---------- + 1 file changed, 10 deletions(-) + +--- a/drivers/block/nbd.c ++++ b/drivers/block/nbd.c +@@ -1759,17 +1759,7 @@ static int nbd_dev_add(int index) + refcount_set(&nbd->refs, 1); + INIT_LIST_HEAD(&nbd->list); + disk->major = NBD_MAJOR; +- +- /* Too big first_minor can cause duplicate creation of +- * sysfs files/links, since first_minor will be truncated to +- * byte in __device_add_disk(). +- */ + disk->first_minor = index << part_shift; +- if (disk->first_minor > 0xff) { +- err = -EINVAL; +- goto out_free_idr; +- } +- + disk->fops = &nbd_fops; + disk->private_data = nbd; + sprintf(disk->disk_name, "nbd%d", index); diff --git a/queue-5.10/series b/queue-5.10/series index b68a5c96847..d755193c467 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -281,3 +281,4 @@ net-w5100-check-return-value-after-calling-platform_.patch net-hns3-clean-up-a-type-mismatch-warning.patch fs-io_uring-don-t-use-the-return-value-from-import_i.patch io_uring-remove-duplicated-io_size-from-rw.patch +revert-block-nbd-add-sanity-check-for-first_minor.patch