public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* UML Reboot Panic
@ 2008-08-24 20:49 Tom Spink
  2008-08-25 22:11 ` Jeff Dike
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Spink @ 2008-08-24 20:49 UTC (permalink / raw)
  To: lkml, Jeff Dike

Hi,

When using UML with a UML block device, and issuing a reboot, I was
getting a kernel panic on the next kernel startup because UML was
unable to open the file mapped to the UBD.  I think this is because
the file is not closed when the UBD is released, and the following
patch appears to resolve this issue.  I'm not sure if it's the right
fix, as I may have missed something, but it works for me.

-- Tom

diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index b58fb89..946a171 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -802,6 +802,7 @@ static void ubd_device_release(struct device *dev)
        struct ubd *ubd_dev = dev->driver_data;

        blk_cleanup_queue(ubd_dev->queue);
+       os_close_file(ubd_dev->fd);
        *ubd_dev = ((struct ubd) DEFAULT_UBD);
 }

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

end of thread, other threads:[~2008-08-25 22:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-24 20:49 UML Reboot Panic Tom Spink
2008-08-25 22:11 ` Jeff Dike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox