Skip to content
Commit 9bae5b05 authored by Sonia Sharma's avatar Sonia Sharma Committed by David S. Miller
Browse files

hv_netvsc: fix netvsc_send_completion to avoid multiple message length checks



The switch statement in netvsc_send_completion() is incorrectly validating
the length of incoming network packets by falling through to the next case.
Avoid the fallthrough. Instead break after a case match and then process
the complete() call.
The current code has not caused any known failures. But nonetheless, the
code should be corrected as a different ordering of the switch cases might
cause a length check to fail when it should not.

Signed-off-by: default avatarSonia Sharma <sonia.sharma@linux.microsoft.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0e594c1f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment