summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/syscalls/epoll.go
diff options
context:
space:
mode:
authorYong He <chenglang.hy@antfin.com>2019-12-16 14:04:03 +0800
committerYong He <chenglang.hy@antfin.com>2019-12-16 18:37:35 +0800
commitbd5c7bf58dd656dc16b920b48a346ef08f1efba8 (patch)
treeb8081185cdf96d1c4e5ebdda4d77d94911928c72 /pkg/sentry/syscalls/epoll.go
parent6b424530397e5100b08628efe8f6c62178daa70b (diff)
Fix deadlock in overlay bind
Copy up parent when binding UDS on overlayfs is supported in commit 02ab1f187cd24c67b754b004229421d189cee264. But the using of copyUp in overlayBind will cause sentry stuck, reason is dead lock in renameMu. 1 [Process A] Invoke a Unix socket bind operation renameMu is hold in fs.(*Dirent).genericCreate by process A 2 [Process B] Invoke a read syscall on /proc/task/mounts waitng on Lock of renameMu in fs.(*MountNamespace).FindMount 3 [Process A] Continue Unix socket bind operation wating on RLock of renameMu in fs.copyUp Root cause is recursive reading lock of reanmeMu in bind call trace, if there are writing lock between the two reading lock, then deadlock occured. Fixes #1397
Diffstat (limited to 'pkg/sentry/syscalls/epoll.go')
0 files changed, 0 insertions, 0 deletions