From owner-p4-projects@FreeBSD.ORG Sun Aug 16 13:28:50 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 86B02106568E; Sun, 16 Aug 2009 13:28:50 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B5C2106568B for ; Sun, 16 Aug 2009 13:28:50 +0000 (UTC) (envelope-from trasz@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 20C5D8FC15 for ; Sun, 16 Aug 2009 13:28:50 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n7GDSonW066765 for ; Sun, 16 Aug 2009 13:28:50 GMT (envelope-from trasz@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n7GDSn9J066763 for perforce@freebsd.org; Sun, 16 Aug 2009 13:28:49 GMT (envelope-from trasz@freebsd.org) Date: Sun, 16 Aug 2009 13:28:49 GMT Message-Id: <200908161328.n7GDSn9J066763@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to trasz@freebsd.org using -f From: Edward Tomasz Napierala To: Perforce Change Reviews Cc: Subject: PERFORCE change 167403 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Aug 2009 13:28:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=167403 Change 167403 by trasz@trasz_anger on 2009/08/16 13:27:56 More KASSERTs. Affected files ... .. //depot/projects/soc2009/trasz_limits/sys/kern/kern_loginclass.c#11 edit .. //depot/projects/soc2009/trasz_limits/sys/kern/kern_resource.c#23 edit Differences ... ==== //depot/projects/soc2009/trasz_limits/sys/kern/kern_loginclass.c#11 (text+ko) ==== @@ -88,11 +88,10 @@ mtx_lock(&loginclasses_lock); if (refcount_release(&lc->lc_refcount)) { for (i = 0; i < HRL_RESOURCE_MAX; i++) { - if (lc->lc_usage.hu_resources[i] != 0) - printf("loginclass_release: freeing " - "loginclass \"%s\", resource %d = %lld\n", - lc->lc_name, i, - lc->lc_usage.hu_resources[i]); + KASSERT(lc->lc_usage.hu_resources[i] == 0, + ("loginclass_release: freeing " + "loginclass \"%s\", resource %d = %lld\n", + lc->lc_name, i, lc->lc_usage.hu_resources[i])); } LIST_REMOVE(lc, lc_next); mtx_unlock(&loginclasses_lock); ==== //depot/projects/soc2009/trasz_limits/sys/kern/kern_resource.c#23 (text+ko) ==== @@ -1397,10 +1397,10 @@ uip->ui_uid, (unsigned long long)uip->ui_vmsize); mtx_destroy(&uip->ui_vmsize_mtx); for (i = 0; i < HRL_RESOURCE_MAX; i++) { - if (uip->ui_usage.hu_resources[i] != 0) - printf("uifree: freeing uidinfo: uid = %d, " - "resource %d = %lld \n", uip->ui_uid, i, - uip->ui_usage.hu_resources[i]); + KASSERT(uip->ui_usage.hu_resources[i] == 0, + ("uifree: freeing uidinfo: uid = %d, " + "resource %d = %lld \n", uip->ui_uid, i, + uip->ui_usage.hu_resources[i])); } free(uip, M_UIDINFO); return; @@ -1567,10 +1567,10 @@ LIST_REMOVE(gip, gi_hash); rw_wunlock(&gihashtbl_lock); for (i = 0; i < HRL_RESOURCE_MAX; i++) { - if (gip->gi_usage.hu_resources[i] != 0) - printf("gifree: freeing gidinfo: gid = %d, " - "resource %d = %lld \n", gip->gi_gid, i, - gip->gi_usage.hu_resources[i]); + KASSERT(gip->gi_usage.hu_resources[i] == 0, + ("gifree: freeing gidinfo: gid = %d, " + "resource %d = %lld \n", gip->gi_gid, i, + gip->gi_usage.hu_resources[i])); } free(gip, M_GIDINFO); return;