From owner-cvs-all Fri Jul 12 2:40:34 2002
Delivered-To: cvs-all@freebsd.org
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
by hub.freebsd.org (Postfix) with ESMTP
id BE75637B400; Fri, 12 Jul 2002 02:40:31 -0700 (PDT)
Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163])
by mx1.FreeBSD.org (Postfix) with ESMTP
id 19A2543E70; Fri, 12 Jul 2002 02:40:31 -0700 (PDT)
(envelope-from dl@catspoiler.org)
Received: from mousie.catspoiler.org (mousie.catspoiler.org [192.168.101.2])
by gw.catspoiler.org (8.12.5/8.12.5) with ESMTP id g6C9eLwr013336;
Fri, 12 Jul 2002 02:40:25 -0700 (PDT)
(envelope-from dl@catspoiler.org)
Message-Id: <200207120940.g6C9eLwr013336@gw.catspoiler.org>
Date: Fri, 12 Jul 2002 02:40:21 -0700 (PDT)
From: Don Lewis
Subject: Re: cvs commit: src/sys/netinet udp_usrreq.c
To: hsu@FreeBSD.org
Cc: dl-freebsd@catspoiler.org, cvs-committers@FreeBSD.org,
cvs-all@FreeBSD.org
In-Reply-To: <0GZ400HU8PNLLG@mta7.pltn13.pbi.net>
MIME-Version: 1.0
Content-Type: TEXT/plain; charset=us-ascii
Sender: owner-cvs-all@FreeBSD.ORG
Precedence: bulk
List-ID:
List-Archive: (Web Archive)
List-Help: (List Instructions)
List-Subscribe:
List-Unsubscribe:
X-Loop: FreeBSD.ORG
On 12 Jul, Jeffrey Hsu wrote:
> > Comparing udp_getcred() with tcp_getcred(), the missing lock looked like
> > an oversight.
>
> Okay, I see the confusion. I had the same question when I reviewed Jennifer's
> patch, but decided to err on the side of conservatism and allow it. I actually
> believe that lock is unnecessary in tcp_getcred().
>
> > Isn't it possible for inp->inp_socket to get modified by
> > another thread in either case unless inp is locked?
>
> Unless I missed a code path, I don't see how that can happen.
Yeah, you may be correct. I was worried about
udp_detach()->in_pcbdetach() path, but that looks like it is protected
by the INP_INFO lock.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message