Re: clone_cleanup() doesn't

From: Ed Schouten <ed_at_80386.nl>
Date: Mon, 17 Aug 2009 16:23:14 +0200
Hi Andrew,

* Andrew Gallatin <gallatin_at_cs.duke.edu> wrote:
> 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

Over the last year I've made more rigorous changes to the kernel than
adding a new flag to make an undocumented kernel programming interface
work. Saying that the API has not been changed since 5.x isn't entirely
correct. Even the null.c source code of 5.x doesn't build on HEAD
anymore, because of d_maj, for example.

Even though we could probably change the code to |= D_NEEDMINOR, I'd
rather not. Having the flag there makes it very easy for me to figure
out which pieces of code still depend on clonelists. As Kostik pointed
out, you'd better use the cdevpriv interface if you need per-descriptor
data.

If it ever turns out we can live without clonelists, I am tempted to
remove unit numbers from character devices entirely, making si_drv0 the
integer counterpart of si_drv1 and si_drv2.

-- 
 Ed Schouten <ed_at_80386.nl>
 WWW: http://80386.nl/

Received on Mon Aug 17 2009 - 12:23:15 UTC

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