Messages in this thread | | | From | Duncan Sands <> | Subject | Re: [linux-usb-devel] [PATCH 7/9] USB usbfs: destroy submitted urbs only on the disconnected interface | Date | Wed, 14 Apr 2004 15:38:19 +0200 |
| |
On Wednesday 14 April 2004 15:30, Oliver Neukum wrote: > Am Mittwoch, 14. April 2004 12:45 schrieb Duncan Sands: > > The remaining three patches contain miscellaneous fixes to usbfs. > > This one fixes up the disconnect callback to only shoot down urbs > > on the disconnected interface, and not on all interfaces. It also adds > > a sanity check (this check is pointless because the interface could > > never have been claimed in the first place if it failed, but I feel > > better having it there). > > Well, I don't. If you care about it, add a WARN_ON(). > Checking without consequences is bad.
If the check fails then you are scribbling over kernel memory. So the consequences of the check failing are bad. Also, it is in a slow path. Thus I prefer to have the check even if it is supposed to never fail. I agree that a message should also be output.
Duncan. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |