[Unionfs] Unionfs 2.0 on 2.6.9 kernel

Beyerle Urs urs.beyerle at psi.ch
Tue Aug 7 04:49:00 EDT 2007


Hi,

I tried unionfs 2.0 on 2.6.9 Redhat Enterprise Kernel (2.6.9-55.0.2.EL). Compiling is no 
problem after commenting out "static inline int atomic_inc_return(atomic_t *v)" in 
fs/unionfs/compat.h. Loading the module also works. But when I try to mount unionfs, for 
example with

# mount -t unionfs -o  dirs=/dir1=rw:/dir2=ro none /mnt/unionfs

I get
mount: Cannot allocate memory

Strace output see below.

Or If running in debug mode (CONFIG_UNIONFS_DEBUG=y) I even get a kernel panic (see 
below). I tried it with linux-2.6.9-u4.diff.gz, linux-2.6.9-u3.diff.gz, 
linux-2.6.9-u2.diff.gz.

Is this related to the problem described in 
http://www.fsl.cs.sunysb.edu/pipermail/unionfs/2007-July/005374.html ?

Any ideas?

Thanks

	Urs



-------------------
# strace mount -t unionfs -o  dirs=/dir1=rw:/dir2=ro none /mnt/unionfs
execve("/bin/mount", ["mount", "-t", "unionfs", "-o", "dirs=/dir1=rw:/dir2=ro", "none", 
"/mnt/unionfs"], [/* 32 vars */]) = 0
uname({sys="Linux", node="tux40", ...}) = 0
brk(0)                                  = 0x921b000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=109856, ...}) = 0
old_mmap(NULL, 109856, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f20000
close(3)                                = 0
open("/lib/tls/libc.so.6", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320>t\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1528744, ...}) = 0
old_mmap(0x72f000, 1223900, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x72f000
old_mmap(0x854000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 
0x124000) = 0x854000
old_mmap(0x858000, 7388, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) 
= 0x858000
close(3)                                = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f1f000
mprotect(0x854000, 8192, PROT_READ)     = 0
mprotect(0x72b000, 4096, PROT_READ)     = 0
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7f1faa0, limit:1048575, seg_32bit:1, 
contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
munmap(0xb7f20000, 109856)              = 0
brk(0)                                  = 0x921b000
brk(0x923c000)                          = 0x923c000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=48516960, ...}) = 0
mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7d1f000
close(3)                                = 0
umask(022)                              = 022
open("/dev/null", O_RDWR|O_LARGEFILE)   = 3
close(3)                                = 0
getuid32()                              = 0
geteuid32()                             = 0
lstat64("/etc/mtab", {st_mode=S_IFREG|0644, st_size=443, ...}) = 0
stat64("/sbin/mount.unionfs", 0xbfee4840) = -1 ENOENT (No such file or directory)
rt_sigprocmask(SIG_BLOCK, ~[TRAP SEGV RTMIN RT_1], NULL, 8) = 0
mount("none", "/mnt/unionfs", "unionfs", MS_MGC_VAL, "dirs=/dir1=rw:/dir2=ro") = -1 ENOMEM 
(Cannot allocate memory)
rt_sigprocmask(SIG_UNBLOCK, ~[TRAP SEGV RTMIN RT_1], NULL, 8) = 0
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2528, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7d1e000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2528
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0xb7d1e000, 4096)                = 0
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such 
file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such 
file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or 
directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file 
or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file 
or directory)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or 
directory)
write(2, "mount: Cannot allocate memory\n", 30mount: Cannot allocate memory
) = 30
exit_group(32)                          = ?
Process 4161 detached




------------------
Aug  6 13:22:26 tux40 kernel: Registering unionfs 2.0
Aug  6 13:22:48 tux40 kernel: Unable to handle kernel NULL pointer dereference at virtual 
address 00000028
Aug  6 13:22:48 tux40 kernel:  printing eip:
Aug  6 13:22:48 tux40 kernel: f8cbf09b
Aug  6 13:22:48 tux40 kernel: *pde = 00000000
Aug  6 13:22:48 tux40 kernel: Oops: 0000 [#1]
Aug  6 13:22:48 tux40 kernel: Modules linked in: unionfs(U) libafs(U) cisco_ipsec(U) md5 
ipv6 autofs4 i2c_dev i2c_c
ore sunrpc dm_mirror dm_mod button battery ac pcnet32 mii floppy ata_piix libata scsi_mod 
ext3 jbd
Aug  6 13:22:48 tux40 kernel: CPU:    0
Aug  6 13:22:48 tux40 kernel: EIP:    0060:[<f8cbf09b>]    Tainted: PF     VLI
Aug  6 13:22:48 tux40 kernel: EFLAGS: 00010282   (2.6.9-55.0.2.EL)
Aug  6 13:22:48 tux40 kernel: EIP is at __unionfs_check_dentry+0x43/0x70c [unionfs]
Aug  6 13:22:48 tux40 kernel: eax: 00000000   ebx: f5568c00   ecx: f8cbfcd9   edx: e401d438
Aug  6 13:22:48 tux40 kernel: esi: f5568c08   edi: e401d438   ebp: c39c2f00   esp: d5da2e4c
Aug  6 13:22:48 tux40 kernel: ds: 007b   es: 007b   ss: 0068
Aug  6 13:22:48 tux40 kernel: Process mount (pid: 22693, threadinfo=d5da2000 task=f702f770)
Aug  6 13:22:48 tux40 kernel: Stack: 00000000 d4acd000 00000000 e401d438 00000002 f8cbfcd9 
f8cc0093 e401d438
Aug  6 13:22:48 tux40 kernel:        f5568c00 f5568c08 e401d438 c39c2f00 f8cb1f3e 000001b6 
e401d438 e401d438
Aug  6 13:22:48 tux40 kernel:        d4acd000 c0185a5b e401d438 c0185e91 00000001 00000002 
f8cb64c5 00000000
Aug  6 13:22:48 tux40 kernel: Call Trace:
Aug  6 13:22:48 tux40 kernel:  [<f8cb1f3e>] unionfs_d_release+0x47/0x164 [unionfs]
Aug  6 13:22:48 tux40 kernel:  [<c0185a5b>] d_free+0x15/0x36
Aug  6 13:22:48 tux40 kernel:  [<c0185e91>] dput+0x415/0x423
Aug  6 13:22:48 tux40 kernel:  [<f8cb64c5>] unionfs_read_super+0x224/0x2c0 [unionfs]
Aug  6 13:22:48 tux40 kernel:  [<c017448d>] get_sb_nodev+0x33/0x62
Aug  6 13:22:48 tux40 kernel:  [<f8cb656f>] unionfs_get_sb+0xe/0x10 [unionfs]
Aug  6 13:22:48 tux40 kernel:  [<f8cb62a1>] unionfs_read_super+0x0/0x2c0 [unionfs]
Aug  6 13:22:48 tux40 kernel:  [<c01745c5>] do_kern_mount+0x8a/0x144
Aug  6 13:22:48 tux40 kernel:  [<c018f25b>] do_new_mount+0x61/0x90
Aug  6 13:22:48 tux40 kernel:  [<c018fcd9>] do_mount+0x178/0x190
Aug  6 13:22:48 tux40 kernel:  [<c014f754>] __alloc_pages+0xb4/0x2a6
Aug  6 13:22:48 tux40 kernel:  [<c019018e>] sys_mount+0x10d/0x1df
Aug  6 13:22:48 tux40 kernel:  [<c031af83>] syscall_call+0x7/0xb
Aug  6 13:22:48 tux40 kernel: Code: 00 00 00 00 75 08 0f 0b 7e 00 99 1e cc f8 8b 44 24 1c 
8b 54 24 1c 8b 40 60 89 44 24 04 8b 52 20 89 54 24 08 8b 54 24 1c 8b 42 64 <8b> 50 28 89 
54 24 10 8b 40 2c 39 c2 89 44 24 0c 7e 08 0f 0b 83
Aug  6 13:22:48 tux40 kernel:  <0>Fatal exception: panic in 5 seconds



More information about the unionfs mailing list