Re: clone_cleanup() doesn't

From: Andrew Gallatin <gallatin_at_cs.duke.edu>
Date: Mon, 17 Aug 2009 08:37:31 -0400
Ed Schouten wrote:
> * Andrew Gallatin <gallatin_at_cs.duke.edu> wrote:
>> FWIW, the fix to my problem was to add D_NEEDMINOR to
>> my cdevsw d_flags, to restore the same behavior as FreeBSD 5/6/7
> 
> Yes. INVARIANTS should trigger a kernel panic if you use clone_create()
> without D_NEEDMINOR. I think you probably didn't have it enabled, which
> means it dies later on.
> 

No, I didn't have INVARIANTS compiled in, I probably should have.

Is there any reason you don't just |= in D_NEEDMINOR on first
use of clone_create()?  By adding the requirement of this flag,
you've gratuitously broken any 3rd party driver using clones,
which has used the same API unchanged since 5.x

Drew
Received on Mon Aug 17 2009 - 10:38:01 UTC

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