lkml.org 
[lkml]   [2022]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] drm/vc4: fix dereference before NULL check
Hi,

On Tue, Jun 28, 2022 at 02:36:57PM +0800, Yu Liao wrote:
> The "perfmon" pointer is equal to the return value of idr_find
> which may be NULL, access by vc4_perfmon_get before checking if
> it was NULL. Fix this by dereferencing "perfmon" after "perfmon"
> has been null checked.
>
> Addresses-Coverity: ("Dereference before null check")
> Fixes: 65101d8c9108 ("drm/vc4: Expose performance counters to userspace")
> Signed-off-by: Yu Liao <liaoyu15@huawei.com>

A similar patch has already been merged:
https://lore.kernel.org/dri-devel/20220622080243.22119-1-maxime@cerno.tech/

Thanks!
Maxime
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2022-06-28 10:22    [W:0.146 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site