diff options
| author | Patrick Mooney <pmooney@pfmooney.com> | 2016-06-09 19:46:09 +0000 |
|---|---|---|
| committer | Patrick Mooney <pmooney@pfmooney.com> | 2016-06-09 20:53:56 +0000 |
| commit | ff1e61db511fa5cb72976825e26c820fdc37f544 (patch) | |
| tree | 7665820dcdac2592987ed91b8a687122a0cfb250 /usr/src | |
| parent | 22ba6ca4a2a3090b6e121e4b3cf2bf040c9a1a3c (diff) | |
| download | illumos-joyent-ff1e61db511fa5cb72976825e26c820fdc37f544.tar.gz | |
OS-5458 lxbrand epoll_ctl should throw EINVAL for loops
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Diffstat (limited to 'usr/src')
| -rw-r--r-- | usr/src/uts/common/brand/lx/syscall/lx_epoll.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/usr/src/uts/common/brand/lx/syscall/lx_epoll.c b/usr/src/uts/common/brand/lx/syscall/lx_epoll.c index 62a0eccf4b..8eead951f4 100644 --- a/usr/src/uts/common/brand/lx/syscall/lx_epoll.c +++ b/usr/src/uts/common/brand/lx/syscall/lx_epoll.c @@ -191,8 +191,15 @@ lx_epoll_ctl(int fd, int op, int pfd, void *event) error = VOP_WRITE(fp->f_vnode, &auio, 1, fp->f_cred, NULL); releasef(fd); - if (error) + if (error == ELOOP) { + /* + * In the case of descriptor loops, /dev/poll emits a more + * descriptive error than Linux epoll consumers would expect. + */ + return (set_errno(EINVAL)); + } else if (error != 0) { return (set_errno(error)); + } return (0); } |
