Re: [BUG][PATCH] cpqphp: fix kernel NULL pointer dereference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Kenji Kaneshige <kaneshige.kenji@xxxxxxxxxxxxxx>:
> 
> The root cause of this problem seems that cpqphp driver calls
> pci_hp_register() wrongly. In current implementation, cpqphp driver
> passes 'ctrl->pci_dev->subordinate' as a second parameter for
> pci_hp_register(). But because hotplug slots and it's hotplug
> controller (exists as a pci funcion) are on the same bus, it should be
> 'ctrl->pci_dev->bus' instead.
> 
> Cc: <stable@xxxxxxxxxx>

Acked-by: Alex Chiang <achiang@xxxxxx>

> Tested-by: Ingo Molnar <mingo@xxxxxxx>
> Signed-off-by: Kenji Kaneshige <kaneshige.kenji@xxxxxxxxxxxxxx>
> 
> ---
>  drivers/pci/hotplug/cpqphp_core.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux-2.6-tip/drivers/pci/hotplug/cpqphp_core.c
> ===================================================================
> --- linux-2.6-tip.orig/drivers/pci/hotplug/cpqphp_core.c
> +++ linux-2.6-tip/drivers/pci/hotplug/cpqphp_core.c
> @@ -435,7 +435,7 @@ static int ctrl_slot_setup(struct contro
>  				slot->number, ctrl->slot_device_offset,
>  				slot_number);
>  		result = pci_hp_register(hotplug_slot,
> -					 ctrl->pci_dev->subordinate,
> +					 ctrl->pci_dev->bus,
>  					 slot->device);
>  		if (result) {
>  			err("pci_hp_register failed with error %d\n", result);
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux