Re: [PATCH] rt2x00: use simple_read_from_buffer()

2018-08-31 Thread Kalle Valo
Dan Carpenter wrote: > The problem with this copy_to_user() calls is that they don't ensure > that "size" is less than the "length" which the user provided. > > Obviously, this is debugfs and "size" is normally going to be very small > so it probably doesn't matter, but this is the correct thing

Re: [PATCH] rt2x00: use simple_read_from_buffer()

2018-08-22 Thread Stanislaw Gruszka
On Wed, Aug 22, 2018 at 01:41:26PM +0300, Dan Carpenter wrote: > The problem with this copy_to_user() calls is that they don't ensure > that "size" is less than the "length" which the user provided. > > Obviously, this is debugfs and "size" is normally going to be very small > so it probably doesn

[PATCH] rt2x00: use simple_read_from_buffer()

2018-08-22 Thread Dan Carpenter
The problem with this copy_to_user() calls is that they don't ensure that "size" is less than the "length" which the user provided. Obviously, this is debugfs and "size" is normally going to be very small so it probably doesn't matter, but this is the correct thing to do. Signed-off-by: Dan Carpe