svn commit: r316299 - stable/11/sys/compat/linux

Dmitry Chagin dchagin at FreeBSD.org
Thu Mar 30 20:10:59 UTC 2017


Author: dchagin
Date: Thu Mar 30 20:10:57 2017
New Revision: 316299
URL: https://svnweb.freebsd.org/changeset/base/316299

Log:
  MFC r314344:
  
  Return EINVAL when an invalid file descriptor specified.

Modified:
  stable/11/sys/compat/linux/linux_event.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/compat/linux/linux_event.c
==============================================================================
--- stable/11/sys/compat/linux/linux_event.c	Thu Mar 30 20:09:49 2017	(r316298)
+++ stable/11/sys/compat/linux/linux_event.c	Thu Mar 30 20:10:57 2017	(r316299)
@@ -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);


More information about the svn-src-all mailing list