diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-03-16 11:54:29 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-03-16 15:33:56 +0100 |
commit | 66fac03fae3af9dded964b01c89662819dbfc5c2 (patch) | |
tree | 2d866941dc2ae2b633f62cfeec830e34d1e4c059 /cpukit/libcsupport/src/chroot.c | |
parent | psxstrsignal01: New test (diff) | |
download | rtems-66fac03fae3af9dded964b01c89662819dbfc5c2.tar.bz2 |
libio: Fix deadlock in location management
Perform a context-dependent deferred location release to avoid a
deadlock on the file system instance locks, for example during a
chdir().
Update #2936.
Diffstat (limited to 'cpukit/libcsupport/src/chroot.c')
-rw-r--r-- | cpukit/libcsupport/src/chroot.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cpukit/libcsupport/src/chroot.c b/cpukit/libcsupport/src/chroot.c index 9ec4ad470f..0c498e6a6f 100644 --- a/cpukit/libcsupport/src/chroot.c +++ b/cpukit/libcsupport/src/chroot.c @@ -80,7 +80,7 @@ int chroot( const char *path ) } if ( rv != 0 ) { - rtems_filesystem_global_location_release( new_root_loc ); + rtems_filesystem_global_location_release( new_root_loc, true ); } } else { rv = -1; @@ -89,7 +89,7 @@ int chroot( const char *path ) rtems_filesystem_eval_path_cleanup( &ctx ); if ( rv != 0 ) { - rtems_filesystem_global_location_release( new_current_loc ); + rtems_filesystem_global_location_release( new_current_loc, false ); } return rv; |