Re: [PATCH] usb: use memdup_user()

From: Oliver Neukum
Date: Mon May 04 2009 - 10:02:01 EST


Am Montag, 4. Mai 2009 09:02:38 schrieb David Brownell:
> On Sunday 03 May 2009, Oliver Neukum wrote:
> > No. To make it plain. To me any use of memdup_user() in USB code
> > is a bad idea. I don't want to have to think about a new primitive.
>
> Unless it's incorrect to use that, I have to say that it
> makes more sense to use that utility than recreate it by
> open-coding...

I want people to be forced to think about memory allocations.
We had endless trouble during 2.4 with storage deadlocking.
We simply need full control of this.

I prefer the explicite way for the same reason I prefer

if (rv < 0)
goto err_out;

over

if (rv < 0)
return rv;

In the former version you need to think about what you need to do
to cleanup.

Regards
Oliver

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