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: <87a85cycb8.fsf@eliezer.anholt.net>
Date:   Mon, 12 Jun 2017 17:13:31 -0700
From:   Eric Anholt <eric@...olt.net>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        airlied@...ux.ie
Cc:     dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: Re: [PATCH v2] drm/vc4: Fix resource leak in 'vc4_get_hang_state_ioctl()' in error handling path

Christophe JAILLET <christophe.jaillet@...adoo.fr> writes:

> If one 'drm_gem_handle_create()' fails, we leak somes handles and some
> memory.
>
> In order to fix it:
>   - move the 'free(bo_state)' at the end of the function so that it is also
>     called in the eror handling path. This has the side effect to also try 
>     to free it if the first 'kcalloc' fails. This is harmless.
>   - add a new label, err_delete_handle, in order to delete already
>     allocated handles in error handling path
>   - remove the now useless 'err' label

Reviewed and applied.  Thanks!

Download attachment "signature.asc" of type "application/pgp-signature" (833 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ