Patch "axonram: Fix gendisk handling" has been added to the 4.9-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
axonram: Fix gendisk handling
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
axonram-fix-gendisk-handling.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Tue Dec 12 13:26:17 CET 2017
From: Jan Kara <[email protected]>
Date: Wed, 8 Mar 2017 14:56:05 +0100
Subject: axonram: Fix gendisk handling
From: Jan Kara <[email protected]>
[ Upstream commit 672a2c87c83649fb0167202342ce85af9a3b4f1c ]
It is invalid to call del_gendisk() when disk->queue is NULL. Fix error handling in axon_ram_probe() to avoid doing that.
Also del_gendisk() does not drop a reference to gendisk allocated by alloc_disk(). That has to be done by put_disk(). Add that call where needed.
--- arch/powerpc/sysdev/axonram.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/powerpc/sysdev/axonram.c +4 -1
@@ -274,7 +274,9 @@ failed:if (bank->disk->major >0 )unregister_blkdev (bank->disk->major, bank->disk->disk_name); -del_gendisk (bank->disk); +if (bank->disk->flags &GENHD_FL_UP ) +del_gendisk (bank->disk); +put_disk (bank->disk); } device->dev.platform_data =NULL ;if (bank->io_addr !=0 )
@@ -299,6 +301,7 @@ axon_ram_remove(struct platform_device *device_remove_file (&device->dev, &dev_attr_ecc);free_irq (bank->irq_id, device);del_gendisk (bank->disk); +put_disk (bank->disk);iounmap ((void __iomem *) bank->io_addr);kfree (bank);
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/axonram-fix-gendisk-handling.patch