uipc_socket.c (117595) | uipc_socket.c (117708) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 20 unchanged lines hidden (view full) --- 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)uipc_socket.c 8.3 (Berkeley) 4/15/94 34 */ 35 36#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 20 unchanged lines hidden (view full) --- 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)uipc_socket.c 8.3 (Berkeley) 4/15/94 34 */ 35 36#include <sys/cdefs.h> |
37__FBSDID("$FreeBSD: head/sys/kern/uipc_socket.c 117595 2003-07-14 20:39:22Z hsu $"); | 37__FBSDID("$FreeBSD: head/sys/kern/uipc_socket.c 117708 2003-07-17 23:49:10Z robert $"); |
38 39#include "opt_inet.h" 40#include "opt_mac.h" 41#include "opt_zero.h" 42 43#include <sys/param.h> 44#include <sys/systm.h> 45#include <sys/fcntl.h> --- 1082 unchanged lines hidden (view full) --- 1128 struct sockbuf asb; 1129 1130 sb->sb_flags |= SB_NOINTR; 1131 (void) sblock(sb, M_WAITOK); 1132 s = splimp(); 1133 socantrcvmore(so); 1134 sbunlock(sb); 1135 asb = *sb; | 38 39#include "opt_inet.h" 40#include "opt_mac.h" 41#include "opt_zero.h" 42 43#include <sys/param.h> 44#include <sys/systm.h> 45#include <sys/fcntl.h> --- 1082 unchanged lines hidden (view full) --- 1128 struct sockbuf asb; 1129 1130 sb->sb_flags |= SB_NOINTR; 1131 (void) sblock(sb, M_WAITOK); 1132 s = splimp(); 1133 socantrcvmore(so); 1134 sbunlock(sb); 1135 asb = *sb; |
1136 bzero(sb, sizeof (*sb)); | 1136 /* 1137 * Invalidate/clear most of the sockbuf structure, but keep 1138 * its selinfo structure valid. 1139 */ 1140 bzero(&sb->sb_startzero, 1141 sizeof(*sb) - offsetof(struct sockbuf, sb_startzero)); |
1137 splx(s); | 1142 splx(s); |
1143 |
|
1138 if (pr->pr_flags & PR_RIGHTS && pr->pr_domain->dom_dispose) 1139 (*pr->pr_domain->dom_dispose)(asb.sb_mb); 1140 sbrelease(&asb, so); 1141} 1142 1143#ifdef INET 1144static int 1145do_setopt_accept_filter(so, sopt) --- 708 unchanged lines hidden --- | 1144 if (pr->pr_flags & PR_RIGHTS && pr->pr_domain->dom_dispose) 1145 (*pr->pr_domain->dom_dispose)(asb.sb_mb); 1146 sbrelease(&asb, so); 1147} 1148 1149#ifdef INET 1150static int 1151do_setopt_accept_filter(so, sopt) --- 708 unchanged lines hidden --- |