rpms/kernel/FC-5 linux-2.6-fs-hfs-mokb.patch,NONE,1.1

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Nov 17 13:48:33 UTC 2006


Author: quintela

Update of /cvs/dist/rpms/kernel/FC-5
In directory cvs.devel.redhat.com:/tmp/cvs-serv15129

Added Files:
	linux-2.6-fs-hfs-mokb.patch 
Log Message:
davej forgot to add it to FC-5 & I need to compile a kernel

linux-2.6-fs-hfs-mokb.patch:
 super.c |    1 +
 1 files changed, 1 insertion(+)

--- NEW FILE linux-2.6-fs-hfs-mokb.patch ---

http://kernelfun.blogspot.com/2006/11/mokb-14-11-2006-linux-26x-selinux.html

mount that image...
fs: filesystem was not cleanly unmounted, running fsck.hfs is recommended.  mounting read-only.
hfs: get root inode failed.
BUG: unable to handle kernel NULL pointer dereference at virtual address 00000018
 printing eip
...
EIP is at superblock_doinit+0x21/0x767
...
 [] selinux_sb_kern_mount+0xc/0x4b
 [] vfs_kern_mount+0x99/0xf6
 [] do_kern_mount+0x2d/0x3e
 [] do_mount+0x5fa/0x66d
 [] sys_mount+0x77/0xae
 [] syscall_call+0x7/0xb
DWARF2 unwinder stuck at syscall_call+0x7/0xb

hfs_fill_super() returns success even if 
  root_inode = hfs_iget(sb, &fd.search_key->cat, &rec);
or
  sb->s_root = d_alloc_root(root_inode);

fails.  This superblock finds its way to superblock_doinit() which does:

        struct dentry *root = sb->s_root;
        struct inode *inode = root->d_inode;

and boom.  Need to make sure the error cases return an error, I think.

Signed-off-by: Eric Sandeen <sandeen at redhat.com>

Index: linux-2.6.18/fs/hfs/super.c
===================================================================
--- linux-2.6.18.orig/fs/hfs/super.c
+++ linux-2.6.18/fs/hfs/super.c
@@ -391,6 +391,7 @@ static int hfs_fill_super(struct super_b
 		hfs_find_exit(&fd);
 		goto bail_no_root;
 	}
+	res = -EINVAL;
 	root_inode = hfs_iget(sb, &fd.search_key->cat, &rec);
 	hfs_find_exit(&fd);
 	if (!root_inode)






More information about the fedora-cvs-commits mailing list