Date: Mon, 28 Jul 2008 09:26:27 GMT From: Ed Schouten <ed@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 146096 for review Message-ID: <200807280926.m6S9QRS8078787@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=146096 Change 146096 by ed@ed_dull on 2008/07/28 09:25:55 IFC my procstat.1 changes. Affected files ... .. //depot/projects/mpsafetty/lib/libc/gen/Makefile.inc#3 integrate .. //depot/projects/mpsafetty/lib/libc/gen/posix_spawn.3#1 branch .. //depot/projects/mpsafetty/lib/libc/gen/posix_spawn_file_actions_addopen.3#1 branch .. //depot/projects/mpsafetty/lib/libc/gen/posix_spawn_file_actions_init.3#1 branch .. //depot/projects/mpsafetty/lib/libc/gen/posix_spawnattr_getflags.3#1 branch .. //depot/projects/mpsafetty/lib/libc/gen/posix_spawnattr_getpgroup.3#1 branch .. //depot/projects/mpsafetty/lib/libc/gen/posix_spawnattr_getschedparam.3#1 branch .. //depot/projects/mpsafetty/lib/libc/gen/posix_spawnattr_getschedpolicy.3#1 branch .. //depot/projects/mpsafetty/lib/libc/gen/posix_spawnattr_getsigdefault.3#1 branch .. //depot/projects/mpsafetty/lib/libc/gen/posix_spawnattr_getsigmask.3#1 branch .. //depot/projects/mpsafetty/lib/libc/gen/posix_spawnattr_init.3#1 branch .. //depot/projects/mpsafetty/sys/amd64/amd64/pmap.c#6 integrate .. //depot/projects/mpsafetty/sys/dev/jme/if_jme.c#3 integrate .. //depot/projects/mpsafetty/sys/i386/i386/pmap.c#3 integrate .. //depot/projects/mpsafetty/sys/kern/subr_lock.c#2 integrate .. //depot/projects/mpsafetty/sys/kern/vfs_subr.c#3 integrate .. //depot/projects/mpsafetty/sys/netinet/ip_divert.c#2 integrate .. //depot/projects/mpsafetty/sys/netinet/raw_ip.c#4 integrate .. //depot/projects/mpsafetty/sys/netinet6/icmp6.c#2 integrate .. //depot/projects/mpsafetty/sys/netinet6/raw_ip6.c#3 integrate .. //depot/projects/mpsafetty/usr.bin/procstat/procstat.1#3 integrate Differences ... ==== //depot/projects/mpsafetty/lib/libc/gen/Makefile.inc#3 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile.inc 8.6 (Berkeley) 5/4/95 -# $FreeBSD: src/lib/libc/gen/Makefile.inc,v 1.139 2008/07/22 11:33:49 ache Exp $ +# $FreeBSD: src/lib/libc/gen/Makefile.inc,v 1.140 2008/07/28 02:22:19 davidxu Exp $ # machine-independent gen sources .PATH: ${.CURDIR}/${MACHINE_ARCH}/gen ${.CURDIR}/gen @@ -56,7 +56,13 @@ getttyent.3 getusershell.3 getvfsbyname.3 \ glob.3 initgroups.3 isgreater.3 ldexp.3 lockf.3 makecontext.3 \ modf.3 msgctl.3 msgget.3 msgrcv.3 msgsnd.3 \ - nice.3 nlist.3 pause.3 popen.3 pselect.3 psignal.3 pwcache.3 \ + nice.3 nlist.3 pause.3 popen.3 \ + posix_spawn.3 posix_spawn_file_actions_addopen.3 \ + posix_spawn_file_actions_init.3 posix_spawnattr_getflags.3 \ + posix_spawnattr_getpgroup.3 posix_spawnattr_getschedparam.3 \ + posix_spawnattr_getschedpolicy.3 posix_spawnattr_init.3 \ + posix_spawnattr_getsigdefault.3 posix_spawnattr_getsigmask.3 \ + pselect.3 psignal.3 pwcache.3 \ raise.3 rand48.3 readpassphrase.3 rfork_thread.3 \ scandir.3 sem_destroy.3 sem_getvalue.3 sem_init.3 \ sem_open.3 sem_post.3 sem_timedwait.3 sem_wait.3 \ @@ -124,6 +130,17 @@ MLINKS+=makecontext.3 swapcontext.3 MLINKS+=modf.3 modff.3 modf.3 modfl.3 MLINKS+=popen.3 pclose.3 +MLINKS+=posix_spawn.3 posix_spawnp.3 \ + posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addclose.3 \ + posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_adddup2.3 \ + posix_spawn_file_actions_init.3 posix_spawn_file_actions_destroy.3 \ + posix_spawnattr_getflags.3 posix_spawnattr_setflags.3 \ + posix_spawnattr_getpgroup.3 posix_spawnattr_setpgroup.3 \ + posix_spawnattr_getschedparam.3 posix_spawnattr_setschedparam.3 \ + posix_spawnattr_getschedpolicy.3 posix_spawnattr_setschedpolicy.3 \ + posix_spawnattr_getsigdefault.3 posix_spawnattr_setsigdefault.3 \ + posix_spawnattr_getsigmask.3 posix_spawnattr_setsigmask.3 \ + posix_spawnattr_init.3 posix_spawnattr_destroy.3 MLINKS+=psignal.3 strsignal.3 psignal.3 sys_siglist.3 psignal.3 sys_signame.3 MLINKS+=pwcache.3 group_from_gid.3 pwcache.3 user_from_uid.3 MLINKS+=rand48.3 _rand48.3 rand48.3 drand48.3 rand48.3 erand48.3 \ ==== //depot/projects/mpsafetty/sys/amd64/amd64/pmap.c#6 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.634 2008/07/18 22:05:51 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.638 2008/07/28 04:59:48 alc Exp $"); /* * Manages physical address maps. @@ -3350,9 +3350,8 @@ * are taken, but the code works. */ void -pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, - vm_object_t object, vm_pindex_t pindex, - vm_size_t size) +pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, vm_object_t object, + vm_pindex_t pindex, vm_size_t size) { vm_offset_t va; vm_page_t p, pdpg; @@ -3500,7 +3499,7 @@ void pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len, - vm_offset_t src_addr) + vm_offset_t src_addr) { vm_page_t free; vm_offset_t addr; @@ -4355,12 +4354,10 @@ } int -pmap_change_attr(va, size, mode) - vm_offset_t va; - vm_size_t size; - int mode; +pmap_change_attr(vm_offset_t va, vm_size_t size, int mode) { vm_offset_t base, offset, tmpva; + pdp_entry_t *pdpe; pd_entry_t *pde; pt_entry_t *pte; @@ -4368,32 +4365,53 @@ offset = va & PAGE_MASK; size = roundup(offset + size, PAGE_SIZE); - /* Only supported on kernel virtual addresses. */ - if (base <= VM_MAXUSER_ADDRESS) + /* + * Only supported on kernel virtual addresses, including the direct + * map but excluding the recursive map. + */ + if (base < DMAP_MIN_ADDRESS) return (EINVAL); /* - * XXX: We have to support tearing 2MB pages down into 4k pages if - * needed here. + * Pages that aren't mapped aren't supported. Also break down 2MB pages + * into 4KB pages if required. */ - /* Pages that aren't mapped aren't supported. */ - for (tmpva = base; tmpva < (base + size); ) { - pde = pmap_pde(kernel_pmap, tmpva); - if (*pde == 0) + PMAP_LOCK(kernel_pmap); + for (tmpva = base; tmpva < base + size; ) { + pdpe = pmap_pdpe(kernel_pmap, tmpva); + if (*pdpe == 0 || (*pdpe & PG_PS)) { + PMAP_UNLOCK(kernel_pmap); + return (EINVAL); + } + pde = pmap_pdpe_to_pde(pdpe, tmpva); + if (*pde == 0) { + PMAP_UNLOCK(kernel_pmap); return (EINVAL); + } if (*pde & PG_PS) { - /* Handle 2MB pages that are completely contained. */ - if (size >= NBPDR) { + /* + * If the current offset aligns with a 2MB page frame + * and there is at least 2MB left within the range, then + * we need not break down this page into 4KB pages. + */ + if ((tmpva & PDRMASK) == 0 && + tmpva + PDRMASK < base + size) { tmpva += NBPDR; continue; } - return (EINVAL); + if (!pmap_demote_pde(kernel_pmap, pde, tmpva)) { + PMAP_UNLOCK(kernel_pmap); + return (ENOMEM); + } } pte = vtopte(tmpva); - if (*pte == 0) + if (*pte == 0) { + PMAP_UNLOCK(kernel_pmap); return (EINVAL); + } tmpva += PAGE_SIZE; } + PMAP_UNLOCK(kernel_pmap); /* * Ok, all the pages exist, so run through them updating their ==== //depot/projects/mpsafetty/sys/dev/jme/if_jme.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/jme/if_jme.c,v 1.2 2008/07/18 04:20:48 yongari Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/jme/if_jme.c,v 1.3 2008/07/28 02:37:15 yongari Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -2346,7 +2346,10 @@ if (jme_newbuf(sc, rxd) != 0) { ifp->if_iqdrops++; /* Reuse buffer. */ - jme_discard_rxbuf(sc, sc->jme_cdata.jme_rx_cons); + for (; count < nsegs; count++) { + jme_discard_rxbuf(sc, cons); + JME_DESC_INC(cons, JME_RX_RING_CNT); + } if (sc->jme_cdata.jme_rxhead != NULL) { m_freem(sc->jme_cdata.jme_rxhead); JME_RXCHAIN_RESET(sc); ==== //depot/projects/mpsafetty/sys/i386/i386/pmap.c#3 (text+ko) ==== @@ -75,7 +75,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.623 2008/07/18 22:05:51 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.626 2008/07/28 05:41:35 alc Exp $"); /* * Manages physical address maps. @@ -3415,9 +3415,8 @@ * are taken, but the code works. */ void -pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, - vm_object_t object, vm_pindex_t pindex, - vm_size_t size) +pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, vm_object_t object, + vm_pindex_t pindex, vm_size_t size) { vm_page_t p; @@ -3545,7 +3544,7 @@ void pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len, - vm_offset_t src_addr) + vm_offset_t src_addr) { vm_page_t free; vm_offset_t addr; @@ -4422,10 +4421,7 @@ } int -pmap_change_attr(va, size, mode) - vm_offset_t va; - vm_size_t size; - int mode; +pmap_change_attr(vm_offset_t va, vm_size_t size, int mode) { vm_offset_t base, offset, tmpva; pt_entry_t *pte; @@ -4436,8 +4432,10 @@ offset = va & PAGE_MASK; size = roundup(offset + size, PAGE_SIZE); - /* Only supported on kernel virtual addresses. */ - if (base <= VM_MAXUSER_ADDRESS) + /* + * Only supported on kernel virtual addresses above the recursive map. + */ + if (base < VM_MIN_KERNEL_ADDRESS) return (EINVAL); /* 4MB pages and pages that aren't mapped aren't supported. */ ==== //depot/projects/mpsafetty/sys/kern/subr_lock.c#2 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/subr_lock.c,v 1.23 2008/05/15 20:10:06 attilio Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/subr_lock.c,v 1.24 2008/07/27 21:45:20 kmacy Exp $"); #include "opt_ddb.h" #include "opt_mprof.h" @@ -152,6 +152,7 @@ const char *name; int line; int ticks; + uintmax_t cnt_wait_max; uintmax_t cnt_max; uintmax_t cnt_tot; uintmax_t cnt_wait; @@ -267,8 +268,8 @@ for (p = lp->file; p != NULL && strncmp(p, "../", 3) == 0; p += 3); sbuf_printf(sb, - "%6ju %12ju %12ju %11ju %5ju %5ju %12ju %12ju %s:%d (%s:%s)\n", - lp->cnt_max / 1000, lp->cnt_tot / 1000, + "%8ju %9ju %11ju %11ju %11ju %6ju %6ju %2ju %6ju %s:%d (%s:%s)\n", + lp->cnt_max / 1000, lp->cnt_wait_max / 1000, lp->cnt_tot / 1000, lp->cnt_wait / 1000, lp->cnt_cur, lp->cnt_cur == 0 ? (uintmax_t)0 : lp->cnt_tot / (lp->cnt_cur * 1000), @@ -304,6 +305,8 @@ l->ticks = t; if (l->cnt_max > dst->cnt_max) dst->cnt_max = l->cnt_max; + if (l->cnt_wait_max > dst->cnt_wait_max) + dst->cnt_wait_max = l->cnt_wait_max; dst->cnt_tot += l->cnt_tot; dst->cnt_wait += l->cnt_wait; dst->cnt_cur += l->cnt_cur; @@ -344,8 +347,8 @@ retry_sbufops: sb = sbuf_new(NULL, NULL, LPROF_SBUF_SIZE * multiplier, SBUF_FIXEDLEN); - sbuf_printf(sb, "\n%6s %12s %12s %11s %5s %5s %12s %12s %s\n", - "max", "total", "wait_total", "count", "avg", "wait_avg", "cnt_hold", "cnt_lock", "name"); + sbuf_printf(sb, "\n%8s %9s %11s %11s %11s %6s %6s %2s %6s %s\n", + "max", "wait_max", "total", "wait_total", "count", "avg", "wait_avg", "cnt_hold", "cnt_lock", "name"); enabled = lock_prof_enable; lock_prof_enable = 0; pause("lpreset", hz / 10); @@ -542,6 +545,8 @@ */ if (holdtime > lp->cnt_max) lp->cnt_max = holdtime; + if (l->lpo_waittime > lp->cnt_wait_max) + lp->cnt_wait_max = l->lpo_waittime; lp->cnt_tot += holdtime; lp->cnt_wait += l->lpo_waittime; lp->cnt_contest_locking += l->lpo_contest_locking; ==== //depot/projects/mpsafetty/sys/kern/vfs_subr.c#3 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/kern/vfs_subr.c,v 1.733 2008/07/21 23:01:09 attilio Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_subr.c,v 1.735 2008/07/27 11:48:15 pjd Exp $"); #include "opt_ddb.h" #include "opt_mac.h" @@ -2282,7 +2282,7 @@ vinactive(struct vnode *vp, struct thread *td) { - ASSERT_VOP_LOCKED(vp, "vinactive"); + ASSERT_VOP_ELOCKED(vp, "vinactive"); ASSERT_VI_LOCKED(vp, "vinactive"); VNASSERT((vp->v_iflag & VI_DOINGINACT) == 0, vp, ("vinactive: recursed on VI_DOINGINACT")); @@ -2439,7 +2439,7 @@ { int recycled; - ASSERT_VOP_LOCKED(vp, "vrecycle"); + ASSERT_VOP_ELOCKED(vp, "vrecycle"); recycled = 0; VI_LOCK(vp); if (vp->v_usecount == 0) { @@ -2474,7 +2474,7 @@ struct mount *mp; CTR1(KTR_VFS, "vgonel: vp %p", vp); - ASSERT_VOP_LOCKED(vp, "vgonel"); + ASSERT_VOP_ELOCKED(vp, "vgonel"); ASSERT_VI_LOCKED(vp, "vgonel"); VNASSERT(vp->v_holdcnt, vp, ("vgonel: vp %p has no reference.", vp)); @@ -3581,7 +3581,8 @@ * This only exists to supress warnings from unlocked specfs accesses. It is * no longer ok to have an unlocked VFS. */ -#define IGNORE_LOCK(vp) ((vp)->v_type == VCHR || (vp)->v_type == VBAD) +#define IGNORE_LOCK(vp) (panicstr != NULL || (vp) == NULL || \ + (vp)->v_type == VCHR || (vp)->v_type == VBAD) int vfs_badlock_ddb = 1; /* Drop into debugger on violation. */ SYSCTL_INT(_debug, OID_AUTO, vfs_badlock_ddb, CTLFLAG_RW, &vfs_badlock_ddb, 0, ""); @@ -3631,7 +3632,7 @@ assert_vop_locked(struct vnode *vp, const char *str) { - if (vp && !IGNORE_LOCK(vp) && VOP_ISLOCKED(vp) == 0) + if (!IGNORE_LOCK(vp) && VOP_ISLOCKED(vp) == 0) vfs_badlock("is not locked but should be", str, vp); } @@ -3639,8 +3640,7 @@ assert_vop_unlocked(struct vnode *vp, const char *str) { - if (vp && !IGNORE_LOCK(vp) && - VOP_ISLOCKED(vp) == LK_EXCLUSIVE) + if (!IGNORE_LOCK(vp) && VOP_ISLOCKED(vp) == LK_EXCLUSIVE) vfs_badlock("is locked but should not be", str, vp); } @@ -3648,8 +3648,7 @@ assert_vop_elocked(struct vnode *vp, const char *str) { - if (vp && !IGNORE_LOCK(vp) && - VOP_ISLOCKED(vp) != LK_EXCLUSIVE) + if (!IGNORE_LOCK(vp) && VOP_ISLOCKED(vp) != LK_EXCLUSIVE) vfs_badlock("is not exclusive locked but should be", str, vp); } @@ -3658,8 +3657,7 @@ assert_vop_elocked_other(struct vnode *vp, const char *str) { - if (vp && !IGNORE_LOCK(vp) && - VOP_ISLOCKED(vp) != LK_EXCLOTHER) + if (!IGNORE_LOCK(vp) && VOP_ISLOCKED(vp) != LK_EXCLOTHER) vfs_badlock("is not exclusive locked by another thread", str, vp); } @@ -3668,8 +3666,7 @@ assert_vop_slocked(struct vnode *vp, const char *str) { - if (vp && !IGNORE_LOCK(vp) && - VOP_ISLOCKED(vp) != LK_SHARED) + if (!IGNORE_LOCK(vp) && VOP_ISLOCKED(vp) != LK_SHARED) vfs_badlock("is not locked shared but should be", str, vp); } #endif /* 0 */ ==== //depot/projects/mpsafetty/sys/netinet/ip_divert.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/netinet/ip_divert.c,v 1.133 2008/04/21 12:03:59 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/netinet/ip_divert.c,v 1.134 2008/07/27 20:48:22 mav Exp $"); #if !defined(KLD_MODULE) #include "opt_inet.h" @@ -268,9 +268,9 @@ nport = htons((u_int16_t)divert_info(mtag)); INP_INFO_RLOCK(&divcbinfo); LIST_FOREACH(inp, &divcb, inp_list) { - INP_RLOCK(inp); /* XXX why does only one socket match? */ if (inp->inp_lport == nport) { + INP_RLOCK(inp); sa = inp->inp_socket; SOCKBUF_LOCK(&sa->so_rcv); if (sbappendaddr_locked(&sa->so_rcv, @@ -283,7 +283,6 @@ INP_RUNLOCK(inp); break; } - INP_RUNLOCK(inp); } INP_INFO_RUNLOCK(&divcbinfo); if (sa == NULL) { ==== //depot/projects/mpsafetty/sys/netinet/raw_ip.c#4 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/netinet/raw_ip.c,v 1.190 2008/07/26 21:12:00 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/netinet/raw_ip.c,v 1.191 2008/07/28 06:57:28 mav Exp $"); #include "opt_inet6.h" #include "opt_ipsec.h" @@ -126,12 +126,13 @@ INP_INFO_WLOCK_ASSERT(pcbinfo); INP_WLOCK_ASSERT(inp); - if (inp->inp_ip_p && inp->inp_laddr.s_addr && inp->inp_faddr.s_addr) { + if (inp->inp_ip_p != 0 && + inp->inp_laddr.s_addr != INADDR_ANY && + inp->inp_faddr.s_addr != INADDR_ANY) { hash = INP_PCBHASH_RAW(inp->inp_ip_p, inp->inp_laddr.s_addr, inp->inp_faddr.s_addr, pcbinfo->ipi_hashmask); - } else { + } else hash = 0; - } pcbhash = &pcbinfo->ipi_hashbase[hash]; LIST_INSERT_HEAD(pcbhash, inp, inp_hash); } @@ -139,7 +140,10 @@ static void rip_delhash(struct inpcb *inp) { + + INP_INFO_WLOCK_ASSERT(inp->inp_pcbinfo); INP_WLOCK_ASSERT(inp); + LIST_REMOVE(inp, inp_hash); } @@ -708,6 +712,8 @@ static void rip_dodisconnect(struct socket *so, struct inpcb *inp) { + + INP_INFO_WLOCK_ASSERT(inp->inp_pcbinfo); INP_WLOCK_ASSERT(inp); rip_delhash(inp); ==== //depot/projects/mpsafetty/sys/netinet6/icmp6.c#2 (text+ko) ==== @@ -61,7 +61,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/netinet6/icmp6.c,v 1.85 2008/07/05 13:10:10 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/netinet6/icmp6.c,v 1.86 2008/07/27 20:30:34 mav Exp $"); #include "opt_inet.h" #include "opt_inet6.h" @@ -1897,24 +1897,20 @@ INP_INFO_RLOCK(&ripcbinfo); LIST_FOREACH(in6p, &ripcb, inp_list) { - INP_RLOCK(in6p); - if ((in6p->inp_vflag & INP_IPV6) == 0) { - docontinue: - INP_RUNLOCK(in6p); + if ((in6p->inp_vflag & INP_IPV6) == 0) continue; - } if (in6p->in6p_ip6_nxt != IPPROTO_ICMPV6) - goto docontinue; + continue; if (!IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_laddr) && !IN6_ARE_ADDR_EQUAL(&in6p->in6p_laddr, &ip6->ip6_dst)) - goto docontinue; + continue; if (!IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_faddr) && !IN6_ARE_ADDR_EQUAL(&in6p->in6p_faddr, &ip6->ip6_src)) - goto docontinue; + continue; if (in6p->in6p_icmp6filt && ICMP6_FILTER_WILLBLOCK(icmp6->icmp6_type, in6p->in6p_icmp6filt)) - goto docontinue; + continue; if (last) { struct mbuf *n = NULL; @@ -1974,7 +1970,9 @@ INP_RUNLOCK(last); } last = in6p; + INP_RLOCK(last); } + INP_INFO_RUNLOCK(&ripcbinfo); if (last) { if (last->in6p_flags & IN6P_CONTROLOPTS) ip6_savecontrol(last, m, &opts); @@ -2014,7 +2012,6 @@ m_freem(m); ip6stat.ip6s_delivered--; } - INP_INFO_RUNLOCK(&ripcbinfo); return IPPROTO_DONE; } ==== //depot/projects/mpsafetty/sys/netinet6/raw_ip6.c#3 (text+ko) ==== @@ -60,7 +60,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/netinet6/raw_ip6.c,v 1.80 2008/07/08 18:41:36 bz Exp $"); +__FBSDID("$FreeBSD: src/sys/netinet6/raw_ip6.c,v 1.81 2008/07/27 20:30:34 mav Exp $"); #include "opt_ipsec.h" #include "opt_inet6.h" @@ -154,27 +154,23 @@ INP_INFO_RLOCK(&ripcbinfo); LIST_FOREACH(in6p, &ripcb, inp_list) { - INP_RLOCK(in6p); - if ((in6p->in6p_vflag & INP_IPV6) == 0) { -docontinue: - INP_RUNLOCK(in6p); + if ((in6p->in6p_vflag & INP_IPV6) == 0) continue; - } if (in6p->in6p_ip6_nxt && in6p->in6p_ip6_nxt != proto) - goto docontinue; + continue; if (!IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_laddr) && !IN6_ARE_ADDR_EQUAL(&in6p->in6p_laddr, &ip6->ip6_dst)) - goto docontinue; + continue; if (!IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_faddr) && !IN6_ARE_ADDR_EQUAL(&in6p->in6p_faddr, &ip6->ip6_src)) - goto docontinue; + continue; if (in6p->in6p_cksum != -1) { rip6stat.rip6s_isum++; if (in6_cksum(m, proto, *offp, m->m_pkthdr.len - *offp)) { rip6stat.rip6s_badsum++; - goto docontinue; + continue; } } if (last) { @@ -210,7 +206,9 @@ INP_RUNLOCK(last); } last = in6p; + INP_RLOCK(last); } + INP_INFO_RUNLOCK(&ripcbinfo); #ifdef IPSEC /* * Check AH/ESP integrity. @@ -252,7 +250,6 @@ } ip6stat.ip6s_delivered--; } - INP_INFO_RUNLOCK(&ripcbinfo); return (IPPROTO_DONE); } ==== //depot/projects/mpsafetty/usr.bin/procstat/procstat.1#3 (text+ko) ==== @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/usr.bin/procstat/procstat.1,v 1.4 2008/04/21 17:09:53 rwatson Exp $ +.\" $FreeBSD: src/usr.bin/procstat/procstat.1,v 1.5 2008/07/28 08:01:24 ed Exp $ .\" .Dd April 19, 2008 .Dt PROCSTAT 1
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807280926.m6S9QRS8078787>