diff options
author | Michael Pratt <mpratt@google.com> | 2020-12-07 09:21:33 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-12-07 09:23:17 -0800 |
commit | b28dc25aea0bddfca1481cebe24ad3aa71930844 (patch) | |
tree | c6f43b5d37142708d319fa91095b8dd807b0cf73 /webhook | |
parent | eeb23531ebef4fc44af317b4e4a8834c8b069dd9 (diff) |
Remove p9.fidRef.openedMu
openedMu has lock ordering violations. Most locks go through OpenedFlag(),
which is usually taken after renameMu and opMu. On the other hand, Tlopen takes
openedMu before renameMu and opMu (via safelyRead).
Resolving this violation is simple: just drop openedMu. The opened and
openFlags fields are already protected by opMu in most cases, renameMu (for
write) in one case (via safelyGlobal), and only in doWalk by neither.
This is a bit ugly because opMu is supposed to be a "semantic" lock, but it
works. I'm open to other suggestions.
Note that doWalk has a race condition where a FID may open after the open check
but before actually walking. This race existed before this change as well; it
is not clear if it is problematic.
PiperOrigin-RevId: 346108483
Diffstat (limited to 'webhook')
0 files changed, 0 insertions, 0 deletions