Skip to content
Snippets Groups Projects
Commit ee2b511e authored by Felix Fietkau's avatar Felix Fietkau
Browse files

cns3xxx: prevent the ethernet driver from accessing uninitialized dma descriptor entries

SVN-Revision: 35950
parent d22ac8d8
No related branches found
No related tags found
No related merge requests found
...@@ -619,8 +619,9 @@ static int eth_poll(struct napi_struct *napi, int budget) ...@@ -619,8 +619,9 @@ static int eth_poll(struct napi_struct *napi, int budget)
unsigned int length; unsigned int length;
unsigned int i = rx_ring->cur_index; unsigned int i = rx_ring->cur_index;
struct rx_desc *desc = &(rx_ring)->desc[i]; struct rx_desc *desc = &(rx_ring)->desc[i];
unsigned int alloc_count = rx_ring->alloc_count;
while (desc->cown) { while (desc->cown && alloc_count + received < RX_DESCS - 1) {
struct sk_buff *skb; struct sk_buff *skb;
int reserve = SKB_HEAD_ALIGN; int reserve = SKB_HEAD_ALIGN;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment