Re: [patch]fix usb serial race due to late shutdown
Oliver Neukum <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Organization | Novell |
| Message-ID | <[email protected]> |
Am Freitag, 16. März 2007 22:05 schrieb Pete Zaitcev: > On Fri, 16 Mar 2007 20:43:30 +0100, Oliver Neukum <[email protected]> wrote: > > > static struct usb_serial *serial_table[SERIAL_TTY_MINORS]; /* initially all NULL */ > > +static u32 deathrow[SERIAL_TTY_MINORS/32]; /* disconnected but open*/ > > Can you tell me why do you use a bitmap instead of putting the flag > into a port? It would only make sense if you wanted to set or clear > the flag when port is NULL, which you do not. Your accessor functions > reference port->number. Is there a reason why you don't add a poison > flag near the new field "busy" which you added? Originally, I considered freeing more memory at disconnect(). It turned out harder than I thought. I can add it to the port's data if you like. > > static spinlock_t table_lock; > > static LIST_HEAD(usb_serial_driver_list); > > +static DECLARE_WAIT_QUEUE_HEAD(usbserial_henchman); > > Why is this static instead of per-serial? Overkill. Unnecessary wakeups will be very rare, but the structure would grow and need initialisation. Regards Oliver ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel