Witness warning with SCTP
Attilio Rao
attilio at freebsd.org
Thu Jan 11 08:12:27 PST 2007
2007/1/10, John Baldwin <jhb at freebsd.org>:
> On Wednesday 10 January 2007 10:03, Randall Stewart wrote:
> > Robert/All:
> >
> > Ok, here is the deal... I have looked in a bit
> > closer at this..
> >
> > Here is what is happening...
> >
> > When a cookie arrives, we get a "create lock" on
> > the socket this prevents the user on the same
> > socket from creating a assoc at the same exact time.
>
> Can't you do a model like this:
>
> lock();
> if (need to create pcb) {
> unlock();
> create_pcb(); // can sleep w/o holding lock
> lock();
> if (someone else created the pcb)
> free(pcb_I_just_created);
> }
> unlock();
But it is quite impossible to get rid of M_WAITOK in this case (IIUC,
this should be the sleeping point)?
Attilio
--
Peace can only be achieved by understanding - A. Einstein
More information about the freebsd-current
mailing list