[Bug 230220] UFS: the freezing ioctl (i.e.UFSSUSPEND) causes panic or EBUSY

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Jul 31 02:11:18 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230220

--- Comment #2 from Dexuan Cui <decui at microsoft.com> ---
(In reply to Dexuan Cui from comment #0)

If there is only one mount point (i.e. /), I can't reproduce the panic.
The panic only happens after I mount /dev/da2p1 on /mnt.

The panic is caused by the failure of the KASSERT ffs_susp_ioctl():

case UFSSUSPEND:
        fsidp = (fsid_t *)addr;
        mp = vfs_getvfs(fsidp);
        if (mp == NULL) {
                error = ENOENT;
                break;
        }
        error = vfs_busy(mp, 0);
        vfs_rel(mp);
        if (error != 0)
                break;
        error = ffs_susp_suspend(mp);
        if (error != 0) {
                vfs_unbusy(mp);
                break;
        }
        error = devfs_set_cdevpriv(mp, ffs_susp_dtor);
        KASSERT(error == 0, ("devfs_set_cdevpriv failed"));
        break;

When the UFSSUSPEND ioctl is called for the second time, devfs_set_cdevpriv()
returns EBUSY.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list