On Sat, May 08, 1999 at 03:32:33PM +0200, Luigi Rizzo wrote: > m = m_get(M_WAIT, ...) > m->m_len = something. > > looking at the code, it seems that m_get() _can_ return a NULL pointer > even if one specifies M_WAIT. > > Could this be a potential weakness, and in this case, how shuld we go > and fix it -- by making m_get never return if there is no memory, > or by hunting all such occurrences of the code ?
It's a well-known problem, it's a potential weakness, there are several pending PRs related to this (quick search from the subject, probably several more I didn't find): kern/9883 kern/10872 As Alfred said, this has been discussed several times on the lists, and IIRC the conclusion was that it's not easy to fix the code everywhere. It seemed best not to make m_get() wait, because it can result in unexpected blockings (classical starvation problem). I'd be willing to give it a look, but don't expect it to be 100% solved anytime soon. -- Pierre Beyssac p...@enst.fr To Unsubscribe: send mail to majord...@freebsd.org with "unsubscribe freebsd-current" in the body of the message