mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 16:54:21 +00:00 
			
		
		
		
	PM / devfreq: Fix leak in devfreq_dev_release()
srcu_init_notifier_head() allocates resources that need to be released
with a srcu_cleanup_notifier_head() call.
Reported by kmemleak.
Fixes: 0fe3a66410 ("PM / devfreq: Add new DEVFREQ_TRANSITION_NOTIFIER notifier")
Cc: <stable@vger.kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
			
			
This commit is contained in:
		
							parent
							
								
									c46de2fb4a
								
							
						
					
					
						commit
						5693d07759
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		|  | @ -764,6 +764,7 @@ static void devfreq_dev_release(struct device *dev) | |||
| 		dev_pm_opp_put_opp_table(devfreq->opp_table); | ||||
| 
 | ||||
| 	mutex_destroy(&devfreq->lock); | ||||
| 	srcu_cleanup_notifier_head(&devfreq->transition_notifier_list); | ||||
| 	kfree(devfreq); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Boris Brezillon
						Boris Brezillon