Author: luigi
Date: Mon Apr 15 11:49:16 2013
New Revision: 249504
URL: http://svnweb.freebsd.org/changeset/base/249504

Log:
  fix a bug in the computation of the userspace offset for a give netmap buffer.
  
  Submitted by: Hugh Nhan

Modified:
  head/sys/dev/netmap/netmap_mem2.c

Modified: head/sys/dev/netmap/netmap_mem2.c
==============================================================================
--- head/sys/dev/netmap/netmap_mem2.c   Mon Apr 15 07:01:20 2013        
(r249503)
+++ head/sys/dev/netmap/netmap_mem2.c   Mon Apr 15 11:49:16 2013        
(r249504)
@@ -278,7 +278,7 @@ netmap_obj_offset(struct netmap_obj_pool
                const char *base = p->lut[i].vaddr;
                ssize_t relofs = (const char *) vaddr - base;
 
-               if (relofs < 0 || relofs > p->_clustsize)
+               if (relofs < 0 || relofs >= p->_clustsize)
                        continue;
 
                ofs = ofs + relofs;
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to