From owner-freebsd-current Fri Jun 21 6:42:45 2002 Delivered-To: freebsd-current@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id 58E7A37B40A; Fri, 21 Jun 2002 06:42:39 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1920) id 29FEFAE333; Fri, 21 Jun 2002 06:42:39 -0700 (PDT) Date: Fri, 21 Jun 2002 06:42:39 -0700 From: Maxime Henrion 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> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="YrlhzR9YrZtruaFS" Content-Disposition: inline User-Agent: Mutt/1.3.27i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --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