Re: [PATCH] usb/musb: debugfs, fix copy_from_user argument

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

 



Hi,

On Wed, Jan 14, 2015 at 03:19:42PM +0000, David Laight wrote:
> From: Markus Pargmann
> > The first arugment has to be a pointer to the memory. buf is a char
> > array and already a pointer itself. The current code passes a pointer to
> > a char array to copy_from_user() which is not correct.
> 
> It doesn't matter, while the type of the argument is subtly different the
> value passed is the same.

Thanks, I didn't know about this. So the code is actually correct and
the patch is not a fix. I would still prefer to have it consistent with
the usage of 'buf' in the code above and below, where 'buf' is directly
used.

Best regards,

Markus

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux