* [PATCH]initrd unmount problem
@ 2001-05-28 4:26 Go Taniguchi
0 siblings, 0 replies; only message in thread
From: Go Taniguchi @ 2001-05-28 4:26 UTC (permalink / raw)
To: LKML
[-- Attachment #1: Type: text/plain, Size: 419 bytes --]
Hi,
It seems that ioctl_by_bdev() in fs/block_dev.c has a problem.
When initrd is unmounted it can cause OOPS.
This problem occurs in recent ac patches.
May be vanilla too.
change_root() in fs/super.c calls ioctl_by_bdev() in
fs/block_dev.c which does not set inode_fake.i_bdev.
But ioctl of ramdisk (rd_ioctl() in rd.c) accesses to
i_bdev->bd_openers of the inode and which causes OOPS.
I attach the patch.
- GO!
[-- Attachment #2: block_dev.c.patch --]
[-- Type: text/plain, Size: 344 bytes --]
--- linux/fs/block_dev.c.orig Mon May 28 12:40:12 2001
+++ linux/fs/block_dev.c Mon May 28 12:40:12 2001
@@ -602,6 +602,7 @@
if (!bdev->bd_op->ioctl)
return -EINVAL;
inode_fake.i_rdev=rdev;
+ inode_fake.i_bdev=bdev;
init_waitqueue_head(&inode_fake.i_wait);
set_fs(KERNEL_DS);
res = bdev->bd_op->ioctl(&inode_fake, NULL, cmd, arg);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-05-28 4:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-28 4:26 [PATCH]initrd unmount problem Go Taniguchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox