tcp: force a dst refcount when prequeue packet
Before escaping RCU protected section and adding packet into prequeue, make sure the dst is refcounted. Reported-by: Mike Galbraith <bitbucket@online.de> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
		
					parent
					
						
							
								d2cb6ce730
							
						
					
				
			
			
				commit
				
					
						093162553c
					
				
			
		
					 1 changed files with 1 additions and 0 deletions
				
			
		|  | @ -1049,6 +1049,7 @@ static inline bool tcp_prequeue(struct sock *sk, struct sk_buff *skb) | |||
| 	    skb_queue_len(&tp->ucopy.prequeue) == 0) | ||||
| 		return false; | ||||
| 
 | ||||
| 	skb_dst_force(skb); | ||||
| 	__skb_queue_tail(&tp->ucopy.prequeue, skb); | ||||
| 	tp->ucopy.memory += skb->truesize; | ||||
| 	if (tp->ucopy.memory > sk->sk_rcvbuf) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Eric Dumazet
				Eric Dumazet