Date: Mon, 27 Feb 2017 16:55:09 +0000 (UTC) From: Dmitry Chagin <dchagin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314344 - head/sys/compat/linux Message-ID: <201702271655.v1RGt9Hi070880@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dchagin Date: Mon Feb 27 16:55:09 2017 New Revision: 314344 URL: https://svnweb.freebsd.org/changeset/base/314344 Log: Return EINVAL when an invalid file descriptor specified. MFC after: 1 month Modified: head/sys/compat/linux/linux_event.c Modified: head/sys/compat/linux/linux_event.c ============================================================================== --- head/sys/compat/linux/linux_event.c Mon Feb 27 16:53:52 2017 (r314343) +++ head/sys/compat/linux/linux_event.c Mon Feb 27 16:55:09 2017 (r314344) @@ -729,7 +729,7 @@ eventfd_close(struct file *fp, struct th efd = fp->f_data; if (fp->f_type != DTYPE_LINUXEFD || efd == NULL) - return (EBADF); + return (EINVAL); seldrain(&efd->efd_sel); knlist_destroy(&efd->efd_sel.si_note); @@ -751,7 +751,7 @@ eventfd_read(struct file *fp, struct uio efd = fp->f_data; if (fp->f_type != DTYPE_LINUXEFD || efd == NULL) - return (EBADF); + return (EINVAL); if (uio->uio_resid < sizeof(eventfd_t)) return (EINVAL); @@ -797,7 +797,7 @@ eventfd_write(struct file *fp, struct ui efd = fp->f_data; if (fp->f_type != DTYPE_LINUXEFD || efd == NULL) - return (EBADF); + return (EINVAL); if (uio->uio_resid < sizeof(eventfd_t)) return (EINVAL);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702271655.v1RGt9Hi070880>