From patchwork Tue Feb 12 21:55:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 2132261 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id DC0083FD4F for ; Tue, 12 Feb 2013 21:57:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A477FE6500 for ; Tue, 12 Feb 2013 13:57:17 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ea0-f181.google.com (mail-ea0-f181.google.com [209.85.215.181]) by gabe.freedesktop.org (Postfix) with ESMTP id 049FCE6481 for ; Tue, 12 Feb 2013 13:55:40 -0800 (PST) Received: by mail-ea0-f181.google.com with SMTP id i13so240793eaa.12 for ; Tue, 12 Feb 2013 13:55:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:x-enigmail-version:content-type :content-transfer-encoding; bh=ly7avS6NIt1btxGO2lxqxNJj2j1XhBHNd/VTt4xjuko=; b=qjTOEtmVs3BMqgXW4wBUDhXzO89KeB7VyCnFqCTyKgvrGqUSjY1StBTH1OCfDRQqTA mYohy6v89PpiIone82rz/cahJVJRPpGApf8fQyiyCwNv1VP9i6cyuEm5nZwX0mEUq4GC +sqYTiykpJ4ht/SvCxtgJXjnYIDRNk0C4B6jKCTzVGtlHkvq4C05iyolb0der9dU7Ss8 mTxKYbwdKNehAW2icJbPO6y6MrBo4Z8hV7yVI85ehvi8f/W2CoFiCvXdggxvPAPD/f++ SAcjKcGyak5bnbwJeifcfGtu7+D3xdh5BVD0NME/gDzk4rcLoKR954/wEko9CpbZzgB0 d0OQ== X-Received: by 10.14.174.73 with SMTP id w49mr67877680eel.17.1360706140213; Tue, 12 Feb 2013 13:55:40 -0800 (PST) Received: from bellona.site ([178.22.112.2]) by mx.google.com with ESMTPS id q5sm70025535eeo.17.2013.02.12.13.55.38 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Feb 2013 13:55:39 -0800 (PST) Message-ID: <511ABA59.9050604@suse.cz> Date: Tue, 12 Feb 2013 22:55:37 +0100 From: Jiri Slaby User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:19.0) Gecko/20130124 Thunderbird/19.0 MIME-Version: 1.0 To: Tejun Heo Subject: compositing broken in -next (idr bug) X-Enigmail-Version: 1.6a1pre Cc: Andrew Morton , LKML , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Hi, this commit in -next causes my KDE to get stuck while starting. I see only the splash screen. If I disable effects by alt-shift-f12, it continues. I bisected it to this commit: commit 430440fce7da4ad52c2af06a04a5132e5d19faaf Author: Tejun Heo Date: Thu Feb 7 12:31:37 2013 +1100 drm: convert to idr_alloc() More concretely to the change in drm_gem_flink_ioctl. If I revert solely that one, it works again. Maybe I'm blind, but I do not see why... Well I see a bug in there, but that is not the root cause -- there is a missing call to idr_preload_end. Of course, that one only leaves preemption disabled forever. What I tried with no effect is this: @@ -469,6 +470,7 @@ drm_gem_flink_ioctl(struct drm_device *dev, void *data, } err: + idr_preload_end(); drm_gem_object_unreference_unlocked(obj); return ret; } thanks, --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c @@ -453,7 +453,8 @@ drm_gem_flink_ioctl(struct drm_device *dev, void *data, spin_lock(&dev->object_name_lock); if (!obj->name) { ret = idr_alloc(&dev->object_name_idr, obj, 1, 0, GFP_NOWAIT); - obj->name = ret; + if (ret >= 0) + obj->name = ret; args->name = (uint64_t) obj->name; spin_unlock(&dev->object_name_lock);