Re: [PATCHv3 1/3] USB: gadget: mass/file storage: set serial number

From: David Brownell
Date: Tue Jul 20 2010 - 11:01:43 EST




--- On Tue, 7/20/10, MichaÅ Nazarewicz <m.nazarewicz@xxxxxxxxxxx> wrote:

> > Plus, you seem to be overlooking the basic need
> > (for userspace) to manage these IDs so they're
> > properly unique. Two gadgets should never end
> up
> > using the same serial number.
>
> I'm not overlooking that. I simply consider that a
> separate issue.
> Driver should provide some kind of default

It can't do that and guarantee uniqueness.
(Unless you consult the random number system,
which may not be available that early, and is
in any case not appropriate for this task.

Your concept is (still/again) broken.

(just like File
> Storage
> Gadget) and the fact that user space should
> override it is another
> matter in my opinion.

The value must come from userspace in the first
place, else it can't be correctly managed!!

>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/