Re: [PATCH] usb: use memdup_user()

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

 



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