Re: [patch 01/03] USB: USB/IP: add common functions needed

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <greg@...>
Cc: <linux-usb@...>, <linux-kernel@...>, Brian Merrell <bgmerrell@...>, Takahiro Hirofuchi <hirofuchi@...>, <gregkh@...>
Date: Friday, August 29, 2008 - 3:29 am

Am Freitag 29 August 2008 01:00:31 schrieb greg@kroah.com:

> +static ssize_t store_flag(struct device *dev, struct device_attribute *attr,

Needs error handling

> + usbip_debug_flag = flag;

Such functions better print into a buffer, handed over in one go.
Otherwise you can get results
-second message-
like this

> +/* there may be more cases to tweak the flags. */

There's no need to do this conditionally.

> +/* must free buffer */

Are you sure you cannot badly recourse here?

Regards
Oliver
--

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 00/03] USB-IP patches, , (Thu Aug 28, 7:00 pm)
Re: [patch 00/03] USB-IP patches, Brian G. Merrell, (Sat Aug 30, 1:50 am)
Re: [patch 00/03] USB-IP patches, Greg KH, (Tue Sep 2, 1:12 pm)
Re: [patch 00/03] USB-IP patches, Brian G. Merrell, (Tue Sep 23, 9:28 pm)
Re: [patch 00/03] USB-IP patches, Arnaldo Carvalho de Melo, (Thu Aug 28, 7:06 pm)
Re: [patch 03/03] USB: USB/IP: add host driver, Willy Tarreau, (Fri Aug 29, 1:43 am)
Re: [patch 02/03] USB: USB/IP: add client driver, Alan Stern, (Fri Aug 29, 12:02 pm)
Re: [patch 02/03] USB: USB/IP: add client driver, Oliver Neukum, (Fri Aug 29, 4:23 am)
Re: [patch 01/03] USB: USB/IP: add common functions needed, Oliver Neukum, (Fri Aug 29, 3:29 am)