Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106099812
D17450.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D17450.diff
View Options
Index: head/sys/net/if_lagg.c
===================================================================
--- head/sys/net/if_lagg.c
+++ head/sys/net/if_lagg.c
@@ -2033,15 +2033,18 @@
{
struct lagg_lb *lb = (struct lagg_lb *)sc->sc_psc;
struct lagg_port *lp_next;
- int i = 0;
+ int i = 0, rv;
+ rv = 0;
bzero(&lb->lb_ports, sizeof(lb->lb_ports));
LAGG_RLOCK();
CK_SLIST_FOREACH(lp_next, &sc->sc_ports, lp_entries) {
if (lp_next == lp)
continue;
- if (i >= LAGG_MAX_PORTS)
- return (EINVAL);
+ if (i >= LAGG_MAX_PORTS) {
+ rv = EINVAL;
+ break;
+ }
if (sc->sc_ifflags & IFF_DEBUG)
printf("%s: port %s at index %d\n",
sc->sc_ifname, lp_next->lp_ifp->if_xname, i);
@@ -2049,7 +2052,7 @@
}
LAGG_RUNLOCK();
- return (0);
+ return (rv);
}
static int
Index: head/sys/netinet/ip_options.c
===================================================================
--- head/sys/netinet/ip_options.c
+++ head/sys/netinet/ip_options.c
@@ -110,16 +110,16 @@
struct nhop4_extended nh_ext;
struct sockaddr_in ipaddr = { sizeof(ipaddr), AF_INET };
- NET_EPOCH_ENTER();
/* Ignore or reject packets with IP options. */
if (V_ip_doopts == 0)
return 0;
else if (V_ip_doopts == 2) {
type = ICMP_UNREACH;
code = ICMP_UNREACH_FILTER_PROHIB;
- goto bad;
+ goto bad_unlocked;
}
+ NET_EPOCH_ENTER();
dst = ip->ip_dst;
cp = (u_char *)(ip + 1);
cnt = (ip->ip_hl << 2) - sizeof (struct ip);
@@ -388,6 +388,7 @@
return (0);
bad:
NET_EPOCH_EXIT();
+bad_unlocked:
icmp_error(m, type, code, 0, 0);
IPSTAT_INC(ips_badoptions);
return (1);
Index: head/sys/netinet6/udp6_usrreq.c
===================================================================
--- head/sys/netinet6/udp6_usrreq.c
+++ head/sys/netinet6/udp6_usrreq.c
@@ -434,8 +434,8 @@
INP_RUNLOCK(last);
} else
INP_RUNLOCK(last);
- INP_INFO_RUNLOCK_ET(pcbinfo, et);
inp_lost:
+ INP_INFO_RUNLOCK_ET(pcbinfo, et);
return (IPPROTO_DONE);
}
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 26, 9:47 AM (11 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15603497
Default Alt Text
D17450.diff (1 KB)
Attached To
Mode
D17450: Fix three epoch leaks
Attached
Detach File
Event Timeline
Log In to Comment