mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	Connector: Correctly set the error code in case of success when dispatching receive callbacks
The recent changes to the connector code introduced this bug where even when a callback was invoked, we would return an error resulting in double freeing of the skb. This patch fixes this bug. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Cc: stable <stable@kernel.org> [.39] Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
		
							parent
							
								
									ea2c00095c
								
							
						
					
					
						commit
						663dd6dcaf
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
					@ -139,6 +139,7 @@ static int cn_call_callback(struct sk_buff *skb)
 | 
				
			||||||
	spin_unlock_bh(&dev->cbdev->queue_lock);
 | 
						spin_unlock_bh(&dev->cbdev->queue_lock);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (cbq != NULL) {
 | 
						if (cbq != NULL) {
 | 
				
			||||||
 | 
							err = 0;
 | 
				
			||||||
		cbq->callback(msg, nsp);
 | 
							cbq->callback(msg, nsp);
 | 
				
			||||||
		kfree_skb(skb);
 | 
							kfree_skb(skb);
 | 
				
			||||||
		cn_queue_release_callback(cbq);
 | 
							cn_queue_release_callback(cbq);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue