From: Qiujun Huang <hqjagain@gmail.com>
To: Qiujun Huang <hqjagain@gmail.com>,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
airlied@linux.ie, dri-devel@lists.freedesktop.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RESEND] drm/lease: fix potential race in fill_object_idr
Date: Wed, 18 Mar 2020 06:33:34 +0800 [thread overview]
Message-ID: <CAJRQjofSWYR--4V_4zmp6K9WVtqShdzpGuH1VFBPvHpViGYH5g@mail.gmail.com> (raw)
In-Reply-To: <20200317170243.GR2363188@phenom.ffwll.local>
On Wed, Mar 18, 2020 at 1:02 AM Daniel Vetter <daniel@ffwll.ch> wrote:
>
> On Mon, Mar 16, 2020 at 03:18:23PM +0800, Qiujun Huang wrote:
> > We should hold idr_mutex for idr_alloc.
> >
> > Signed-off-by: Qiujun Huang <hqjagain@gmail.com>
>
> I've not seen the first version of this anywhere in my inbox, not sure
> where that got lost.
>
> Anyway, this seems like a false positive - I'm assuming this was caught
> with KCSAN. The commit message really should mention that.
>
> fill_object_idr creates the idr, which yes is only access later on under
> the idr_mutex. But here it's not yet visible to any other thread, and
> hence lockless access is safe and correct.
Agree that.
Thanks.
>
> No idea what the KCSAN complains about safe access like this best practice
> is.
> -Daniel
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-03-18 1:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-16 7:18 [PATCH RESEND] drm/lease: fix potential race in fill_object_idr Qiujun Huang
2020-03-17 17:02 ` Daniel Vetter
2020-03-17 22:33 ` Qiujun Huang [this message]
2020-03-18 7:34 ` Daniel Vetter
2020-03-18 8:09 ` Qiujun Huang
2020-03-18 12:03 ` Marco Elver
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=CAJRQjofSWYR--4V_4zmp6K9WVtqShdzpGuH1VFBPvHpViGYH5g@mail.gmail.com \
--to=hqjagain@gmail.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).