From patchwork Fri Sep 1 14:57:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 9934439 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6A35B603B4 for ; Fri, 1 Sep 2017 14:58:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 593E4201A4 for ; Fri, 1 Sep 2017 14:58:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4E04F2013D; Fri, 1 Sep 2017 14:58:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5C7A0201CB for ; Fri, 1 Sep 2017 14:58:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9225F6E86F; Fri, 1 Sep 2017 14:57:24 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fireflyinternet.com (mail.fireflyinternet.com [109.228.58.192]) by gabe.freedesktop.org (Postfix) with ESMTPS id C70FC6E867; Fri, 1 Sep 2017 14:57:22 +0000 (UTC) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from haswell.alporthouse.com (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 8527916-1500050 for multiple; Fri, 01 Sep 2017 15:57:08 +0100 Received: by haswell.alporthouse.com (sSMTP sendmail emulation); Fri, 01 Sep 2017 15:57:08 +0100 From: Chris Wilson To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/2] drm/syncobj: Mark up the fence as an RCU protected pointer Date: Fri, 1 Sep 2017 15:57:06 +0100 Message-Id: <20170901145707.21309-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.14.1 X-Originating-IP: 78.156.65.138 X-Country: code=GB country="United Kingdom" ip=78.156.65.138 Cc: intel-gfx@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP We take advantage of that syncobj->fence is an RCU-protected pointer, and so sparse complains that it is lacking annotation. Signed-off-by: Chris Wilson --- include/drm/drm_syncobj.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/drm_syncobj.h b/include/drm/drm_syncobj.h index c00fee539822..455660673259 100644 --- a/include/drm/drm_syncobj.h +++ b/include/drm/drm_syncobj.h @@ -49,7 +49,7 @@ struct drm_syncobj { * This field should not be used directly. Use drm_syncobj_fence_get * and drm_syncobj_replace_fence instead. */ - struct dma_fence *fence; + struct dma_fence __rcu *fence; /** * @cb_list: * List of callbacks to call when the fence gets replaced