summaryrefslogtreecommitdiffstats
path: root/drivers/net/hyperv/hyperv_net.h
diff options
context:
space:
mode:
authorHaiyang Zhang <haiyangz@microsoft.com>2018-03-22 12:01:14 -0700
committerDavid S. Miller <davem@davemloft.net>2018-03-25 17:07:40 -0400
commitc5d24bdd29cc6373331967b5034da21c12805f72 (patch)
tree1c402d73da8ca21c4b2ebc2f6f99fe2f98baeca6 /drivers/net/hyperv/hyperv_net.h
parent5c71dadbb45970a8f0544a27ae8f1cbd9750e516 (diff)
downloadblackbird-op-linux-c5d24bdd29cc6373331967b5034da21c12805f72.tar.gz
blackbird-op-linux-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 <haiyangz@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
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;
OpenPOWER on IntegriCloud