mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime@cerno.tech>
To: Yu Liao <liaoyu15@huawei.com>
Cc: emma@anholt.net, eric@anholt.net, bbrezillon@kernel.org,
	liwei391@huawei.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/vc4: fix dereference before NULL check
Date: Tue, 28 Jun 2022 10:18:24 +0200	[thread overview]
Message-ID: <20220628081824.5u4p7q6xepp4uvsd@houat> (raw)
In-Reply-To: <20220628063657.3169049-1-liaoyu15@huawei.com>

[-- Attachment #1: Type: text/plain, Size: 618 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

      parent reply	other threads:[~2022-06-28  8:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-28  6:36 Yu Liao
2022-06-28  6:55 ` Boris Brezillon
2022-06-28  8:18 ` Maxime Ripard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220628081824.5u4p7q6xepp4uvsd@houat \
    --to=maxime@cerno.tech \
    --cc=bbrezillon@kernel.org \
    --cc=emma@anholt.net \
    --cc=eric@anholt.net \
    --cc=liaoyu15@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liwei391@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®