Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3439242imu; Mon, 10 Dec 2018 02:08:24 -0800 (PST) X-Google-Smtp-Source: AFSGD/Xadj9zyZCyedC3YbK6YsZJ6XNLXfnKufRzDaWl64yGCtd3jEovhv3OVgs5cUcv8AfYUOkp X-Received: by 2002:a17:902:3281:: with SMTP id z1mr11770097plb.296.1544436504871; Mon, 10 Dec 2018 02:08:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544436504; cv=none; d=google.com; s=arc-20160816; b=F1p2BCuKqhLnCtY0xX30f+Zn9BInmv/DcdtEPsy7xx1LJrOj4Wpkp9dpJnV3px+hum MCpwveslO/xvkvUfmMR9fm2SKbFGflbEyydQ5RpRN4dQa150MfZi6jmwpYOsE6MXL5NH pDsxtu9Hfd52jbkzhikEtn7/d5QWe2Z/KDMMp+r3dt++pRNgTGxj4juQkK6zztmDQuAy 6ldqC66Z7EmAwSQ1P6rSuzXXi9pYTqq8ZotNsoifhId4GgypkrCblUhUCrOMEJYFXgRW DiX+PrlROnXrYTRKY2k5HyhvFt1EayW30/6FmjpmdIqsKEOHmdt2WgxLYZrZyMcg75cm b3cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=BvhjbgXGd0eV5boL3+QO4q6MvXc+E9xnLPAfSwFYVKE=; b=t1tos3y2+CEPmgH0JQU2GjJ/JxGyaMJcu90jPaLfAIsZsWH8XxIwVlezgFx8TSqHGc 886rk6fwcbdC+A1XvTbWTx0zyU5FNhcMyToLuPa8Q1Mlv8h1v/keUTdi0okujYQgcxX0 zKLnYyaHF8sA5Zlm7PIOYJD+7Q1DJoR6UXOilZMMhB0ojbPu67MPZ8uTyXAqwC6jH4m0 Ac5V8OffrI+fSuuX/cu48capfkCVQ8ZqUq3HlkQ2oEvEIP86I4pG3Jt2Ij76riJT36A0 k7s+fklyrc9V4sNPOGMvSAqnD4Wa1+vPZ4cTpUBeBNw/o+CvfJcLpwzEWpBQM4U1SFEr xIjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GC6bqOvA; 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 s5si10045553pfi.134.2018.12.10.02.08.09; Mon, 10 Dec 2018 02:08:24 -0800 (PST) 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=@kernel.org header.s=default header.b=GC6bqOvA; 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 S1726955AbeLJKGh (ORCPT + 99 others); Mon, 10 Dec 2018 05:06:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:58386 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726622AbeLJKGh (ORCPT ); Mon, 10 Dec 2018 05:06:37 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0F88820821; Mon, 10 Dec 2018 10:06:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544436396; bh=faVDNK86VYlzOIfJDdA59imcMuuyQeR01dMI+p2GZyI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GC6bqOvASFge7pRIew0gTH82twietfN7xfUrKphtulpUpXNE4aSMMx/3HfQmSJNtB 7XYJ7irVkzu2QHlAuSn/dAIu7HJKaLJvCmBh5hwT6nMzQ/YB8EHoQonDPFEGTyiVjq Yzi4g3z2fmq528gne+0Uwm8DbKx8KYK8jsGLtYbc= Date: Mon, 10 Dec 2018 11:06:34 +0100 From: Greg Kroah-Hartman To: Daniel Vetter Cc: LKML , DRI Development , Ramalingam C , "Rafael J. Wysocki" , Daniel Vetter Subject: Re: [PATCH] drivers/base: use a worker for sysfs unbind Message-ID: <20181210100634.GA8836@kroah.com> References: <20181210084653.7268-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181210084653.7268-1-daniel.vetter@ffwll.ch> User-Agent: Mutt/1.11.1 (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 10, 2018 at 09:46:53AM +0100, Daniel Vetter wrote: > Drivers might want to remove some sysfs files, which needs the same > locks and ends up angering lockdep. Relevant snippet of the stack > trace: > > kernfs_remove_by_name_ns+0x3b/0x80 > bus_remove_driver+0x92/0xa0 > acpi_video_unregister+0x24/0x40 > i915_driver_unload+0x42/0x130 [i915] > i915_pci_remove+0x19/0x30 [i915] > pci_device_remove+0x36/0xb0 > device_release_driver_internal+0x185/0x250 > unbind_store+0xaf/0x180 > kernfs_fop_write+0x104/0x190 > > I've stumbled over this because some new patches by Ram connect the > snd-hda-intel unload (where we do use sysfs unbind) with the locking > chains in the i915 unload code (but without creating a new loop), > which upset our CI. But the bug is already there and can be easily > reproduced by unbind i915 directly. This is odd, why wouldn't any driver hit this issue? And why now since you say this is triggerable today? I know scsi was doing some strange things like trying to remove the device itself from a sysfs callback on the device, which requires it to just call a different kobject function created just for that type of thing. Would that also make sense to do here instead of your workqueue? thanks, greg k-h