Re: Witness warning with SCTP

From: Attilio Rao <attilio_at_freebsd.org>
Date: Thu, 11 Jan 2007 16:44:51 +0100
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
Received on Thu Jan 11 2007 - 15:12:27 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:04 UTC