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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ea709740-5aa7-a904-d15b-fe27f91578a5@loongson.cn>
Date:   Tue, 27 Jun 2023 22:15:11 +0800
From:   Sui Jingfeng <suijingfeng@...ngson.cn>
To:     Thomas Zimmermann <tzimmermann@...e.de>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Maxime Ripard <mripard@...nel.org>,
        David Airlie <airlied@...il.com>,
        Daniel Vetter <daniel@...ll.ch>,
        Alex Deucher <alexander.deucher@....com>,
        Christian Koenig <christian.koenig@....com>,
        Pan Xinhui <Xinhui.Pan@....com>
Cc:     dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        amd-gfx@...ts.freedesktop.org
Subject: Re: [PATCH] drm: Remove the deprecated drm_put_dev() function

Hi,

On 2023/6/27 16:41, Sui Jingfeng wrote:
> I have verified that
>
> if the ->probe() failed, then the ->remove will be get called.
>
Sorry,

if the ->probe() failed, then the ->remove() will *NOT* get called.


> I'm doing the test by add a line before the drm_dev_alloc()
>
I do the test by adding one line code before the drm_dev_alloc() function

  to generate a fault(error) manually,


>
> See below:
>
> ```
>
>     return -ENODEV;
>
>     dev = drm_dev_alloc(&kms_driver, &pdev->dev);
>     if (IS_ERR(dev))
>         return PTR_ERR(dev);
>
>     ret = pci_enable_device(pdev);
>     if (ret)
>         goto err_free;
> ```
>
>
> So, there is no problem, as far as I can see. 
All in all,  if the ->probe() failed, then the ->remove() will *NOT* get 
called.

-- 
Jingfeng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ