lkml.org 
[lkml]   [2009]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateTue, 10 Nov 2009 15:15:53 -0200
FromThadeu Lima de Souza Cascardo <>
SubjectRe: [PATCH] misc: use a proper range for minor number dynamic allocation
On Tue, Nov 10, 2009 at 11:09:42AM +0000, Alan Cox wrote:
> > We could consider buggy the caller which asks for the same device name
> > more than once, without unregistering the first device. But better safe
> If they ask for the same name we certainly should. Probably we should
> error that request and use WARN_ON() to shame the offender in
> kerneloops.org.
>

The current code returns an error. It does not clear the bit in the
allocation bitmap, which is a bug in misc, which my first patch in the
series fixes now.

If it uses the same name, device_create is the responsible for failing.
It already logs that, but it uses no WARN right now. I think this WARN
should be in the driver core, not in misc, so we catch other offenders
as well.

> > than sorry: we should protect the correct drivers from the buggy ones
> > and avoid a depletion of the minor numbers. And, in case the driver core
> > returns another error for another reason (from device_create), we do the
> > right thing.
>
> Agreed we need to protect the working drivers.
>
> Alan

So, do you think this should be in 2.6.32 or even go down to stable?

Regards,
Cascardo.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2009-11-10 18:19    [from the cache]
©2003-2010