Author: emaste Date: Mon Nov 19 19:30:30 2012 New Revision: 243304 URL: http://svnweb.freebsd.org/changeset/base/243304
Log: MFC r241643: Avoid panic when a netmap instance cannot obtain memory. A uint32_t is always >= 0. Sponsored by: ADARA Networks Modified: stable/9/sys/dev/netmap/netmap_mem2.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/netmap/netmap_mem2.c ============================================================================== --- stable/9/sys/dev/netmap/netmap_mem2.c Mon Nov 19 19:26:59 2012 (r243303) +++ stable/9/sys/dev/netmap/netmap_mem2.c Mon Nov 19 19:30:30 2012 (r243304) @@ -324,7 +324,8 @@ netmap_new_bufs(struct netmap_if *nifp _ return; cleanup: - for (i--; i >= 0; i--) { + while (i > 0) { + i--; netmap_obj_free(nm_mem->nm_buf_pool, slot[i].buf_idx); } } _______________________________________________ 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"