aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/usb/asix.h
diff options
context:
space:
mode:
authorGravatar Dean Jenkins <Dean_Jenkins@mentor.com> 2017-08-07 09:50:15 +0100
committerGravatar David S. Miller <davem@davemloft.net> 2017-08-07 10:10:19 -0700
commit960eb4eeaa47a3a5061a4e47e28411e85840ab2c (patch)
treed974bf71d91054f1995708bec4b9830dbde91e57 /drivers/net/usb/asix.h
parentasix: Add rx->ax_skb = NULL after usbnet_skb_return() (diff)
downloadlinux-960eb4eeaa47a3a5061a4e47e28411e85840ab2c.tar.gz
linux-960eb4eeaa47a3a5061a4e47e28411e85840ab2c.tar.bz2
linux-960eb4eeaa47a3a5061a4e47e28411e85840ab2c.zip
asix: Ensure asix_rx_fixup_info members are all reset
There is a risk that the members of the structure asix_rx_fixup_info become unsynchronised leading to the possibility of a malfunction. For example, rx->split_head was not being set to false after an error was detected so potentially could cause a malformed 32-bit Data header word to be formed. Therefore add function reset_asix_rx_fixup_info() to reset all the members of asix_rx_fixup_info so that future processing will start with known initial conditions. Also, if (skb->len != offset) becomes true then call reset_asix_rx_fixup_info() so that the processing of the next URB starts with known initial conditions. Without the call, the check does nothing which potentially could lead to a malfunction when the next URB is processed. In addition, for robustness, call reset_asix_rx_fixup_info() before every error path's "return 0". This ensures that the next URB is processed from known initial conditions. Signed-off-by: Dean Jenkins <Dean_Jenkins@mentor.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/asix.h')
0 files changed, 0 insertions, 0 deletions