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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 21 Oct 2019 22:40:22 +0200
From:   Markus Elfring <Markus.Elfring@....de>
To:     Navid Emamdoost <navid.emamdoost@...il.com>,
        dri-devel@...ts.freedesktop.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org,
        Navid Emamdoost <emamd001@....edu>, Kangjie Lu <kjlu@....edu>,
        Stephen McCamant <smccaman@....edu>,
        Daniel Vetter <daniel@...ll.ch>,
        David Airlie <airlied@...ux.ie>, Eric Anholt <eric@...olt.net>
Subject: Re: [PATCH] drm/v3d: Fix memory leak in v3d_submit_cl_ioctl

> In the impelementation of v3d_submit_cl_ioctl() there are two memory leaks.

Please avoid another typo also in this change description.


> … If kcalloc fails to allocate memory for bin then
> render->base should be put. Also, if v3d_job_init() fails to initialize
> bin->base then allocated memory for bin should be released.

Will an “imperative mood” be more appropriate for such wordings?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=7d194c2100ad2a6dded545887d02754948ca5241#n151


…
> +++ b/drivers/gpu/drm/v3d/v3d_gem.c
> @@ -557,13 +557,16 @@ v3d_submit_cl_ioctl(struct drm_device *dev, void *data,
…
>  		if (ret) {
>  			v3d_job_put(&render->base);
> +			kfree(bin);
…

Can it be helpful to move the added function call before the other
in this if branch (if you prefer to avoid the addition of a jump target here)?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ