Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 01 Sep 2006 18:20:58 +0200
From:      =?UTF-8?B?VsOhY2xhdiBIYWlzbWFu?= <V.Haisman@sh.cvut.cz>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: malloc(M_WAITOK) of "g_bio", forcing M_NOWAIT with non-sleepable locks held:
Message-ID:  <44F85DEA.2010206@sh.cvut.cz>
In-Reply-To: <20060901104141.J4921@fledge.watson.org>
References:  <44F67DC2.1060900@sh.cvut.cz> <20060901104141.J4921@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]


Robert Watson wrote, On 1.9.2006 11:46:
> 
> On Thu, 31 Aug 2006, Václav Haisman wrote:
> 
>> I found this in logs of 6.1 box that I admin this morning. The machine
>> keeps running after that.
> 
> Indeed, there does appear to be a problem in the TCP socket option code
> with respect to performing copyin/copyout while holding the inpcb lock. 
> This problem is not present in the IP layer socket option code. 
> However, the code between HEAD and 6-STABLE here differs significantly,
> so fixing this will require different changes in the two branches. 
> Could you file a problem report on this, and forward me the PR receipt? 
> I'm on travel in India currently, with mixed connectivity, so it may be
> a little bit before I can get to fixing the problem.
> 
> In principle, the risk here is a deadlock, but the fix is a little
> complicated as if we release the lock there, the state of the TCP socket
> can change, so when the code picks up from the copyin/copyout, it needs
> to validate that the operation is still valid on the socket (i.e., the
> connection hasn't been reset during the system call -- perhaps while the
> application is blocked waiting on disk i/o for a paged out page that
> contains the socket option).  This is very unlikely to trigger in
> practice, the warning there is quite conservative, but needs to be
> addressed properly.
> 
> Thanks for the report,
> 
> Robert N M Watson
> Computer Laboratory
> University of Cambridge

Here is the PR: http://www.freebsd.org/cgi/query-pr.cgi?pr=102752

--
Vaclav Haisman


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEVAwUBRPhd/kNOZDESBK8FAQIKtQf+JVl57cOxPsmlhjVU22tJCr/WloqCkCFK
9f4928WY+9Tgk3qRzZtg7WW/kdA6f/kUZt8AKUOFXNS1euj0JGIQKOfFOt21Wz/B
mtpkCdupBdzmN5AVmSRzGwaMKPOwDeK8DVjz4jDcQR8uJweDvC5sOVyKlocS9UGk
M6oSfzOxyXSg8Od7D1VX7CzCdsWqZtz5x+cE0rHvhAkoB1nL3ojbfpvBKqNtvc7d
vgGu3T+DK/l2W6PD/5iQ9Kgj+Nu0CN2T1Z3oT9Q1sPU6snXsrMSfBlZw/n4MEW5J
uxDAQwSCp64H+sp5TjdzutM7dNRxBq0vUfEzXLWacn7RBk8FHVepXQ==
=sXi6
-----END PGP SIGNATURE-----

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