lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e75736ae-dbe0-7422-1b03-72de84755090@suse.de>
Date:   Wed, 14 Jul 2021 11:21:47 +0200
From:   Thomas Zimmermann <tzimmermann@...e.de>
To:     Yang Yingliang <yangyingliang@...wei.com>,
        linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        virtualization@...ts.linux-foundation.org
Cc:     airlied@...ux.ie, kraxel@...hat.com
Subject: Re: [PATCH -next] drm/bochs: Fix missing pci_disable_device() on
 error in bochs_pci_probe()

Hi

Am 14.07.21 um 10:39 schrieb Yang Yingliang:
> Fix the missing pci_disable_device() before return
> from bochs_pci_probe() in the error handling case.

It's maybe better to replace pci_enable_device() with 
pcim_enable_device(), [1] so that the release happens automatically. 
Does this work?

Best regards
Thomas

https://elixir.bootlin.com/linux/v5.13.1/source/drivers/pci/pci.c#L2042

> 
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
> ---
>   drivers/gpu/drm/tiny/bochs.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/tiny/bochs.c b/drivers/gpu/drm/tiny/bochs.c
> index a2cfecfa8556..74832b9d3eae 100644
> --- a/drivers/gpu/drm/tiny/bochs.c
> +++ b/drivers/gpu/drm/tiny/bochs.c
> @@ -666,6 +666,7 @@ static int bochs_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent
>   	return ret;
>   
>   err_free_dev:
> +	pci_disable_device(pdev);
>   	drm_dev_put(dev);
>   	return ret;
>   }
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer



Download attachment "OpenPGP_signature" of type "application/pgp-signature" (841 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ