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>] [day] [month] [year] [list]
Message-ID: <77698453-95ba-5e99-bba5-2ca4a4918026@web.de>
Date:   Mon, 15 Jun 2020 17:57:38 +0200
From:   Markus Elfring <Markus.Elfring@....de>
To:     Navid Emamdoost <navid.emamdoost@...il.com>,
        dri-devel@...ts.freedesktop.org, etnaviv@...ts.freedesktop.org,
        linux+etnaviv@...linux.org.uk
Cc:     Navid Emamdoost <emamd001@....edu>, Kangjie Lu <kjlu@....edu>,
        Stephen McCamant <mccamant@...umn.edu>,
        Qiushi Wu <wu000273@....edu>, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        Christian Gmeiner <christian.gmeiner@...il.com>,
        Daniel Vetter <daniel@...ll.ch>,
        David Airlie <airlied@...ux.ie>,
        Lucas Stach <l.stach@...gutronix.de>
Subject: Re: [PATCH v2] drm/etnaviv: fix ref count leak via
 pm_runtime_get_sync

…
> In case of failure, decrement the ref count before returning.

Can it be nicer to use the term “reference count” here?

Will the tag “Fixes” become helpful for the commit message?


…
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
…
> @@ -1326,6 +1331,7 @@  struct dma_fence *etnaviv_gpu_submit(struct etnaviv_gem_submit *submit)
>  	ret = event_alloc(gpu, nr_events, event);
>  	if (ret) {
>  		DRM_ERROR("no free events\n");
> +		pm_runtime_put_noidle(gpu->dev);
>  		return NULL;
>  	}

I suggest to move a bit of exception handling code to the end of
this function implementation so that it can be better reused after
the addition of a jump target like “put_runtime”.

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ