svn commit: r266784 - user/dchagin/lemul/sys/compat/linux

Dmitry Chagin dchagin at FreeBSD.org
Wed May 28 06:02:05 UTC 2014


Author: dchagin
Date: Wed May 28 06:02:04 2014
New Revision: 266784
URL: http://svnweb.freebsd.org/changeset/base/266784

Log:
  fdc in epoll_emuladta is not a counter it is a max index of udata vector.

Modified:
  user/dchagin/lemul/sys/compat/linux/linux_event.c

Modified: user/dchagin/lemul/sys/compat/linux/linux_event.c
==============================================================================
--- user/dchagin/lemul/sys/compat/linux/linux_event.c	Wed May 28 06:00:55 2014	(r266783)
+++ user/dchagin/lemul/sys/compat/linux/linux_event.c	Wed May 28 06:02:04 2014	(r266784)
@@ -74,7 +74,7 @@ __FBSDID("$FreeBSD$");
 typedef uint64_t	epoll_udata_t;
 
 struct epoll_emuldata {
-	uint32_t	fdc;		/* epoll udata count */
+	uint32_t	fdc;		/* epoll udata max index */
 	epoll_udata_t	udata[1];	/* epoll user data vector */
 };
 
@@ -337,7 +337,7 @@ epoll_kev_copyout(void *arg, struct keve
 		kevent_to_epoll(&kevp[i], &eep[i]);
 
 		fd = kevp[i].ident;
-		KASSERT(fd < emd->fdc, ("epoll user data vector"
+		KASSERT(fd <= emd->fdc, ("epoll user data vector"
 						    " is too small.\n"));
 		eep[i].data = emd->udata[fd];
 	}


More information about the svn-src-user mailing list