[PATCH] PCI: hotplug: fix error path in pci_slot's register_slot - Kernel

This is a discussion on [PATCH] PCI: hotplug: fix error path in pci_slot's register_slot - Kernel ; Juha Leppänen noticed that an error path in register_slot() wasn't returning appropriately, leading to a condition where we might access a kfree'ed pointer, so let's fix that. Additionally, fix up the copyright information in the file while we're in there. ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: [PATCH] PCI: hotplug: fix error path in pci_slot's register_slot

  1. [PATCH] PCI: hotplug: fix error path in pci_slot's register_slot

    Juha Leppänen noticed that an error path in register_slot()
    wasn't returning appropriately, leading to a condition where we
    might access a kfree'ed pointer, so let's fix that.

    Additionally, fix up the copyright information in the file while
    we're in there.

    Signed-off-by: Alex Chiang

    diff --git a/drivers/acpi/pci_slot.c b/drivers/acpi/pci_slot.c
    index b9ab030..dd376f7 100644
    --- a/drivers/acpi/pci_slot.c
    +++ b/drivers/acpi/pci_slot.c
    @@ -6,8 +6,8 @@
    * Thanks to Kenji Kaneshige for code
    * review and fixes.
    *
    - * Copyright (C) 2007 Alex Chiang
    - * Copyright (C) 2007 Hewlett-Packard Development Company, L.P.
    + * Copyright (C) 2007-2008 Hewlett-Packard Development Company, L.P.
    + * Alex Chiang
    *
    * This program is free software; you can redistribute it and/or modify it
    * under the terms and conditions of the GNU General Public License,
    @@ -158,6 +158,7 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv)
    if (IS_ERR(pci_slot)) {
    err("pci_create_slot returned %ld\n", PTR_ERR(pci_slot));
    kfree(slot);
    + return AE_OK;
    }

    slot->root_handle = parent_context->root_handle;
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. Re: [PATCH] PCI: hotplug: fix error path in pci_slot's register_slot

    On Thursday, July 17, 2008 10:13 am Alex Chiang wrote:
    > Juha Leppänen noticed that an error path in register_slot()
    > wasn't returning appropriately, leading to a condition where we
    > might access a kfree'ed pointer, so let's fix that.
    >
    > Additionally, fix up the copyright information in the file while
    > we're in there.
    >
    > Signed-off-by: Alex Chiang


    Thanks Alex & Juha, I've applied this to my for-linus tree.

    Jesse
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread