kern/168213: [kernel] why is the type of ub_cnt signed in uma_int.h?
Mark Linimon
linimon at FreeBSD.org
Tue May 22 03:10:03 UTC 2012
>Number: 168213
>Category: kern
>Synopsis: [kernel] why is the type of ub_cnt signed in uma_int.h?
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue May 22 03:10:02 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Mark Linimon
>Release: FreeBSD 9.0-STABLE i386
>Organization:
FreeBSD
>Environment:
System: FreeBSD freefall.freebsd.org 9.0-STABLE FreeBSD 9.0-STABLE #6 r235139: Tue May 8 21:19:03 UTC 2012 simon at freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL i386
>Description:
While looking at a problem for a customer, I was confused by the outputs
of number of free items and number of entries in uma_int.h. Shouldn't
these two entities be unsigned instead of signed?
>How-To-Repeat:
>Fix:
This isn't a fix, as much as grounds for discussion.
Index: uma_int.h
===================================================================
RCS file: /home/FreeBSD/ncvs/src/sys/vm/uma_int.h,v
retrieving revision 1.46
diff -u -r1.46 uma_int.h
--- uma_int.h 21 May 2011 17:43:43 -0000 1.46
+++ uma_int.h 13 Apr 2012 17:06:48 -0000
@@ -174,8 +174,8 @@
struct uma_bucket {
LIST_ENTRY(uma_bucket) ub_link; /* Link into the zone */
- int16_t ub_cnt; /* Count of free items. */
- int16_t ub_entries; /* Max items. */
+ u_int16_t ub_cnt; /* Count of free items. *//* XXX MCL was int64_t? */
+ u_int16_t ub_entries; /* Max items. *//* XXX MCL was int64_t? */
void *ub_bucket[]; /* actual allocation storage */
};
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list