VirtualBox

Changeset 39217 in vbox


Ignore:
Timestamp:
Nov 7, 2011 3:25:14 PM (13 years ago)
Author:
vboxsync
Message:

Additions/solaris/SharedFolders: fix recursive mutex panic due to sffs_write causing pagefaults for mmap'd buffers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/solaris/SharedFolders/vboxfs_vnode.c

    r39115 r39217  
    16021602{
    16031603        int error = 0;
     1604        int is_recursive = 0;
    16041605        page_t **pageliststart = pagelist;
    16051606        sfnode_t *node = VN2SFN(dvp);
     
    16231624                *protp = PROT_ALL;
    16241625
    1625         mutex_enter(&sffs_lock);
     1626        /*
     1627         * The buffer passed to sffs_write may be mmap'd so we may get a
     1628         * pagefault there, in which case we'll end up here with this thread
     1629         * already owning the mutex. Mutexes aren't recursive.
     1630         */
     1631        if (mutex_owner(&sffs_lock) == curthread)
     1632                is_recursive = 1;
     1633        else
     1634                mutex_enter(&sffs_lock);
    16261635
    16271636        /* Don't map pages past end of the file. */
     
    16451654
    16461655                        *pagelist = NULL;
    1647                         mutex_exit(&sffs_lock);
     1656                        if (!is_recursive)
     1657                                mutex_exit(&sffs_lock);
    16481658                        return (error);
    16491659                }
     
    16771687
    16781688        *pagelist = NULL;
    1679         mutex_exit(&sffs_lock);
     1689        if (!is_recursive)
     1690                mutex_exit(&sffs_lock);
    16801691        return (error);
    16811692}
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette