]> asedeno.scripts.mit.edu Git - linux.git/commit
PCI/PME: Fix possible use-after-free on remove
authorSven Van Asbroeck <thesven73@gmail.com>
Fri, 1 Mar 2019 16:54:19 +0000 (11:54 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 1 Mar 2019 23:45:27 +0000 (17:45 -0600)
commit7cf58b79b3072029af127ae865ffc6f00f34b1f8
tree632a551a2996a914cb43e1daf38c06fa881bf90d
parent95c80bc6952b6a5badc7b702d23e5bf14d251e7c
PCI/PME: Fix possible use-after-free on remove

In remove(), ensure that the PME work cannot run after kfree() is called.
Otherwise, this could result in a use-after-free.

This issue was detected with the help of Coccinelle.

Signed-off-by: Sven Van Asbroeck <TheSven73@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Sinan Kaya <okaya@kernel.org>
Cc: Frederick Lawler <fred@fredlawl.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/pci/pcie/pme.c