Date: Mon, 10 May 1999 14:57:51 +0200 From: Pierre Beyssac <beyssac@enst.fr> To: Luigi Rizzo <luigi@labinfo.iet.unipi.it>, current@FreeBSD.ORG Subject: Re: m_get(M_WAIT, ...) _can_ return NULL ? Message-ID: <19990510145751.A429@enst.fr> In-Reply-To: <199905081332.PAA07452@labinfo.iet.unipi.it>; from Luigi Rizzo on Sat, May 08, 1999 at 03:32:33PM %2B0200 References: <199905081332.PAA07452@labinfo.iet.unipi.it>
next in thread | previous in thread | raw e-mail | index | archive | help
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 pb@enst.fr To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990510145751.A429>
