summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/syscall/fcntl.c
diff options
context:
space:
mode:
authorCody Peter Mello <cody.mello@joyent.com>2016-08-12 18:53:06 +0000
committerCody Peter Mello <cody.mello@joyent.com>2016-08-18 00:57:56 +0000
commit2284cf450f099ce8441493d7c9f2c1cb0bbf474f (patch)
tree0f4c5994c9e1ad3d95fa5558bb131540eb62c4fb /usr/src/uts/common/syscall/fcntl.c
parentfae673de1d84b263986f4dcdde53f15478ad664d (diff)
downloadillumos-joyent-2284cf450f099ce8441493d7c9f2c1cb0bbf474f.tar.gz
OS-5591 Double flock(3C) causes undue block
OS-5585 fcntl(F_OFD_GETLK) should return EINVAL on bad parameters Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Reviewed by: Patrick Mooney <patrick.mooney@joyent.com> Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src/uts/common/syscall/fcntl.c')
-rw-r--r--usr/src/uts/common/syscall/fcntl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr/src/uts/common/syscall/fcntl.c b/usr/src/uts/common/syscall/fcntl.c
index d631fe62f6..14e3b7018e 100644
--- a/usr/src/uts/common/syscall/fcntl.c
+++ b/usr/src/uts/common/syscall/fcntl.c
@@ -366,7 +366,8 @@ fcntl(int fdes, int cmd, intptr_t arg)
}
}
- if (cmd == F_OFD_SETLK || cmd == F_OFD_SETLKW) {
+ if (cmd == F_OFD_GETLK || cmd == F_OFD_SETLK ||
+ cmd == F_OFD_SETLKW) {
/*
* TBD OFD-style locking is currently limited to
* covering the entire file.