Messages in this thread | | | Date | Tue, 28 Jun 2022 10:18:24 +0200 | From | Maxime Ripard <> | Subject | Re: [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] | |