NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/45111: tmpfs panic with mknod(2)



>Number:         45111
>Category:       kern
>Synopsis:       tmpfs panic with mknod(2)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 03 07:35:00 +0000 2011
>Originator:     Jukka Ruohonen
>Release:        NetBSD 5.99.54
>Organization:
none
>Environment:
>Description:

Using the mknod(2) syscall triggers a panic with tmpfs:
        
        breakpoint() at netbsd:breakpoint+0x5
        panic() at netbsd:panic+0x27f
        kern_assert() at netbsd:kern_assert+0x2d
        tmpfs_alloc_node() at netbsd:tmpfs_alloc_node+0x2fa
        tmpfs_alloc_file() at netbsd:tmpfs_alloc_file+0x13a
        VOP_MKNOD( at netbsd:VOP_MKNOD+0x84
        do_sys_mknod() at netbsd:do_sys_mknod+0x1f1
        syscall() at netbsd:syscall+0xaa

The assertion is:

        panic:kernel diagnostic assertion "rdev != VNOVAL" failed: file
                "/usr/src/sys/fs/tmpfs/tmpfs_subr.c", line 151

>How-To-Repeat:

The following program reliably triggers the assertion when /tmp is on tmpfs:

        #include <sys/stat.h>

        #include <unistd.h>

        int
        main(void)
        {
                (void)mknod("/tmp/panic", S_IFCHR, -1);

                return 0;
        }

>Fix:

Yes please.



Home | Main Index | Thread Index | Old Index