|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Re: [PATCH 1/1] PCI: xen-pcifront, fix PCI reference leak
To: |
Jiri Slaby <jslaby@xxxxxxx> |
Subject: |
[Xen-devel] Re: [PATCH 1/1] PCI: xen-pcifront, fix PCI reference leak |
From: |
Milton Miller <miltonm@xxxxxxx> |
Date: |
Thu, 04 Nov 2010 12:27:07 -0600 |
Cc: |
xen-devel@xxxxxxxxxxxxxxxxxxx, jirislaby@xxxxxxxxx, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, linux-pci@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, jbarnes@xxxxxxxxxxxxxxxx |
Delivery-date: |
Wed, 10 Nov 2010 09:52:58 -0800 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxxx |
In-reply-to: |
<1288881090-27335-1-git-send-email-jslaby@xxxxxxx> |
List-help: |
<mailto:xen-devel-request@lists.xensource.com?subject=help> |
List-id: |
Xen developer discussion <xen-devel.lists.xensource.com> |
List-post: |
<mailto:xen-devel@lists.xensource.com> |
List-subscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe> |
List-unsubscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> |
References: |
<1288881090-27335-1-git-send-email-jslaby@xxxxxxx> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
On 2010-11-04 at about 14:31:30 Jiri Slaby wrote:
> Stanse found that when pdev is found and has no driver a reference is
> leaked in pcifront_common_process. So add pci_dev_put there. For the
> pdev == NULL case, pci_dev_put(NULL) is fine.
While that may be true, the dev_err(&pcidev->dev ... is a NULL pointer
deref.
>
> Signed-off-by: Jiri Slaby <jslaby@xxxxxxx>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> Cc: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>
> ---
> drivers/pci/xen-pcifront.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c
> index a87c498..f9ffc05 100644
> --- a/drivers/pci/xen-pcifront.c
> +++ b/drivers/pci/xen-pcifront.c
> @@ -578,6 +578,7 @@ static pci_ers_result_t pcifront_common_process(int cmd,
> if (!pcidev || !pcidev->driver) {
> dev_err(&pcidev->dev,
> "device or driver is NULL\n");
> + pci_dev_put(pcidev);
> return result;
> }
> pdrv = pcidev->driver;
>
milton
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|