summaryrefslogtreecommitdiff
path: root/kernel/bpf
diff options
context:
space:
mode:
authorPrashant Malani <pmalani@chromium.org>2019-08-24 11:36:19 +0300
committerDavid S. Miller <davem@davemloft.net>2019-08-26 05:52:59 +0300
commitf53a7ad189594a112167efaf17ea8d0242b5ac00 (patch)
treea6fb436fa2844b808f326a64e62ae315d9204b1d /kernel/bpf
parent7177895154e6a35179d332f4a584d396c50d0612 (diff)
downloadlinux-f53a7ad189594a112167efaf17ea8d0242b5ac00.tar.xz
r8152: Set memory to all 0xFFs on failed reg reads
get_registers() blindly copies the memory written to by the usb_control_msg() call even if the underlying urb failed. This could lead to junk register values being read by the driver, since some indirect callers of get_registers() ignore the return values. One example is: ocp_read_dword() ignores the return value of generic_ocp_read(), which calls get_registers(). So, emulate PCI "Master Abort" behavior by setting the buffer to all 0xFFs when usb_control_msg() fails. This patch is copied from the r8152 driver (v2.12.0) published by Realtek (www.realtek.com). Signed-off-by: Prashant Malani <pmalani@chromium.org> Acked-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/bpf')
0 files changed, 0 insertions, 0 deletions