Commit c0bbbdc
__netif_receive_skb_core: pass skb by reference
__netif_receive_skb_core may change the skb pointer passed into it (e.g.
in rx_handler). The original skb may be freed as a result of this
operation.
The callers of __netif_receive_skb_core may further process original skb
by using pt_prev pointer returned by __netif_receive_skb_core thus
leading to unpleasant effects.
The solution is to pass skb by reference into __netif_receive_skb_core.
v2: Added Fixes tag and comment regarding ppt_prev and skb invariant.
Fixes: 88eb194 ("net: core: propagate SKB lists through packet_type lookup")
Signed-off-by: Boris Sukholitko <boris.sukholitko@broadcom.com>
Acked-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 88d7fcf commit c0bbbdc
1 file changed
Lines changed: 15 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4988 | 4988 | | |
4989 | 4989 | | |
4990 | 4990 | | |
4991 | | - | |
| 4991 | + | |
4992 | 4992 | | |
4993 | 4993 | | |
4994 | 4994 | | |
4995 | 4995 | | |
| 4996 | + | |
4996 | 4997 | | |
4997 | 4998 | | |
4998 | 4999 | | |
| |||
5023 | 5024 | | |
5024 | 5025 | | |
5025 | 5026 | | |
5026 | | - | |
5027 | | - | |
| 5027 | + | |
| 5028 | + | |
| 5029 | + | |
| 5030 | + | |
5028 | 5031 | | |
5029 | 5032 | | |
5030 | 5033 | | |
| |||
5174 | 5177 | | |
5175 | 5178 | | |
5176 | 5179 | | |
| 5180 | + | |
| 5181 | + | |
| 5182 | + | |
| 5183 | + | |
| 5184 | + | |
| 5185 | + | |
| 5186 | + | |
5177 | 5187 | | |
5178 | 5188 | | |
5179 | 5189 | | |
| |||
5183 | 5193 | | |
5184 | 5194 | | |
5185 | 5195 | | |
5186 | | - | |
| 5196 | + | |
5187 | 5197 | | |
5188 | 5198 | | |
5189 | 5199 | | |
| |||
5261 | 5271 | | |
5262 | 5272 | | |
5263 | 5273 | | |
5264 | | - | |
| 5274 | + | |
5265 | 5275 | | |
5266 | 5276 | | |
5267 | 5277 | | |
| |||
0 commit comments