> From: Jonathan Gray > Sent: Thursday, March 20, 2014 3:36 AM > > The following diff prevents the panic here:
Interesting, given the XXX, it seems somebody was already a little suspicious of this section :). >From a cursory glance, it seems pppx_dev_lookup is supposed to return data about a particular instance if it is in use, or NULL otherwise. So it seems for some reason pppxclose is being called for device that isn't open? While avoiding a panic is a plus :), it seems there is perhaps a logic error somewhere else resulting in an attempt to close a device that isn't open? > Index: if_pppx.c > ============================================================== > ===== > RCS file: /cvs/src/sys/net/if_pppx.c,v > retrieving revision 1.26 > diff -u -p -r1.26 if_pppx.c > --- if_pppx.c 19 Oct 2013 14:46:30 -0000 1.26 > +++ if_pppx.c 20 Mar 2014 10:21:04 -0000 > @@ -590,7 +590,8 @@ pppxclose(dev_t dev, int flags, int mode > > rw_enter_write(&pppx_devs_lk); > > - pxd = pppx_dev_lookup(dev); > + if ((pxd = pppx_dev_lookup(dev)) == NULL) > + return (ENXIO); > > /* XXX */ > while ((pxi = LIST_FIRST(&pxd->pxd_pxis)))