From owner-p4-projects@FreeBSD.ORG Sat Jun 17 15:04:29 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C434C16A47E; Sat, 17 Jun 2006 15:04:29 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9F86D16A479 for ; Sat, 17 Jun 2006 15:04:29 +0000 (UTC) (envelope-from als@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3DC2743D48 for ; Sat, 17 Jun 2006 15:04:29 +0000 (GMT) (envelope-from als@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k5HF4Tur057825 for ; Sat, 17 Jun 2006 15:04:29 GMT (envelope-from als@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k5HF4SPY057822 for perforce@freebsd.org; Sat, 17 Jun 2006 15:04:28 GMT (envelope-from als@FreeBSD.org) Date: Sat, 17 Jun 2006 15:04:28 GMT Message-Id: <200606171504.k5HF4SPY057822@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to als@FreeBSD.org using -f From: Alex Lyashkov To: Perforce Change Reviews Cc: Subject: PERFORCE change 99429 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: Sat, 17 Jun 2006 15:04:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=99429 Change 99429 by als@als_head on 2006/06/17 15:03:58 update to HEAD Affected files ... .. //depot/projects/jail2/sys/contrib/pf/net/if_pfsync.c#2 integrate .. //depot/projects/jail2/sys/ddb/db_sym.c#2 integrate .. //depot/projects/jail2/sys/dev/sound/driver.c#2 integrate .. //depot/projects/jail2/sys/dev/sound/pci/ak452x.c#1 branch .. //depot/projects/jail2/sys/dev/sound/pci/ak452x.h#1 branch .. //depot/projects/jail2/sys/dev/sound/pci/envy24.c#1 branch .. //depot/projects/jail2/sys/dev/sound/pci/envy24.h#1 branch .. //depot/projects/jail2/sys/i386/acpica/acpi_wakeup.c#2 integrate .. //depot/projects/jail2/sys/i386/i386/db_trace.c#2 integrate .. //depot/projects/jail2/sys/kern/kern_sysctl.c#2 integrate .. //depot/projects/jail2/sys/kern/kern_tc.c#2 integrate .. //depot/projects/jail2/sys/kern/subr_kdb.c#2 integrate .. //depot/projects/jail2/sys/kern/uipc_usrreq.c#2 integrate .. //depot/projects/jail2/sys/kern/vfs_cache.c#2 integrate .. //depot/projects/jail2/sys/modules/Makefile#2 integrate .. //depot/projects/jail2/sys/modules/ppc/Makefile#1 branch .. //depot/projects/jail2/sys/modules/sound/driver/ak452x/Makefile#1 branch .. //depot/projects/jail2/sys/modules/sound/driver/envy24/Makefile#1 branch .. //depot/projects/jail2/sys/security/audit/audit_bsm_token.c#2 integrate .. //depot/projects/jail2/sys/sys/protosw.h#2 integrate .. //depot/projects/jail2/sys/tools/fw_stub.awk#2 integrate .. //depot/projects/jail2/sys/vm/vm_map.c#2 integrate Differences ... ==== //depot/projects/jail2/sys/contrib/pf/net/if_pfsync.c#2 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/contrib/pf/net/if_pfsync.c,v 1.27 2006/06/14 11:11:54 mlaier Exp $ */ +/* $FreeBSD: src/sys/contrib/pf/net/if_pfsync.c,v 1.28 2006/06/16 10:25:06 mlaier Exp $ */ /* $OpenBSD: if_pfsync.c,v 1.46 2005/02/20 15:58:38 mcbride Exp $ */ /* @@ -102,6 +102,8 @@ #include "opt_carp.h" #ifdef DEV_CARP #define NCARP 1 +#else +#define NCARP 0 #endif #else #include "carp.h" ==== //depot/projects/jail2/sys/ddb/db_sym.c#2 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/ddb/db_sym.c,v 1.36 2005/01/06 01:34:41 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/ddb/db_sym.c,v 1.37 2006/06/16 16:17:52 kib Exp $"); #include #include @@ -230,7 +230,6 @@ c_db_sym_t ret = C_DB_SYM_NULL, sym; newdiff = diff = ~0; - db_last_symtab = 0; for (i = 0; i < db_nsymtab; i++) { sym = X_db_search_symbol(&db_symtabs[i], val, strategy, &newdiff); if (newdiff < diff) { ==== //depot/projects/jail2/sys/dev/sound/driver.c#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THEPOSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/sound/driver.c,v 1.15 2006/01/23 11:58:01 joel Exp $ + * $FreeBSD: src/sys/dev/sound/driver.c,v 1.16 2006/06/17 09:38:08 netchild Exp $ */ #include @@ -63,7 +63,6 @@ MODULE_DEPEND(snd_driver, snd_ds1, 1, 1, 1); MODULE_DEPEND(snd_driver, snd_emu10k1, 1, 1, 1); MODULE_DEPEND(snd_driver, snd_es137x, 1, 1, 1); -MODULE_DEPEND(snd_driver, snd_es1888, 1, 1, 1); MODULE_DEPEND(snd_driver, snd_ess, 1, 1, 1); MODULE_DEPEND(snd_driver, snd_fm801, 1, 1, 1); MODULE_DEPEND(snd_driver, snd_gusc, 1, 1, 1); ==== //depot/projects/jail2/sys/i386/acpica/acpi_wakeup.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/acpica/acpi_wakeup.c,v 1.43 2006/06/10 08:20:17 njl Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/acpica/acpi_wakeup.c,v 1.44 2006/06/16 14:04:21 mjacob Exp $"); #include #include @@ -333,8 +333,8 @@ /* Copy the wake code into our low page and save its physical addr. */ bcopy(wakecode, (void *)sc->acpi_wakeaddr, sizeof(wakecode)); if (bootverbose) { - device_printf(sc->acpi_dev, "wakeup code va %#x pa %#x\n", - acpi_wakeaddr, sc->acpi_wakephys); + device_printf(sc->acpi_dev, "wakeup code va %#x pa %#jx\n", + acpi_wakeaddr, (uintmax_t)sc->acpi_wakephys); } } ==== //depot/projects/jail2/sys/i386/i386/db_trace.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/db_trace.c,v 1.70 2005/12/23 21:33:55 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/db_trace.c,v 1.72 2006/06/16 11:49:37 yar Exp $"); #include #include @@ -201,26 +201,30 @@ db_numargs(fp) struct i386_frame *fp; { - int *argp; + char *argp; int inst; int args; - argp = (int *)db_get_value((int)&fp->f_retaddr, 4, FALSE); + argp = (char *)db_get_value((int)&fp->f_retaddr, 4, FALSE); /* * XXX etext is wrong for LKMs. We should attempt to interpret * the instruction at the return address in all cases. This * may require better fault handling. */ - if (argp < (int *)btext || argp >= (int *)etext) { - args = 5; + if (argp < btext || argp >= etext) { + args = -1; } else { +retry: inst = db_get_value((int)argp, 4, FALSE); if ((inst & 0xff) == 0x59) /* popl %ecx */ args = 1; else if ((inst & 0xffff) == 0xc483) /* addl $Ibs, %esp */ args = ((inst >> 16) & 0xff) / 4; - else - args = 5; + else if ((inst & 0xf8ff) == 0xc089) { /* movl %eax, %Reg */ + argp += 2; + goto retry; + } else + args = -1; } return (args); } @@ -233,15 +237,19 @@ int *argp; db_addr_t callpc; { + int n = narg >= 0 ? narg : 5; + db_printf("%s(", name); - while (narg) { + while (n) { if (argnp) db_printf("%s=", *argnp++); db_printf("%r", db_get_value((int)argp, 4, FALSE)); argp++; - if (--narg != 0) + if (--n != 0) db_printf(","); } + if (narg < 0) + db_printf(",..."); db_printf(") at "); db_printsym(callpc, DB_STGY_PROC); db_printf("\n"); ==== //depot/projects/jail2/sys/kern/kern_sysctl.c#2 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_sysctl.c,v 1.169 2006/02/16 15:40:35 andre Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_sysctl.c,v 1.170 2006/06/16 07:36:18 yar Exp $"); #include "opt_compat.h" #include "opt_mac.h" @@ -1135,10 +1135,6 @@ /* * Wire the user space destination buffer. If set to a value greater than * zero, the len parameter limits the maximum amount of wired memory. - * - * XXX - The len parameter is currently ignored due to the lack of - * a place to save it in the sysctl_req structure so that the matching - * amount of memory can be unwired in the sysctl exit code. */ int sysctl_wire_old_buffer(struct sysctl_req *req, size_t len) ==== //depot/projects/jail2/sys/kern/kern_tc.c#2 (text+ko) ==== @@ -8,7 +8,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_tc.c,v 1.175 2006/03/15 20:22:32 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_tc.c,v 1.176 2006/06/16 20:29:05 dwmalone Exp $"); #include "opt_ntp.h" @@ -97,6 +97,7 @@ NULL, 0, sysctl_kern_boottime, "S,timeval", "System boottime"); SYSCTL_NODE(_kern, OID_AUTO, timecounter, CTLFLAG_RW, 0, ""); +SYSCTL_NODE(_kern_timecounter, OID_AUTO, tc, CTLFLAG_RW, 0, ""); static int timestepwarnings; SYSCTL_INT(_kern_timecounter, OID_AUTO, stepwarnings, CTLFLAG_RW, @@ -133,6 +134,26 @@ return SYSCTL_OUT(req, &boottime, sizeof(boottime)); } +static int +sysctl_kern_timecounter_get(SYSCTL_HANDLER_ARGS) +{ + u_int ncount; + struct timecounter *tc = arg1; + + ncount = tc->tc_get_timecount(tc); + return sysctl_handle_int(oidp, &ncount, sizeof(ncount), req); +} + +static int +sysctl_kern_timecounter_freq(SYSCTL_HANDLER_ARGS) +{ + u_int64_t freq; + struct timecounter *tc = arg1; + + freq = tc->tc_frequency; + return sysctl_handle_int(oidp, &freq, sizeof(freq), req); +} + /* * Return the difference between the timehands' counter value now and what * was when we copied it to the timehands' offset_count. @@ -309,6 +330,7 @@ tc_init(struct timecounter *tc) { u_int u; + struct sysctl_oid *tc_root; u = tc->tc_frequency / tc->tc_counter_mask; /* XXX: We need some margin here, 10% is a guess */ @@ -330,6 +352,24 @@ tc->tc_next = timecounters; timecounters = tc; /* + * Set up sysctl tree for this counter. + */ + tc_root = SYSCTL_ADD_NODE(NULL, + SYSCTL_STATIC_CHILDREN(_kern_timecounter_tc), OID_AUTO, tc->tc_name, + CTLFLAG_RW, 0, "timecounter description"); + SYSCTL_ADD_UINT(NULL, SYSCTL_CHILDREN(tc_root), OID_AUTO, + "mask", CTLFLAG_RD, &(tc->tc_counter_mask), 0, + "mask for implemented bits"); + SYSCTL_ADD_PROC(NULL, SYSCTL_CHILDREN(tc_root), OID_AUTO, + "counter", CTLTYPE_UINT | CTLFLAG_RD, tc, sizeof(*tc), + sysctl_kern_timecounter_get, "IU", "current timecounter value"); + SYSCTL_ADD_PROC(NULL, SYSCTL_CHILDREN(tc_root), OID_AUTO, + "frequency", CTLTYPE_QUAD | CTLFLAG_RD, tc, sizeof(*tc), + sysctl_kern_timecounter_freq, "IU", "timecounter frequency"); + SYSCTL_ADD_INT(NULL, SYSCTL_CHILDREN(tc_root), OID_AUTO, + "quality", CTLFLAG_RD, &(tc->tc_quality), 0, + "goodness of time counter"); + /* * Never automatically use a timecounter with negative quality. * Even though we run on the dummy counter, switching here may be * worse since this timecounter may not be monotonous. ==== //depot/projects/jail2/sys/kern/subr_kdb.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/subr_kdb.c,v 1.21 2006/04/04 00:40:20 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/subr_kdb.c,v 1.22 2006/06/17 02:58:18 emaste Exp $"); #include "opt_kdb.h" @@ -89,7 +89,7 @@ #ifdef SMP static int kdb_stop_cpus = 1; SYSCTL_INT(_debug_kdb, OID_AUTO, stop_cpus, CTLTYPE_INT | CTLFLAG_RW, - &kdb_stop_cpus, 0, ""); + &kdb_stop_cpus, 0, "stop other CPUs when entering the debugger"); TUNABLE_INT("debug.kdb.stop_cpus", &kdb_stop_cpus); #endif ==== //depot/projects/jail2/sys/kern/uipc_usrreq.c#2 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/uipc_usrreq.c,v 1.168 2006/06/13 14:33:35 maxim Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/uipc_usrreq.c,v 1.169 2006/06/16 22:11:49 rwatson Exp $"); #include "opt_mac.h" @@ -1039,16 +1039,6 @@ } } -#ifdef notdef -void -unp_abort(struct unpcb *unp) -{ - - unp_detach(unp); - UNP_UNLOCK_ASSERT(); -} -#endif - /* * unp_pcblist() assumes that UNIX domain socket memory is never reclaimed * by the zone (UMA_ZONE_NOFREE), and as such potentially stale pointers @@ -1190,14 +1180,6 @@ unp_disconnect(unp); } -#ifdef notdef -void -unp_drain(void) -{ - -} -#endif - static void unp_freerights(struct file **rp, int fdcount) { ==== //depot/projects/jail2/sys/kern/vfs_cache.c#2 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/vfs_cache.c,v 1.105 2006/04/16 18:38:30 jmg Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_cache.c,v 1.106 2006/06/16 05:09:28 csjp Exp $"); #include #include @@ -771,11 +771,9 @@ buf = malloc(MAXPATHLEN, M_TEMP, M_WAITOK); fdp = td->td_proc->p_fd; - mtx_lock(&Giant); FILEDESC_LOCK(fdp); error = vn_fullpath1(td, vn, fdp->fd_rdir, buf, retbuf, MAXPATHLEN); FILEDESC_UNLOCK(fdp); - mtx_unlock(&Giant); if (!error) *freebuf = buf; @@ -795,8 +793,6 @@ int error, i, slash_prefixed; struct namecache *ncp; - mtx_assert(&Giant, MA_OWNED); - bp = buf + buflen - 1; *bp = '\0'; error = 0; ==== //depot/projects/jail2/sys/modules/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/modules/Makefile,v 1.498 2006/06/13 13:53:52 gallatin Exp $ +# $FreeBSD: src/sys/modules/Makefile,v 1.500 2006/06/16 12:51:53 nyan Exp $ .include @@ -190,6 +190,7 @@ ${_pmc} \ portalfs \ ppbus \ + ${_ppc} \ ppi \ pps \ procfs \ @@ -373,6 +374,7 @@ _pccard= pccard _pcfclock= pcfclock _pecoff= pecoff +_ppc= ppc _pst= pst _puc= puc _ray= ray @@ -475,6 +477,7 @@ _ndis= ndis _nve= nve _pccard= pccard +_ppc= ppc _rr232x= rr232x _safe= safe _scsi_low= scsi_low ==== //depot/projects/jail2/sys/security/audit/audit_bsm_token.c#2 (text) ==== @@ -30,8 +30,8 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/audit3/sys/security/audit/audit_bsm_token.c#15 $ - * $FreeBSD: src/sys/security/audit/audit_bsm_token.c,v 1.3 2006/06/05 13:13:02 rwatson Exp $ + * $P4: //depot/projects/trustedbsd/audit3/sys/security/audit/audit_bsm_token.c#17 $ + * $FreeBSD: src/sys/security/audit/audit_bsm_token.c,v 1.4 2006/06/17 13:53:04 wsalamon Exp $ */ #include @@ -609,7 +609,7 @@ * terminal ID * port ID 4 bytes/8 bytes (32-bit/64-bit value) * address type-len 4 bytes - * machine address 16 bytes + * machine address 4/16 bytes */ token_t * au_to_process32_ex(au_id_t auid, uid_t euid, gid_t egid, uid_t ruid, @@ -618,7 +618,12 @@ token_t *t; u_char *dptr = NULL; - GET_TOKEN_AREA(t, dptr, sizeof(u_char) + 13 * sizeof(u_int32_t)); + if (tid->at_type == AU_IPv6) + GET_TOKEN_AREA(t, dptr, sizeof(u_char) + 13 * + sizeof(u_int32_t)); + else + GET_TOKEN_AREA(t, dptr, sizeof(u_char) + 10 * + sizeof(u_int32_t)); ADD_U_CHAR(dptr, AUT_PROCESS32_EX); ADD_U_INT32(dptr, auid); @@ -631,10 +636,11 @@ ADD_U_INT32(dptr, tid->at_port); ADD_U_INT32(dptr, tid->at_type); ADD_U_INT32(dptr, tid->at_addr[0]); - ADD_U_INT32(dptr, tid->at_addr[1]); - ADD_U_INT32(dptr, tid->at_addr[2]); - ADD_U_INT32(dptr, tid->at_addr[3]); - + if (tid->at_type == AU_IPv6) { + ADD_U_INT32(dptr, tid->at_addr[1]); + ADD_U_INT32(dptr, tid->at_addr[2]); + ADD_U_INT32(dptr, tid->at_addr[3]); + } return (t); } @@ -938,7 +944,7 @@ * terminal ID * port ID 4 bytes/8 bytes (32-bit/64-bit value) * address type/length 4 bytes - * machine address 16 bytes + * machine address 4/16 bytes */ token_t * au_to_subject32_ex(au_id_t auid, uid_t euid, gid_t egid, uid_t ruid, @@ -947,7 +953,12 @@ token_t *t; u_char *dptr = NULL; - GET_TOKEN_AREA(t, dptr, sizeof(u_char) + 13 * sizeof(u_int32_t)); + if (tid->at_type == AU_IPv6) + GET_TOKEN_AREA(t, dptr, sizeof(u_char) + 13 * + sizeof(u_int32_t)); + else + GET_TOKEN_AREA(t, dptr, sizeof(u_char) + 10 * + sizeof(u_int32_t)); ADD_U_CHAR(dptr, AUT_SUBJECT32_EX); ADD_U_INT32(dptr, auid); @@ -960,10 +971,11 @@ ADD_U_INT32(dptr, tid->at_port); ADD_U_INT32(dptr, tid->at_type); ADD_U_INT32(dptr, tid->at_addr[0]); - ADD_U_INT32(dptr, tid->at_addr[1]); - ADD_U_INT32(dptr, tid->at_addr[2]); - ADD_U_INT32(dptr, tid->at_addr[3]); - + if (tid->at_type == AU_IPv6) { + ADD_U_INT32(dptr, tid->at_addr[1]); + ADD_U_INT32(dptr, tid->at_addr[2]); + ADD_U_INT32(dptr, tid->at_addr[3]); + } return (t); } ==== //depot/projects/jail2/sys/sys/protosw.h#2 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)protosw.h 8.1 (Berkeley) 6/2/93 - * $FreeBSD: src/sys/sys/protosw.h,v 1.53 2006/06/07 13:09:04 rwatson Exp $ + * $FreeBSD: src/sys/sys/protosw.h,v 1.54 2006/06/16 22:31:56 rwatson Exp $ */ #ifndef _SYS_PROTOSW_H_ @@ -249,7 +249,6 @@ /* * All nonvoid pru_*() functions below return EOPNOTSUPP. */ - void pru_abort_notsupp(struct socket *so); int pru_accept_notsupp(struct socket *so, struct sockaddr **nam); int pru_attach_notsupp(struct socket *so, int proto, struct thread *td); ==== //depot/projects/jail2/sys/tools/fw_stub.awk#2 (text+ko) ==== @@ -25,7 +25,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/sys/tools/fw_stub.awk,v 1.2 2006/01/30 16:32:08 mlaier Exp $ +# $FreeBSD: src/sys/tools/fw_stub.awk,v 1.3 2006/06/16 21:06:03 jhb Exp $ # # Script to generate module .c file from a list of firmware images @@ -125,7 +125,8 @@ printc("\nstatic int\n"\ opt_m "_fw_modevent(module_t mod, int type, void *unused)\ {\ - struct firmware *fp;\ + struct firmware *fp, *parent;\ + int error;\ switch (type) {\ case MOD_LOAD:"); @@ -136,11 +137,7 @@ # '-', '.' and '/' are converted to '_' by ld/objcopy gsub(/-|\.|\//, "_", symb); - if (file_i == 0) - reg = "\t\tfp = "; - else - reg = "\t\t(void)"; - + reg = "\t\tfp = "; reg = reg "firmware_register(\"" short "\", _binary_" symb "_start , "; reg = reg "(size_t)(_binary_" symb "_end - _binary_" symb "_start), "; reg = reg version ", "; @@ -148,21 +145,37 @@ if (file_i == 0) reg = reg "NULL);"; else - reg = reg "fp);"; + reg = reg "parent);"; printc(reg); + + printc("\t\tif (fp == NULL)"); + printc("\t\t\tgoto fail_" file_i ";"); + if (file_i == 0) + printc("\t\tparent = fp;"); } -printc("\t\treturn (0);\ - case MOD_UNLOAD:"); +printc("\t\treturn (0);"); + +for (file_i = num_files - 1; file_i > 0; file_i--) { + printc("\tfail_" file_i ":") + printc("\t\t(void)firmware_unregister(\"" shortnames[file_i - 1] "\");"); +} + +printc("\tfail_0:"); +printc("\t\treturn (ENXIO);"); + +printc("\tcase MOD_UNLOAD:"); for (file_i = 1; file_i < num_files; file_i++) { - printc("\t\tfirmware_unregister(\"" shortnames[file_i] "\");"); + printc("\t\terror = firmware_unregister(\"" shortnames[file_i] "\");"); + printc("\t\tif (error)"); + printc("\t\t\treturn (error);"); } -printc("\t\tfirmware_unregister(\"" shortnames[0] "\");"); +printc("\t\terror = firmware_unregister(\"" shortnames[0] "\");"); -printc("\t\treturn (0);\ +printc("\t\treturn (error);\ }\ return (EINVAL);\ }\ ==== //depot/projects/jail2/sys/vm/vm_map.c#2 (text+ko) ==== @@ -63,7 +63,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/vm/vm_map.c,v 1.376 2006/06/14 17:48:45 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/vm/vm_map.c,v 1.377 2006/06/17 08:45:01 alc Exp $"); #include #include @@ -1489,7 +1489,7 @@ */ if ((flags & MAP_PREFAULT_MADVISE) && cnt.v_free_count < cnt.v_free_reserved) { - size = ptoa(tmpidx); + psize = tmpidx; break; } if ((p->valid & VM_PAGE_BITS_ALL) == VM_PAGE_BITS_ALL && @@ -1512,8 +1512,8 @@ } } if (p_start != NULL) - pmap_enter_object(map->pmap, start, addr + size, p_start, - prot); + pmap_enter_object(map->pmap, start, addr + ptoa(psize), + p_start, prot); if (are_queues_locked) vm_page_unlock_queues(); unlock_return: