Return an error if both EV_ENABLE and EV_DISABLE are specified for a kevent.
Currently, this combination results in EV_DISABLE being ignored. Reviewed by: kib Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D5307
This commit is contained in:
parent
dd51b8ceaa
commit
fe169828c3
@ -1116,6 +1116,9 @@ kqueue_register(struct kqueue *kq, struct kevent *kev, struct thread *td, int wa
|
||||
int error, filt, event;
|
||||
int haskqglobal, filedesc_unlock;
|
||||
|
||||
if ((kev->flags & (EV_ENABLE | EV_DISABLE)) == (EV_ENABLE | EV_DISABLE))
|
||||
return (EINVAL);
|
||||
|
||||
fp = NULL;
|
||||
kn = NULL;
|
||||
error = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user