Date: Sat, 26 Mar 2016 19:16:53 +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: r297297 - head/sys/compat/linux Message-ID: <201603261916.u2QJGrKc005190@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dchagin Date: Sat Mar 26 19:16:53 2016 New Revision: 297297 URL: https://svnweb.freebsd.org/changeset/base/297297 Log: When write(2) on eventfd object fails with the error EAGAIN do not return the number of bytes written. MFC after: 1 week Modified: head/sys/compat/linux/linux_event.c Modified: head/sys/compat/linux/linux_event.c ============================================================================== --- head/sys/compat/linux/linux_event.c Sat Mar 26 19:15:23 2016 (r297296) +++ head/sys/compat/linux/linux_event.c Sat Mar 26 19:16:53 2016 (r297297) @@ -751,6 +751,8 @@ retry: if (UINT64_MAX - efd->efd_count <= count) { if ((efd->efd_flags & LINUX_O_NONBLOCK) != 0) { mtx_unlock(&efd->efd_lock); + /* Do not not return the number of bytes written */ + uio->uio_resid += sizeof(eventfd_t); return (EAGAIN); } error = mtx_sleep(&efd->efd_count, &efd->efd_lock,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603261916.u2QJGrKc005190>