aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hyperv/hyperv_net.h
diff options
context:
space:
mode:
authorHaiyang Zhang <[email protected]>2018-03-22 19:01:14 +0000
committerDavid S. Miller <[email protected]>2018-03-25 21:07:40 +0000
commitc5d24bdd29cc6373331967b5034da21c12805f72 (patch)
tree1c402d73da8ca21c4b2ebc2f6f99fe2f98baeca6 /drivers/net/hyperv/hyperv_net.h
parenthv_netvsc: Fix the return status in RX path (diff)
downloadkernel-c5d24bdd29cc6373331967b5034da21c12805f72.tar.gz
kernel-c5d24bdd29cc6373331967b5034da21c12805f72.zip
hv_netvsc: Add range checking for rx packet offset and length
This patch adds range checking for rx packet offset and length. It may only happen if there is a host side bug. Signed-off-by: Haiyang Zhang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/hyperv/hyperv_net.h')
-rw-r--r--drivers/net/hyperv/hyperv_net.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index 32861036c3fc..960f06141472 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -793,6 +793,7 @@ struct netvsc_device {
/* Receive buffer allocated by us but manages by NetVSP */
void *recv_buf;
+ u32 recv_buf_size; /* allocated bytes */
u32 recv_buf_gpadl_handle;
u32 recv_section_cnt;
u32 recv_section_size;