linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RFC: sort out get_gendisk abuses
@ 2020-09-25 16:14 Christoph Hellwig
  2020-09-25 16:14 ` [PATCH 1/2] blk-cgroup: stop abusing get_gendisk Christoph Hellwig
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Christoph Hellwig @ 2020-09-25 16:14 UTC (permalink / raw)
  To: Tejun Heo, Jens Axboe, Rafael J. Wysocki, Pavel Machek,
	Len Brown, Minho Ban
  Cc: cgroups, linux-block, linux-kernel, linux-pm

Hi all,

this series tries to remove two abuses of the get_gendisk API.
The first one is fairly straigt forward and switched the blk-cgroup
configuration API to properly open the block device, but I'd love to see
it reviewed and tested by the cgroup maintainers, as I don't really know
how this code is actually used.

The other one in the hibernation code really puzzles me - it busy loops
on the gendisk lookup, just to leak a reference when it finally succeeds
and then doesn't actually do anything with the result.  My proposal for
now is to simply revert the offending change, but better proposals are
welcome.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] blk-cgroup: stop abusing get_gendisk
  2020-09-25 16:14 RFC: sort out get_gendisk abuses Christoph Hellwig
@ 2020-09-25 16:14 ` Christoph Hellwig
  2020-09-25 16:14 ` [PATCH 2/2] PM/hibernate: remove the bogus call to get_gendisk in software_resume Christoph Hellwig
  2020-09-30 16:17 ` RFC: sort out get_gendisk abuses Tejun Heo
  2 siblings, 0 replies; 9+ messages in thread
From: Christoph Hellwig @ 2020-09-25 16:14 UTC (permalink / raw)
  To: Tejun Heo, Jens Axboe, Rafael J. Wysocki, Pavel Machek,
	Len Brown, Minho Ban
  Cc: cgroups, linux-block, linux-kernel, linux-pm

Properly open the device instead of relying on deep internals by
using get_gendisk.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 block/blk-cgroup.c         | 42 +++++++++++++++++++-------------------
 block/blk-iocost.c         | 36 ++++++++++++++++----------------
 include/linux/blk-cgroup.h |  4 ++--
 3 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index f9b55614d67d45..59b3983c84460a 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -556,22 +556,22 @@ static struct blkcg_gq *blkg_lookup_check(struct blkcg *blkcg,
 }
 
 /**
- * blkg_conf_prep - parse and prepare for per-blkg config update
+ * blkcg_conf_open_bdev - parse and open bdev for per-blkg config update
  * @inputp: input string pointer
  *
  * Parse the device node prefix part, MAJ:MIN, of per-blkg config update
- * from @input and get and return the matching gendisk.  *@inputp is
+ * from @input and get and return the matching bdev.  *@inputp is
  * updated to point past the device node prefix.  Returns an ERR_PTR()
  * value on error.
  *
  * Use this function iff blkg_conf_prep() can't be used for some reason.
  */
-struct gendisk *blkcg_conf_get_disk(char **inputp)
+struct block_device *blkcg_conf_open_bdev(char **inputp)
 {
 	char *input = *inputp;
 	unsigned int major, minor;
-	struct gendisk *disk;
-	int key_len, part;
+	struct block_device *bdev;
+	int key_len;
 
 	if (sscanf(input, "%u:%u%n", &major, &minor, &key_len) != 2)
 		return ERR_PTR(-EINVAL);
@@ -581,16 +581,16 @@ struct gendisk *blkcg_conf_get_disk(char **inputp)
 		return ERR_PTR(-EINVAL);
 	input = skip_spaces(input);
 
-	disk = get_gendisk(MKDEV(major, minor), &part);
-	if (!disk)
+	bdev = blkdev_get_by_dev(MKDEV(major, minor), FMODE_READ, NULL);
+	if (!bdev)
 		return ERR_PTR(-ENODEV);
-	if (part) {
-		put_disk_and_module(disk);
+	if (bdev_is_partition(bdev)) {
+		blkdev_put(bdev, FMODE_READ);
 		return ERR_PTR(-ENODEV);
 	}
 
 	*inputp = input;
-	return disk;
+	return bdev;
 }
 
 /**
@@ -607,18 +607,18 @@ struct gendisk *blkcg_conf_get_disk(char **inputp)
  */
 int blkg_conf_prep(struct blkcg *blkcg, const struct blkcg_policy *pol,
 		   char *input, struct blkg_conf_ctx *ctx)
-	__acquires(rcu) __acquires(&disk->queue->queue_lock)
+	__acquires(rcu) __acquires(&bdev->bd_disk->queue->queue_lock)
 {
-	struct gendisk *disk;
+	struct block_device *bdev;
 	struct request_queue *q;
 	struct blkcg_gq *blkg;
 	int ret;
 
-	disk = blkcg_conf_get_disk(&input);
-	if (IS_ERR(disk))
-		return PTR_ERR(disk);
+	bdev = blkcg_conf_open_bdev(&input);
+	if (IS_ERR(bdev))
+		return PTR_ERR(bdev);
 
-	q = disk->queue;
+	q = bdev->bd_disk->queue;
 
 	rcu_read_lock();
 	spin_lock_irq(&q->queue_lock);
@@ -680,7 +680,7 @@ int blkg_conf_prep(struct blkcg *blkcg, const struct blkcg_policy *pol,
 			goto success;
 	}
 success:
-	ctx->disk = disk;
+	ctx->bdev = bdev;
 	ctx->blkg = blkg;
 	ctx->body = input;
 	return 0;
@@ -689,7 +689,7 @@ int blkg_conf_prep(struct blkcg *blkcg, const struct blkcg_policy *pol,
 	spin_unlock_irq(&q->queue_lock);
 	rcu_read_unlock();
 fail:
-	put_disk_and_module(disk);
+	blkdev_put(bdev, FMODE_READ);
 	/*
 	 * If queue was bypassing, we should retry.  Do so after a
 	 * short msleep().  It isn't strictly necessary but queue
@@ -712,11 +712,11 @@ EXPORT_SYMBOL_GPL(blkg_conf_prep);
  * with blkg_conf_prep().
  */
 void blkg_conf_finish(struct blkg_conf_ctx *ctx)
-	__releases(&ctx->disk->queue->queue_lock) __releases(rcu)
+	__releases(&ctx->bdev->bd_disk->queue->queue_lock) __releases(rcu)
 {
-	spin_unlock_irq(&ctx->disk->queue->queue_lock);
+	spin_unlock_irq(&ctx->bdev->bd_disk->queue->queue_lock);
 	rcu_read_unlock();
-	put_disk_and_module(ctx->disk);
+	blkdev_put(ctx->bdev, FMODE_READ);
 }
 EXPORT_SYMBOL_GPL(blkg_conf_finish);
 
diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index b82649c1440bb3..731a09e7e0f4f5 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -3120,23 +3120,23 @@ static const match_table_t qos_tokens = {
 static ssize_t ioc_qos_write(struct kernfs_open_file *of, char *input,
 			     size_t nbytes, loff_t off)
 {
-	struct gendisk *disk;
+	struct block_device *bdev;
 	struct ioc *ioc;
 	u32 qos[NR_QOS_PARAMS];
 	bool enable, user;
 	char *p;
 	int ret;
 
-	disk = blkcg_conf_get_disk(&input);
-	if (IS_ERR(disk))
-		return PTR_ERR(disk);
+	bdev = blkcg_conf_open_bdev(&input);
+	if (IS_ERR(bdev))
+		return PTR_ERR(bdev);
 
-	ioc = q_to_ioc(disk->queue);
+	ioc = q_to_ioc(bdev->bd_disk->queue);
 	if (!ioc) {
-		ret = blk_iocost_init(disk->queue);
+		ret = blk_iocost_init(bdev->bd_disk->queue);
 		if (ret)
 			goto err;
-		ioc = q_to_ioc(disk->queue);
+		ioc = q_to_ioc(bdev->bd_disk->queue);
 	}
 
 	spin_lock_irq(&ioc->lock);
@@ -3231,12 +3231,12 @@ static ssize_t ioc_qos_write(struct kernfs_open_file *of, char *input,
 	ioc_refresh_params(ioc, true);
 	spin_unlock_irq(&ioc->lock);
 
-	put_disk_and_module(disk);
+	blkdev_put(bdev, FMODE_READ);
 	return nbytes;
 einval:
 	ret = -EINVAL;
 err:
-	put_disk_and_module(disk);
+	blkdev_put(bdev, FMODE_READ);
 	return ret;
 }
 
@@ -3287,23 +3287,23 @@ static const match_table_t i_lcoef_tokens = {
 static ssize_t ioc_cost_model_write(struct kernfs_open_file *of, char *input,
 				    size_t nbytes, loff_t off)
 {
-	struct gendisk *disk;
+	struct block_device *bdev;
 	struct ioc *ioc;
 	u64 u[NR_I_LCOEFS];
 	bool user;
 	char *p;
 	int ret;
 
-	disk = blkcg_conf_get_disk(&input);
-	if (IS_ERR(disk))
-		return PTR_ERR(disk);
+	bdev = blkcg_conf_open_bdev(&input);
+	if (IS_ERR(bdev))
+		return PTR_ERR(bdev);
 
-	ioc = q_to_ioc(disk->queue);
+	ioc = q_to_ioc(bdev->bd_disk->queue);
 	if (!ioc) {
-		ret = blk_iocost_init(disk->queue);
+		ret = blk_iocost_init(bdev->bd_disk->queue);
 		if (ret)
 			goto err;
-		ioc = q_to_ioc(disk->queue);
+		ioc = q_to_ioc(bdev->bd_disk->queue);
 	}
 
 	spin_lock_irq(&ioc->lock);
@@ -3356,13 +3356,13 @@ static ssize_t ioc_cost_model_write(struct kernfs_open_file *of, char *input,
 	ioc_refresh_params(ioc, true);
 	spin_unlock_irq(&ioc->lock);
 
-	put_disk_and_module(disk);
+	blkdev_put(bdev, FMODE_READ);
 	return nbytes;
 
 einval:
 	ret = -EINVAL;
 err:
-	put_disk_and_module(disk);
+	blkdev_put(bdev, FMODE_READ);
 	return ret;
 }
 
diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h
index c8fc9792ac776d..b9f3c246c3c908 100644
--- a/include/linux/blk-cgroup.h
+++ b/include/linux/blk-cgroup.h
@@ -197,12 +197,12 @@ void blkcg_print_blkgs(struct seq_file *sf, struct blkcg *blkcg,
 u64 __blkg_prfill_u64(struct seq_file *sf, struct blkg_policy_data *pd, u64 v);
 
 struct blkg_conf_ctx {
-	struct gendisk			*disk;
+	struct block_device		*bdev;
 	struct blkcg_gq			*blkg;
 	char				*body;
 };
 
-struct gendisk *blkcg_conf_get_disk(char **inputp);
+struct block_device *blkcg_conf_open_bdev(char **inputp);
 int blkg_conf_prep(struct blkcg *blkcg, const struct blkcg_policy *pol,
 		   char *input, struct blkg_conf_ctx *ctx);
 void blkg_conf_finish(struct blkg_conf_ctx *ctx);
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] PM/hibernate: remove the bogus call to get_gendisk in software_resume
  2020-09-25 16:14 RFC: sort out get_gendisk abuses Christoph Hellwig
  2020-09-25 16:14 ` [PATCH 1/2] blk-cgroup: stop abusing get_gendisk Christoph Hellwig
@ 2020-09-25 16:14 ` Christoph Hellwig
  2020-09-25 18:38   ` Pavel Machek
  2020-09-30 15:45   ` Rafael J. Wysocki
  2020-09-30 16:17 ` RFC: sort out get_gendisk abuses Tejun Heo
  2 siblings, 2 replies; 9+ messages in thread
From: Christoph Hellwig @ 2020-09-25 16:14 UTC (permalink / raw)
  To: Tejun Heo, Jens Axboe, Rafael J. Wysocki, Pavel Machek,
	Len Brown, Minho Ban
  Cc: cgroups, linux-block, linux-kernel, linux-pm

get_gendisk grabs a reference on the disk and file operation, so this
code will leak both of them while having absolutely no use for the
gendisk itself.

This effectively reverts commit 2df83fa4bce421f
("PM / Hibernate: Use get_gendisk to verify partition if resume_file is integer format")

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 kernel/power/hibernate.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index e7aa57fb2fdc33..7d0b99d2e69631 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -948,17 +948,6 @@ static int software_resume(void)
 
 	/* Check if the device is there */
 	swsusp_resume_device = name_to_dev_t(resume_file);
-
-	/*
-	 * name_to_dev_t is ineffective to verify parition if resume_file is in
-	 * integer format. (e.g. major:minor)
-	 */
-	if (isdigit(resume_file[0]) && resume_wait) {
-		int partno;
-		while (!get_gendisk(swsusp_resume_device, &partno))
-			msleep(10);
-	}
-
 	if (!swsusp_resume_device) {
 		/*
 		 * Some device discovery might still be in progress; we need
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] PM/hibernate: remove the bogus call to get_gendisk in software_resume
  2020-09-25 16:14 ` [PATCH 2/2] PM/hibernate: remove the bogus call to get_gendisk in software_resume Christoph Hellwig
@ 2020-09-25 18:38   ` Pavel Machek
  2020-09-26 14:05     ` Christoph Hellwig
  2020-09-30 15:45   ` Rafael J. Wysocki
  1 sibling, 1 reply; 9+ messages in thread
From: Pavel Machek @ 2020-09-25 18:38 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Tejun Heo, Jens Axboe, Rafael J. Wysocki, Len Brown, Minho Ban,
	cgroups, linux-block, linux-kernel, linux-pm

[-- Attachment #1: Type: text/plain, Size: 1417 bytes --]

Hi!

> get_gendisk grabs a reference on the disk and file operation, so this
> code will leak both of them while having absolutely no use for the
> gendisk itself.
> 
> This effectively reverts commit 2df83fa4bce421f
> ("PM / Hibernate: Use get_gendisk to verify partition if resume_file is integer format")
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  kernel/power/hibernate.c | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
> index e7aa57fb2fdc33..7d0b99d2e69631 100644
> --- a/kernel/power/hibernate.c
> +++ b/kernel/power/hibernate.c
> @@ -948,17 +948,6 @@ static int software_resume(void)
>  
>  	/* Check if the device is there */
>  	swsusp_resume_device = name_to_dev_t(resume_file);
> -
> -	/*
> -	 * name_to_dev_t is ineffective to verify parition if resume_file is in
> -	 * integer format. (e.g. major:minor)
> -	 */
> -	if (isdigit(resume_file[0]) && resume_wait) {
> -		int partno;
> -		while (!get_gendisk(swsusp_resume_device, &partno))
> -			msleep(10);
> -	}

I believe point of this code was to wait for resume device to appear
-- see the resume_wait condition. It should not be simply removed.

Best regards,
								Pavel
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] PM/hibernate: remove the bogus call to get_gendisk in software_resume
  2020-09-25 18:38   ` Pavel Machek
@ 2020-09-26 14:05     ` Christoph Hellwig
  0 siblings, 0 replies; 9+ messages in thread
From: Christoph Hellwig @ 2020-09-26 14:05 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Christoph Hellwig, Tejun Heo, Jens Axboe, Rafael J. Wysocki,
	Len Brown, Minho Ban, cgroups, linux-block, linux-kernel,
	linux-pm

On Fri, Sep 25, 2020 at 08:38:28PM +0200, Pavel Machek wrote:
> > -	 * name_to_dev_t is ineffective to verify parition if resume_file is in
> > -	 * integer format. (e.g. major:minor)
> > -	 */
> > -	if (isdigit(resume_file[0]) && resume_wait) {
> > -		int partno;
> > -		while (!get_gendisk(swsusp_resume_device, &partno))
> > -			msleep(10);
> > -	}
> 
> I believe point of this code was to wait for resume device to appear
> -- see the resume_wait condition. It should not be simply removed.

But get_gendisk has absolutely no relation to a device appearing.  So
whatever this code tried to do doesn't make any sense.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] PM/hibernate: remove the bogus call to get_gendisk in software_resume
  2020-09-25 16:14 ` [PATCH 2/2] PM/hibernate: remove the bogus call to get_gendisk in software_resume Christoph Hellwig
  2020-09-25 18:38   ` Pavel Machek
@ 2020-09-30 15:45   ` Rafael J. Wysocki
  2020-10-02  6:50     ` Christoph Hellwig
  1 sibling, 1 reply; 9+ messages in thread
From: Rafael J. Wysocki @ 2020-09-30 15:45 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Tejun Heo, Jens Axboe, Rafael J. Wysocki, Pavel Machek,
	Len Brown, Minho Ban, cgroups, linux-block,
	Linux Kernel Mailing List, Linux PM

On Fri, Sep 25, 2020 at 6:15 PM Christoph Hellwig <hch@lst.de> wrote:
>
> get_gendisk grabs a reference on the disk and file operation, so this
> code will leak both of them while having absolutely no use for the
> gendisk itself.
>
> This effectively reverts commit 2df83fa4bce421f
> ("PM / Hibernate: Use get_gendisk to verify partition if resume_file is integer format")
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

> ---
>  kernel/power/hibernate.c | 11 -----------
>  1 file changed, 11 deletions(-)
>
> diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
> index e7aa57fb2fdc33..7d0b99d2e69631 100644
> --- a/kernel/power/hibernate.c
> +++ b/kernel/power/hibernate.c
> @@ -948,17 +948,6 @@ static int software_resume(void)
>
>         /* Check if the device is there */
>         swsusp_resume_device = name_to_dev_t(resume_file);
> -
> -       /*
> -        * name_to_dev_t is ineffective to verify parition if resume_file is in
> -        * integer format. (e.g. major:minor)
> -        */
> -       if (isdigit(resume_file[0]) && resume_wait) {
> -               int partno;
> -               while (!get_gendisk(swsusp_resume_device, &partno))
> -                       msleep(10);
> -       }
> -
>         if (!swsusp_resume_device) {
>                 /*
>                  * Some device discovery might still be in progress; we need
> --
> 2.28.0
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFC: sort out get_gendisk abuses
  2020-09-25 16:14 RFC: sort out get_gendisk abuses Christoph Hellwig
  2020-09-25 16:14 ` [PATCH 1/2] blk-cgroup: stop abusing get_gendisk Christoph Hellwig
  2020-09-25 16:14 ` [PATCH 2/2] PM/hibernate: remove the bogus call to get_gendisk in software_resume Christoph Hellwig
@ 2020-09-30 16:17 ` Tejun Heo
  2 siblings, 0 replies; 9+ messages in thread
From: Tejun Heo @ 2020-09-30 16:17 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Jens Axboe, Rafael J. Wysocki, Pavel Machek, Len Brown,
	Minho Ban, cgroups, linux-block, linux-kernel, linux-pm

Hello, Christoph.

On Fri, Sep 25, 2020 at 06:14:45PM +0200, Christoph Hellwig wrote:
> this series tries to remove two abuses of the get_gendisk API.
> The first one is fairly straigt forward and switched the blk-cgroup
> configuration API to properly open the block device, but I'd love to see
> it reviewed and tested by the cgroup maintainers, as I don't really know
> how this code is actually used.

I'm a bit worried that requiring fully opening the device for configuration
can lead to surprising behaviors. A now-unlikely but still possible case
would be trying to configure IO parameters for a device w/ removeable media.
All that the user is trying to do is configuring a bunch of parameters but
the kernel would try to spin up the media and fail configuration and so on.

The use case of needing to access the associated data structures without
fully activating the IO device seems valid to me. Whether that interface is
blkdev_get() or something better abstracted, I don't really care.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] PM/hibernate: remove the bogus call to get_gendisk in software_resume
  2020-09-30 15:45   ` Rafael J. Wysocki
@ 2020-10-02  6:50     ` Christoph Hellwig
  2020-10-02 14:11       ` Rafael J. Wysocki
  0 siblings, 1 reply; 9+ messages in thread
From: Christoph Hellwig @ 2020-10-02  6:50 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Christoph Hellwig, Tejun Heo, Jens Axboe, Rafael J. Wysocki,
	Pavel Machek, Len Brown, Minho Ban, cgroups, linux-block,
	Linux Kernel Mailing List, Linux PM

On Wed, Sep 30, 2020 at 05:45:27PM +0200, Rafael J. Wysocki wrote:
> On Fri, Sep 25, 2020 at 6:15 PM Christoph Hellwig <hch@lst.de> wrote:
> >
> > get_gendisk grabs a reference on the disk and file operation, so this
> > code will leak both of them while having absolutely no use for the
> > gendisk itself.
> >
> > This effectively reverts commit 2df83fa4bce421f
> > ("PM / Hibernate: Use get_gendisk to verify partition if resume_file is integer format")
> >
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> 
> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Can you pick it up through the PM tree?  The big rework in this area
I have planned won't land before 5.11 anyway.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] PM/hibernate: remove the bogus call to get_gendisk in software_resume
  2020-10-02  6:50     ` Christoph Hellwig
@ 2020-10-02 14:11       ` Rafael J. Wysocki
  0 siblings, 0 replies; 9+ messages in thread
From: Rafael J. Wysocki @ 2020-10-02 14:11 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Rafael J. Wysocki, Tejun Heo, Jens Axboe, Rafael J. Wysocki,
	Pavel Machek, Len Brown, Minho Ban, cgroups, linux-block,
	Linux Kernel Mailing List, Linux PM

On Fri, Oct 2, 2020 at 8:50 AM Christoph Hellwig <hch@lst.de> wrote:
>
> On Wed, Sep 30, 2020 at 05:45:27PM +0200, Rafael J. Wysocki wrote:
> > On Fri, Sep 25, 2020 at 6:15 PM Christoph Hellwig <hch@lst.de> wrote:
> > >
> > > get_gendisk grabs a reference on the disk and file operation, so this
> > > code will leak both of them while having absolutely no use for the
> > > gendisk itself.
> > >
> > > This effectively reverts commit 2df83fa4bce421f
> > > ("PM / Hibernate: Use get_gendisk to verify partition if resume_file is integer format")
> > >
> > > Signed-off-by: Christoph Hellwig <hch@lst.de>
> >
> > Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Can you pick it up through the PM tree?  The big rework in this area
> I have planned won't land before 5.11 anyway.

Will do, thanks!

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-10-02 14:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-25 16:14 RFC: sort out get_gendisk abuses Christoph Hellwig
2020-09-25 16:14 ` [PATCH 1/2] blk-cgroup: stop abusing get_gendisk Christoph Hellwig
2020-09-25 16:14 ` [PATCH 2/2] PM/hibernate: remove the bogus call to get_gendisk in software_resume Christoph Hellwig
2020-09-25 18:38   ` Pavel Machek
2020-09-26 14:05     ` Christoph Hellwig
2020-09-30 15:45   ` Rafael J. Wysocki
2020-10-02  6:50     ` Christoph Hellwig
2020-10-02 14:11       ` Rafael J. Wysocki
2020-09-30 16:17 ` RFC: sort out get_gendisk abuses Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).