Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jul 2002 19:21:55 -0700 (PDT)
From:      Don Lewis <dl-freebsd@catspoiler.org>
To:        hsu@FreeBSD.org
Cc:        dl-freebsd@catspoiler.org, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/netinet udp_usrreq.c
Message-ID:  <200207140221.g6E2Ltwr020001@gw.catspoiler.org>
In-Reply-To: <0GZ5004IMH36IU@mta5.snfc21.pbi.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 12 Jul, Jeffrey Hsu wrote:
>   > I've been doing some digging through the code and it looks to me like
>   > both the INP_LOCK() and inp->inp_socket == NULL test can be eliminated.
> 
> The inp lock is needed for sure.

I dug through the source and didn't see anything that made me believe
that we need to hold this lock in the getcred code.  The only assignment
I saw to inp->socket is in in_pcballoc(), and this is protected
^H^H^H^H is *not* protected by the INP_INFO lock.  But that's ok I guess
since in_pcbremlists() isn't doing any locking either :-(


> It does look like the inp->inp_socket == NULL test can be eliminated, but
> I didn't want to introduce any extraneous changes with the inp locking patch,
> so that change is left for a later round.
> 
>   > The inp->inp_socket == NULL check shows up in the code
>   > listing in _TCP/IP Illustrated Volume 2_, but there doesn't seem to be
>   > any need for it there.  It probably slipped in to "fix" panic some time
>   > in the deep dark past when there were probably locking problems in the
>   > code.
> 
> This is where the CSRG SCCS archive comes in real handy.

That would make some interesting reading ...




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207140221.g6E2Ltwr020001>