kern/102752: malloc(M_WAITOK) of "g_bio", forcing M_NOWAIT with non-sleepable locks held

Robert Watson rwatson at FreeBSD.org
Fri Sep 1 16:28:19 UTC 2006


Synopsis: malloc(M_WAITOK) of "g_bio", forcing M_NOWAIT with non-sleepable locks held

Responsible-Changed-From-To: freebsd-bugs->rwatson
Responsible-Changed-By: rwatson
Responsible-Changed-When: Fri Sep 1 16:26:32 UTC 2006
Responsible-Changed-Why: 
Grab ownership of this PR, since it is of interest to me.  The fix here
is to drop the inpcb lock before going near copyin/copyout, but the
tricky bit is that the connection may change state while the lock is
dropped, so the path from the socket to the inpcb/tcpcb must be
re-evaluated, and the timewait state checked for.  In HEAD this is
easier since the inpcb can't go away, but in -STABLE we need to check
that so_pcb is still non-NULL also, as the connection could have been
reset.

I'll work on a patch for this in the near future.


http://www.freebsd.org/cgi/query-pr.cgi?pr=102752


More information about the freebsd-bugs mailing list