On 05/06/17(Mon) 17:32, Claudio Jeker wrote:
> On Mon, Jun 05, 2017 at 11:32:06AM +0200, Martin Pieuchot wrote:
> > On 30/05/17(Tue) 13:59, Claudio Jeker wrote:
> > > - struct rawcb    *rp;
> > >   struct routecb  *rop;
> > >   int              af;
> > >   int              error = 0;
> > >  
> > > - rp = sotorawcb(so);
> > > + rop = sotoroutecb(so);
> > > + if (rop == NULL)
> > > +         return ENOTCONN;
> > 
> > Previously raw_usrreq() was returning EINVAL in that case.  Does it
> > matter?
> > 
> > You should also call m_freem(m), because even if PRU_RCVD and PRU_DETACH
> > do not take any argument, we cannot be sure all other code paths cannot
> > be reached.  That's one of the reasons I'm suggesting we split the PRU
> > switches in multiple functions.
> > 
> 
> What about we make this a KASSERT()? I think it is impossible to get there
> with a NULL pointer for the pcb.

Fine with me.

Reply via email to