Re: [PATCH] usb-serial: don't let open files pin minor numbers

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

 



On Thu, 23 Jul 2009 10:19:45 -0400 (EDT)
Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:

> On Wed, 22 Jul 2009, Alan Cox wrote:
> 
> > > The device is going away, so there's no point in updating the
> > > permissions on the device file.  The correct thing to do is to delete
> > > the file.
> > 
> > However someone has the file open still what happens if the disconnect
> > races fchmod()
> 
> The same thing that happens if the disconnect races fchmod() when
> nobody has the file open -- whatever that is.

fchmod needs a file handle so I don't think that is true.

> > A lot of drivers don't reuse minor numbers at all nowdays for exactly
> > these reasons. The tty layer can't yet cope with that however.
> 
> Why not?  Sure, eventually numbers will have to be reused, but not in

Lots of arrays.

> the short term.  (Unless your system has about as many serial ports as
> possible minor numbers.)
> 
> > I raise it as a point of discussion. I'm not sure what the right answer
> > is.
> 
> Okay, if enough people end up thinking the patch shouldn't be accepted
> then so be it...  We'll see.  But if that's the case then we should
> merge a different patch, one that forces minor numbers not to be reused
> even if the device file isn't held open.
> 
> Shall I start up a flame-war^Wdiscussion about this on LKML?

Why not. Unless Greg has any specific views on how this should be handled
with USB ?
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux