Date: Thu, 8 Jul 2010 16:53:19 +0000 (UTC) From: Jaakko Heinonen <jh@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r209816 - head/sys/kern Message-ID: <201007081653.o68GrJ73069442@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jh Date: Thu Jul 8 16:53:19 2010 New Revision: 209816 URL: http://svn.freebsd.org/changeset/base/209816 Log: Assert that low and high are >= 0. The allocator doesn't support the negative range. Modified: head/sys/kern/subr_unit.c Modified: head/sys/kern/subr_unit.c ============================================================================== --- head/sys/kern/subr_unit.c Thu Jul 8 16:11:06 2010 (r209815) +++ head/sys/kern/subr_unit.c Thu Jul 8 16:53:19 2010 (r209816) @@ -326,8 +326,8 @@ new_unrhdr(int low, int high, struct mtx { struct unrhdr *uh; - KASSERT(low <= high, - ("UNR: use error: new_unrhdr(%u, %u)", low, high)); + KASSERT(low >= 0 && high >= 0 && low <= high, + ("UNR: use error: new_unrhdr(%d, %d)", low, high)); uh = Malloc(sizeof *uh); if (mutex != NULL) uh->mtx = mutex;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007081653.o68GrJ73069442>