]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI: hotplug: Avoid backpointer dereferencing in has_*_file()
authorLukas Wunner <lukas@wunner.de>
Tue, 25 Feb 2025 17:06:04 +0000 (18:06 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 4 Mar 2025 23:00:12 +0000 (17:00 -0600)
commit34bd6141a62d21853b61e759f5c617059b2f3655
treed2971613c88341cb16968079cc3aaf280afbfc6d
parent62460bcb5a2ac37bb416aada0167db3fe78ac385
PCI: hotplug: Avoid backpointer dereferencing in has_*_file()

The PCI hotplug core contains five has_*_file() functions to determine
whether a certain sysfs file shall be added (or removed) for a given
hotplug slot.

The functions receive a struct pci_slot pointer which they have to
dereference back to a struct hotplug_slot.

Avoid by passing them a struct hotplug_slot pointer directly.

Link: https://lore.kernel.org/r/5b2f5b4ac45285953d00fd7637732a93fd40d26e.1740501868.git.lukas@wunner.de
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/hotplug/pci_hotplug_core.c