]> git.baikalelectronics.ru Git - kernel.git/commit
rt2x00: use simple_read_from_buffer()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 22 Aug 2018 10:41:26 +0000 (13:41 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 31 Aug 2018 15:47:29 +0000 (18:47 +0300)
commitfdb5287a2a820d2bbd200c1b32da9dbf4f3070bd
tree2a685a9308dec63c23734547159182b269d6644b
parentda8f349e3be4b109f0b439c2bb901608f14c8f05
rt2x00: use simple_read_from_buffer()

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 Carpenter <dan.carpenter@oracle.com>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ralink/rt2x00/rt2x00debug.c