Skip to contentSkip to conversation

net: gro: Initialize backlog NAPI's gro_list

PATCH In review Sean Tranchetti 2 participants 2 messages Jul 21, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: gro: Initialize backlog NAPI's gro_list

When using RPS, the target CPU uses the backlog NAPI struct. This NAPI struct needs the list initialized explicitly as normally the list is initialized from netif_napi_add() on the netdevice.

Unable to handle kernel NULL pointer dereference at virtual address 00000008
Kernel BUG at ffffff9808909310 [verbose debug info unavailable]
PC is at napi_gro_flush+0x74/0x104
LR is at napi_gro_flush+0x70/0x104
[<ffffff9808909310>] napi_gro_flush+0x74/0x104
[<ffffff980890aa24>] net_rx_action+0x3f8/0x4d4
[<ffffff9807a81aac>] __do_softirq+0x144/0x468
[<ffffff9807ab1794>] irq_exit+0x118/0x144
[<ffffff9807b2ad68>] __handle_domain_irq+0x94/0xf8
[<ffffff9807a81884>] gic_handle_irq+0xd0/0x1b4
Fixes d4546c2509b1 ("net: Convert GRO SKB handling to list_head.")
---
 net/core/dev.c | 1 +
 1 file changed, 1 insertion(+)
net/core/dev.c +1 -0
index 4f8b92d..6b76745 100644
@@ -9556,6 +9556,7 @@ static int __init net_dev_init(void)
 
 		sd->backlog.poll = process_backlog;
 		sd->backlog.weight = weight_p;
+		INIT_LIST_HEAD(&sd->backlog.gro_list);
 	}
 
 	dev_boot_phase = 0;
Signature · 1 line
1.9.1
maintainer
#1 lore raw

From: Sean Tranchetti <[email protected]>
Date: Fri, 20 Jul 2018 17:53:23 -0600

net/core/dev.c static int __init net_dev_init(void) · line 9562

Quoted 8 lines
net/core/dev.c +1 -0
@@ -9556,6 +9556,7 @@ static int __init net_dev_init(void)
 
 		sd->backlog.poll = process_backlog;
 		sd->backlog.weight = weight_p;
+		INIT_LIST_HEAD(&sd->backlog.gro_list);
 	}
 
 	dev_boot_phase = 0;

This is no longer a list, but a hash table.

I'll code up the equivalent fix, thank you.