Re: [PATCH 2/2] wil6210: debugfs: replace in wil_link_stats_write() in wil_link_stats_write()

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

 



On Wed, Jul 06, 2022 at 09:57:57AM +0300, Dan Carpenter wrote:
> This code has a check for "if (rc != len) {" so it will fail if the
> simple_write_to_buffer() does not completely fill the buffer.  In
> particular it will fail if "*ppos != 0". Although this code works, it is
> more complicated than necessary.  Just use strndup_user() instead.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

NAK.  This one is buggy.  strndup_user() is too strict.  This will break
stuff.

regards,
dan carpenter




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux