Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Mar 2017 20:10:58 +0000 (UTC)
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r316299 - stable/11/sys/compat/linux
Message-ID:  <201703302010.v2UKAwla047274@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703302010.v2UKAwla047274>