tech-kern archive

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

Re: kernel panic with new pseudo device



On Thu, May 21, 2009 at 12:44:44PM -0400, Michael wrote:
> You use CFATTACH_DECL_NEW yet all your device methods use struct device * 
> and there's a struct device in your softc. CFATTACH_DECL_NEW is for 
> devices that split device and softc and use device_t instead. So, you 
> panic because your code assumes that device and softc are the same thing 
> but in reality you have only a device_t, try to access the softc fields 
> behind it and segfault. To get your softc you need to call 
> device_private() and store it in your softc for future reference.

It would be nice to have this information in driver(9) manual page, as
requested also in problem report #39037...

- Jukka.


Home | Main Index | Thread Index | Old Index