diff options
author | Lukas Wunner <lukas@wunner.de> | 2023-03-11 15:40:06 +0100 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2023-04-04 01:17:21 +0200 |
commit | abf04be0e7071f2bcd39bf97ba407e7d4439785e (patch) | |
tree | fb2cca4ba885a6408aa067530f452a4e966135b8 /drivers | |
parent | PCI/DOE: Silence WARN splat with CONFIG_DEBUG_OBJECTS=y (diff) | |
download | linux-abf04be0e7071f2bcd39bf97ba407e7d4439785e.tar.xz linux-abf04be0e7071f2bcd39bf97ba407e7d4439785e.zip |
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: 9d24322e887b ("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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/doe.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/doe.c b/drivers/pci/doe.c index c14ffdf23f87..e5e9b287b976 100644 --- a/drivers/pci/doe.c +++ b/drivers/pci/doe.c @@ -224,6 +224,7 @@ static void signal_task_complete(struct pci_doe_task *task, int rv) { task->rv = rv; task->complete(task); + destroy_work_on_stack(&task->work); } static void signal_task_abort(struct pci_doe_task *task, int rv) |