mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	PCI/DOE: Fix memory leak with CONFIG_DEBUG_OBJECTS=y
After a pci_doe_task completes, its work_struct needs to be destroyed
to avoid a memory leak with CONFIG_DEBUG_OBJECTS=y.
Fixes: 9d24322e88 ("PCI/DOE: Add DOE mailbox support functions")
Tested-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: stable@vger.kernel.org # v6.0+
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/775768b4912531c3b887d405fc51a50e465e1bf9.1678543498.git.lukas@wunner.de
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
			
			
This commit is contained in:
		
							parent
							
								
									92dc899c3b
								
							
						
					
					
						commit
						abf04be0e7
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		| 
						 | 
					@ -224,6 +224,7 @@ static void signal_task_complete(struct pci_doe_task *task, int rv)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	task->rv = rv;
 | 
						task->rv = rv;
 | 
				
			||||||
	task->complete(task);
 | 
						task->complete(task);
 | 
				
			||||||
 | 
						destroy_work_on_stack(&task->work);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void signal_task_abort(struct pci_doe_task *task, int rv)
 | 
					static void signal_task_abort(struct pci_doe_task *task, int rv)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue