Date: Fri, 21 Jun 2002 06:42:39 -0700 From: Maxime Henrion <mux@freebsd.org> To: current@FreeBSD.org Cc: hsu@FreeBSD.org Subject: fix for a bug that causes a panic in the udp_pcblist() sysctl Message-ID: <20020621134239.GX85244@elvis.mu.org>
next in thread | raw e-mail | index | archive | help
--YrlhzR9YrZtruaFS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi all,
I just fixed a bug that has been hitting me everytime I do a sysctl -a
since inp locking was committed. I would like to commit it as soon as
possible, so I'd like it if someone could review it.
Thanks,
Maxime
--YrlhzR9YrZtruaFS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="udp_usrreq.diff"
Index: udp_usrreq.c
===================================================================
RCS file: /space2/ncvs/src/sys/netinet/udp_usrreq.c,v
retrieving revision 1.113
diff -u -p -r1.113 udp_usrreq.c
--- udp_usrreq.c 14 Jun 2002 08:35:14 -0000 1.113
+++ udp_usrreq.c 21 Jun 2002 13:31:27 -0000
@@ -617,8 +617,10 @@ udp_pcblist(SYSCTL_HANDLER_ARGS)
INP_LOCK(inp);
if (inp->inp_gencnt <= gencnt) {
if (cr_canseesocket(req->td->td_ucred,
- inp->inp_socket))
+ inp->inp_socket)) {
+ INP_UNLOCK(inp);
continue;
+ }
inp_list[i++] = inp;
}
INP_UNLOCK(inp);
--YrlhzR9YrZtruaFS--
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020621134239.GX85244>
