f72207a5c0
The simple_write_to_buffer() function is designed to handle partial
writes. It returns negatives on error, otherwise it returns the number
of bytes that were able to be copied. This code doesn't check the
return properly. We only know that the first byte is written, the rest
of the buffer might be uninitialized.
There is no need to use the simple_write_to_buffer() function.
Partial writes are prohibited by the "if (*ppos != 0)" check at the
start of the function. Just use memdup_user() and copy the whole
buffer.
Fixes:
|
||
---|---|---|
.. | ||
Makefile | ||
bpf.c | ||
bus.c | ||
dev.c | ||
ethtool.c | ||
fib.c | ||
health.c | ||
hwstats.c | ||
ipsec.c | ||
netdev.c | ||
netdevsim.h | ||
psample.c | ||
udp_tunnels.c |