Re: [patch]fix usb serial race due to late shutdown
Alan Stern <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 16 Mar 2007, Oliver Neukum wrote:
> Hi,
>
> this uses Greg's idea to call shutdown() during disconnect().
> It can do so by decoupling subdriver and core upon disconnect():
> Having made sure that no callbacks into a subdriver can occur, the
> subdriver's memory can be freed immediately.
> @@ -104,6 +106,7 @@
> for (i = *minor; (i < (*minor + num_ports)) && (i < SERIAL_TTY_MINORS); ++i) {
> serial_table[i] = serial;
> serial->port[j++]->number = i;
> + __clear_bit(i % 32, &deathrow[i / 32]);
You shouldn't need to do these computations. clear_bit(i, deathrow)
will work just as well. But the bitops want their argument to be an array
of unsigned long, not u32.
Alan Stern
-------------------------------------------------------------------------
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