mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	tipc: Fix missing connection request handling
In filter_connect, we use waitqueue_active() to check for any connections to wakeup. But waitqueue_active() is missing memory barriers while accessing the critical sections, leading to inconsistent results. In this commit, we replace this with an SMP safe wq_has_sleeper() using the generic socket callback sk_data_ready(). Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
		
							parent
							
								
									f83246089c
								
							
						
					
					
						commit
						42b531de17
					
				
					 1 changed files with 1 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1581,8 +1581,7 @@ static bool filter_connect(struct tipc_sock *tsk, struct sk_buff *skb)
 | 
			
		|||
			return true;
 | 
			
		||||
 | 
			
		||||
		/* If empty 'ACK-' message, wake up sleeping connect() */
 | 
			
		||||
		if (waitqueue_active(sk_sleep(sk)))
 | 
			
		||||
			wake_up_interruptible(sk_sleep(sk));
 | 
			
		||||
		sk->sk_data_ready(sk);
 | 
			
		||||
 | 
			
		||||
		/* 'ACK-' message is neither accepted nor rejected: */
 | 
			
		||||
		msg_set_dest_droppable(hdr, 1);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue