Re: [Suggestion] drivers/usb/host/uhci* : sprintf, need check len when use buf

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

 



On Sat, 15 Dec 2012, Chen Gang wrote:

> 于 2012年12月14日 23:46, Alan Stern 写道:
> > 
> > The easiest fix is to increase MAX_OUTPUT.  Can you figure out how 
> > large it needs to be?
> > 
>   for me, it seems only increasing MAX_OUTPUT is not a good idea.
> 
>   maybe we can reference usb_device_dump:
>     it processes the same thing in a simple way.
>     it is in drivers/usb/core/devices.c
>       function usb_device_dump calls function usb_dump_desc
>       and function usb_dump_desc calls another dump functions.
>       usb_device_dump also has to recuse call itself to process a tree.
> 
> 
> > I'm not concerned with making this code absolutely 100% reliable.  It 
> > is used only for debugging; in almost all kernel builds it will not be 
> > compiled.
> > 
> 
>   if it is useless:
>     I suggest to delete it (which is better that fix it)
>   else
>     we need be sure that it is correct (or it can cause issue).

It is _almost_ uesless.  I don't know of anybody who has had to use it 
for quite a few years.

But I still don't want to get rid of it, because it might possibly 
become useful in the future and it doesn't add any runtime overhead.

>   I feel:
>     we provide 20% can finish 80%.
>     but the left 20%, need us to provide 80%.
>     if we are focus on quality, we have to provide 80% for the left 20%.

In my opinion this problem is not serious enough to spend much time on, 
and I have lots of other, more important things, to do.  If you want to 
fix it, go ahead and send in a patch.

Alan Stern

--
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