tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pru & stat(2) failure / return cleanups



hi,

thanks for the reply

On Sun, Jul 06, 2014 at 09:44:05PM +0100, Iain Hibbert wrote:
> On Mon, 7 Jul 2014, Tyler Retzlaff wrote:
> >
> >     for protocols that allocate a pcb in attach should it ever be valid
> >     for socket->so_pcb to be NULL (except upon entry to attach)?
> >
> I do not remember exactly why, but in the Bluetooth (sys/netbt/) socket
> code, error is only returned for (so_pcb == NULL) after PRU_CONTROL,
> PRU_PURGEIF and PRU_ATTACH are handled. It probably means that I found
> somewhere that called those functions without a pcb .. at least
> PRU_CONTROL and PRU_PURGEIF are reached through ioctl() I don't know if
> that is relevant

okay, for the netbt protocols i'll make sure to retain existing
behavior. i didn't mention PRU_PURGEIF but you're right the existing
code does handle it differently in advance of testing so_pcb.

for those requests that aren't PRU_CONTROL, PRU_PURGEIF, PRU_ATTACH we
will likely go as far as KASSERT that so_pcb is not NULL. i'm not sure if
the gallery has any thoughts on doing so?

tyler


Home | Main Index | Thread Index | Old Index