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