From patchwork Tue Feb 6 10:23:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Bas Nieuwenhuizen X-Patchwork-Id: 10202723 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 E5E726020F for ; Tue, 6 Feb 2018 10:24:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DCFFA23B24 for ; Tue, 6 Feb 2018 10:24:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D12C92894E; Tue, 6 Feb 2018 10:24:25 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham 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 A2ADC23B24 for ; Tue, 6 Feb 2018 10:24:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 92C946E08A; Tue, 6 Feb 2018 10:24:21 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3C4766E08A for ; Tue, 6 Feb 2018 10:24:20 +0000 (UTC) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 3DDD020CD5; Tue, 6 Feb 2018 05:24:19 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Tue, 06 Feb 2018 05:24:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= basnieuwenhuizen.nl; h=cc:date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=89pinEed1jLcbxFfV ckDIoFmQsywd/Eyt5HK1ECoCu0=; b=XBuNHz0aQSTRDp+90S8p4RrbmuW5R5brq Alr9ybOxq/p93FYG0uD9vgr4XrQcrBdfl8P5viwVAA9tTzWcAJV3pKELx4ZtdjBc YbrxQuWEbwmSO6ncwrG+i1Vysbk8G74nIlDmQZBY4JYGEgwKqyAh7ThAZWnwaH3p 7F9HcgqvLXi2hqTJL5ln4VpRq8kks6qYuxzSDmkisPmpUTaCIDUQusC0mQLuyEIk c083lNV2N+OCjGqqm5G9DYDrUYez7k7/Xfm38+TAHbipVPpPXxuNYJiozWqolvaS 9Djp6lfbO3H73Hw+OnGwTWuxwweQFoNb8LO26/CMmembJ4xuEd1wQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=89pinEed1jLcbxFfV ckDIoFmQsywd/Eyt5HK1ECoCu0=; b=p+EQ3ck+ndU7YQea2AtNNHswWpEhWQ7m7 au/akBpFNIAjCBO8xg6jJSBKfqXoN0jzZOtLMIxRfKs3XxoT+tF/fKhiyHjMKbtf BAJLowpKSMJoRsvSuXLBdS5kscLiQx3J0hQ/I+BlZGVayFwEBy3rdgYQZrk6/Gy0 ZXQKt1NFtuxmSWyBsgArYRqha234ILtdpi6bOOx/8B+xFc7e6tnMiB5s8PnVX805 vmlUT7GVALWFgQpexRZiAVgfG/VQTaHS86SRRc0bxEdUlNsCUv2IR594SQ81HI6L sg0Fiv2vk+BzPvL9YI0QCkdewJZwI38b/PxkgBzh/Yb8yVEYQYxAg== X-ME-Sender: Received: from localhost.localdomain (unknown [31.10.156.252]) by mail.messagingengine.com (Postfix) with ESMTPA id 8071C246AC; Tue, 6 Feb 2018 05:24:18 -0500 (EST) From: Bas Nieuwenhuizen To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm] drm: Fix 32-bit drmSyncobjWait. Date: Tue, 6 Feb 2018 11:23:23 +0100 Message-Id: <20180206102323.123404-1-bas@basnieuwenhuizen.nl> X-Mailer: git-send-email 2.16.1 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 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 Otherwise we get an EFAULT, at least on a 64-bit kernel. Fixes: 2048a9e7 "drm: add drmSyncobjWait wrapper" Reviewed-by: Christian König --- xf86drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xf86drm.c b/xf86drm.c index 74b4e230..1e87610b 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -4271,7 +4271,7 @@ int drmSyncobjWait(int fd, uint32_t *handles, unsigned num_handles, int ret; memclear(args); - args.handles = (intptr_t)handles; + args.handles = (uintptr_t)handles; args.timeout_nsec = timeout_nsec; args.count_handles = num_handles; args.flags = flags;