Ramon van Handel wrote:
>
> Ulrich Weigand wrote:
> > I'm not yet sure how to properly fix this. Maybe we should
> > simply remove the FMWTEARDOWN ioctl completely, and only rely on
> > automatic destruction after the last handle to the file is closed
> > ...
>
> Hm, not really clean is it ? Perhaps somebody should mail to
> the linux-kernel list to ask for advice.
Well, who's to say what's clean? :-/ In any case, the kernel must
not rely on any action on part of the user mode for its own cleanup.
Even if the user mode never calls FMWTEARDOWN, the kernel must clean
up at the end. The other constraint is that memory that is mapped
to user space must never be freed.
So, the question is, what's the point of FMWTEARDOWN anyway? The only
possible correct and non-redundant use right now would be if the user
mode unmaps the VM, then calls FMWTEARDOWN, and then initializes the
VM again. But what's the point of this? If this is really needed,
I'd say the user mode could as well close and reopen the device file ...
Bye,
Ulrich
--
Ulrich Weigand,
IMMD 1, Universitaet Erlangen-Nuernberg,
Martensstr. 3, D-91058 Erlangen, Phone: +49 9131 85-27688