Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp338984ybh; Wed, 18 Mar 2020 00:36:37 -0700 (PDT) X-Google-Smtp-Source: ADFU+vu9tpq9J0TX3KWygRSqNx1jKBvslmD5BlfAArkykvp9snjJrALxeXcmPs4295LC3z4NBJ0W X-Received: by 2002:a9d:5c0c:: with SMTP id o12mr2721726otk.145.1584516997647; Wed, 18 Mar 2020 00:36:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584516997; cv=none; d=google.com; s=arc-20160816; b=V8FdyDZ9qb6+7oFdSY6uufNvFdkIiX3FdbmeRaQkSISaYV8AJA2F3gf1LzrnWUWw2n dC19EwlK9tTwvLK+szEJlBjM5UmN8ptysKJ6ZkCTObQLHorGQWvo/ZJMHYYS4VFJWKiv jfLbnegJm/CHh+xd7BBNtbWdRGnuJeEI5Vxx37j5/cNte2AKxtcb0TzzxenN1aaTeA6e sMkqh5qixj2JkeTXp8ffXCk7/YxGCWIskLA9Vp+fJ86l9rQf2gYZX8/KcEqP/VVg2+Ga mCUkRnIgJqO0tbTOx9JFDZZexXyeAkUYSYEB/3X0aM+5XHayK1GEn49US98sasAgWhrC RzFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ImnCZJDFg1rQOtfa/ceoUHZbJvEiQdm+R8XInF6JTFI=; b=lenOza9ZH3xpMVYN10v6FLFIEk8RU1v0CPiWkluTjqpKGKz3eToagdgtv0I3fSQVcX TqhHkHEmOaivua3nykEi54sl617r5yrTv7tf5SOUGrofw6fJhBH9SI0T1MD3jOHdk3Ih 3ru9YVrD80TU584/6jqDj3x8IFhPHywSCxnaKw2rFodWJ2UAebQUUShabzk+/oCrxMbu WmdoZWD/PIPvNoipzyNeloIgRjXvmHk2mvMLR1A1G32clpi3wV3lQJrgwgagGkdUlN+X 4JfgBemAgdXbbChW6HJAq2Q0ewqVgdSltBRaok2yCFXqofOOUjpU7j/rFZY79VPWv7Ap 9SSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=TLCIhGXD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q6si3073895otc.265.2020.03.18.00.36.25; Wed, 18 Mar 2020 00:36:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=TLCIhGXD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727133AbgCRHej (ORCPT + 99 others); Wed, 18 Mar 2020 03:34:39 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:43266 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726473AbgCRHei (ORCPT ); Wed, 18 Mar 2020 03:34:38 -0400 Received: by mail-oi1-f196.google.com with SMTP id p125so24720366oif.10 for ; Wed, 18 Mar 2020 00:34:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ImnCZJDFg1rQOtfa/ceoUHZbJvEiQdm+R8XInF6JTFI=; b=TLCIhGXDURuqIMeQG6s0U7WdW04eLC+XM2claAJPvoBsBajRsO4T5BSxY1ENJ2pHdb 5o/YLhQRdAgmNylO3lrZWRO9ItNtfg6L5fzgPjUdlET3pNOzgJqD4aqeEWqjy4VHDVZv ZTl+0L6bKEMib/QdaRuLhuE+ZohrXXIYaExtA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ImnCZJDFg1rQOtfa/ceoUHZbJvEiQdm+R8XInF6JTFI=; b=tdDcUZo+vQE3t9H4ZdkVljeKkhVhKpGiJ15tPsdCs0zCG295/YWOcr6yyq/MdSjTmZ W0c9EzpB4yxQ8l7U8wg4TsOCXzbcNonaWSrjMlkxpVtJ9pSF0oAUTRUCawjyov7vJgTz w88vAS0pLWcDZjI/9DEJzhi943a53UWMMd7HKCz7cyFSswuX/5pJG7NPYBU2yfconnNH KDbFXtly++/Sp2nLA+OuXpVnG7DO0QIbBOTdE/T4L+W2h5QMYIkQcby+Zm1YzCPp9LPy 2NfrKvixOeTjCkuYzzCmTgWdEQesubgb5hCHQMkCrwxRqNSnIy3UCITmT4/mbjoEJZqT gDYg== X-Gm-Message-State: ANhLgQ2S98ZEuLKZOuYr2aRmTF/ujMvJ53PfFQ1ylm3NKbQaNSLm5tGj SMhICyMxeSKlIkyPcATPJ6GKF7pKjyIN4bO+auj+pw== X-Received: by 2002:aca:5345:: with SMTP id h66mr2229552oib.110.1584516876432; Wed, 18 Mar 2020 00:34:36 -0700 (PDT) MIME-Version: 1.0 References: <1584343103-13896-1-git-send-email-hqjagain@gmail.com> <20200317170243.GR2363188@phenom.ffwll.local> In-Reply-To: From: Daniel Vetter Date: Wed, 18 Mar 2020 08:34:24 +0100 Message-ID: Subject: Re: [PATCH RESEND] drm/lease: fix potential race in fill_object_idr To: Qiujun Huang , Marco Elver Cc: Maarten Lankhorst , Maxime Ripard , Dave Airlie , dri-devel , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 17, 2020 at 11:33 PM Qiujun Huang wrote: > > On Wed, Mar 18, 2020 at 1:02 AM Daniel Vetter 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 > > > > 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. Do you know what the recommended annotation for kcsan false positives like this should be? Adding kcsan author Marco. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch