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: <CAH9NwWcTDV70Nb_e_rs9egsQqmAo91_HM+DoO_woC_ZqnHCVNw@mail.gmail.com>
Date:   Mon, 7 Jun 2021 08:57:37 +0200
From:   Christian Gmeiner <christian.gmeiner@...il.com>
To:     Bernard Zhao <bernard@...o.com>
Cc:     Lucas Stach <l.stach@...gutronix.de>,
        Russell King <linux+etnaviv@...linux.org.uk>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        The etnaviv authors <etnaviv@...ts.freedesktop.org>,
        DRI mailing list <dri-devel@...ts.freedesktop.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/etnaviv: remove no need NULL check

Am Sa., 5. Juni 2021 um 14:24 Uhr schrieb Bernard Zhao <bernard@...o.com>:
>
> NULL check before kvfree functions is not needed.
>
> Signed-off-by: Bernard Zhao <bernard@...o.com>
> ---
>  drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c b/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
> index d05c35994579..bd0d66ebf314 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
> @@ -612,14 +612,10 @@ int etnaviv_ioctl_gem_submit(struct drm_device *dev, void *data,
>  err_submit_cmds:
>         if (ret && (out_fence_fd >= 0))
>                 put_unused_fd(out_fence_fd);
> -       if (stream)
> -               kvfree(stream);
> -       if (bos)
> -               kvfree(bos);
> -       if (relocs)
> -               kvfree(relocs);
> -       if (pmrs)
> -               kvfree(pmrs);
> +       kvfree(stream);
> +       kvfree(bos);
> +       kvfree(relocs);
> +       kvfree(pmrs);
>
>         return ret;
>  }
> --
> 2.31.0
>

Thanks for the patch, but there is an other one queued up in
etnaviv/next that fixes the same issue:
https://git.pengutronix.de/cgit/lst/linux/commit/?h=etnaviv/next&id=bdf622e0fade2cec72c948c708763378b656c01d

-- 
greets
--
Christian Gmeiner, MSc

https://christian-gmeiner.info/privacypolicy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ