From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [BUG] Circular locking dependency - DRM/CMA/MM/hotplug/... Date: Wed, 12 Feb 2014 19:29:01 +0100 Message-ID: <20140212182901.GX17001@phenom.ffwll.local> References: <20140211183543.GK26684@n2100.arm.linux.org.uk> <52FB9602.1000805@samsung.com> <20140212163317.GQ26684@n2100.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ea0-f180.google.com (mail-ea0-f180.google.com [209.85.215.180]) by gabe.freedesktop.org (Postfix) with ESMTP id 42392FA0C4 for ; Wed, 12 Feb 2014 10:29:07 -0800 (PST) Received: by mail-ea0-f180.google.com with SMTP id o10so4561962eaj.25 for ; Wed, 12 Feb 2014 10:29:06 -0800 (PST) Content-Disposition: inline In-Reply-To: <20140212163317.GQ26684@n2100.arm.linux.org.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: Russell King - ARM Linux Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, Marek Szyprowski List-Id: dri-devel@lists.freedesktop.org On Wed, Feb 12, 2014 at 04:33:17PM +0000, Russell King - ARM Linux wrote: > On Wed, Feb 12, 2014 at 04:40:50PM +0100, Marek Szyprowski wrote: > >> -> #3 (console_lock){+.+.+.}: > >> [] __lock_acquire+0x151c/0x1ca0 > >> [] lock_acquire+0xa0/0x130 > >> [] console_lock+0x60/0x74 > >> [] console_cpu_notify+0x28/0x34 > >> [] notifier_call_chain+0x4c/0x8c > >> [] __raw_notifier_call_chain+0x1c/0x24 > >> [] __cpu_notify+0x34/0x50 > >> [] cpu_notify_nofail+0x18/0x24 > >> [] _cpu_down+0x100/0x244 > >> [] cpu_down+0x30/0x44 > >> [] cpu_subsys_offline+0x14/0x18 > >> [] device_offline+0x94/0xbc > >> [] online_store+0x4c/0x74 > >> [] dev_attr_store+0x20/0x2c > >> [] sysfs_kf_write+0x54/0x58 > >> [] kernfs_fop_write+0xc4/0x160 > >> [] vfs_write+0xbc/0x184 > >> [] SyS_write+0x48/0x70 > >> [] ret_fast_syscall+0x0/0x48 > > cpu_down() takes cpu_hotplug.lock, so here we have: > > cpu_hotplug.lock > console_lock The patche I've linked in my other mail will break the chain here, so should solve this. And apparently with cpu hotplug we can hit this, too. And having banged my head against the console_lock wall I think doing a trylock here is generally the sanest option. So imo we can just blame console_lock, not need to either beat up v4l, drm, cma or anyone else really ;-) Cheers, Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch