Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp617187pxb; Tue, 19 Oct 2021 09:26:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnKPPLzDWzZM114sM9JI98v0JKHJNXYFxtV7SHr/36wyLyEzI5uhY4m5/ls6awAvCmvlDo X-Received: by 2002:a17:90b:3910:: with SMTP id ob16mr861423pjb.234.1634660806261; Tue, 19 Oct 2021 09:26:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634660806; cv=none; d=google.com; s=arc-20160816; b=y4vH8QecSFSHng7KJR29zhUxlf/FOpkJYN0RWizqLTrLKvtldYXnbmkIhAw3eAXpYv IEr071BM2GDRFOW8FJAH5EuUky4YVWM5OnteKYGaSttcEhpcJbJVieLouoQJEIJ0Uhh/ 3vaxUqllK3U8Jxkdmjz712nS7nhowxjwtHoVPpxaJq2hGEp0+RYq1k9Vth1TlZ0u7cpO WMYm+JVJ9Lrr5FMJkfqbek8i6/6xyZRQCXa1+vsrN0VrIDmfXEw6CWeS3KhP8ekkXnUt YH9x0wnMZtAs2HcCZR9TuuJelmFOOI50nD7kcGdo4MD9LvfAsEtGqOhcVWbQKG21Qixv tWTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qclDdfD4+ClQ4S34viTRygPj/Vjyl8Gb3fkFMnXpSvU=; b=OGsN+T1uG0DIm6IW097LHRo13s9Jrdysr5PVp6VDRyy5dxVIlOH95+UsFbzJG8qpHw KDwmAYfbd4TVHd/yvhOb7i/X/9xzO/bZX7Tyq46wx0scdk2tLbMUotXt3pwIEvZs9Xth esHR/EK6Yug/1sAWDuKs1ByhfAdqCvIet89vAFz9ic66OBCokH2Hp/cyclATHUNXai+e k9/0LoLxnqI5KBmDndJTLGgz+4A+yG64plpKNAaoiaQqtJryK9ZWrigzgqMdCyLYGNkC 9vB6Wd/Bs1mkhtKay+t/3xRXsY/BYsJQKRaojF14I2zzCqNbdywFV2HbEHoAtKJiNueQ ncCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=V81ZepDc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w13si4113773pjg.172.2021.10.19.09.26.27; Tue, 19 Oct 2021 09:26:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=V81ZepDc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234124AbhJSQ1f (ORCPT + 99 others); Tue, 19 Oct 2021 12:27:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:50752 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229991AbhJSQ1e (ORCPT ); Tue, 19 Oct 2021 12:27:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B95DC61052; Tue, 19 Oct 2021 16:25:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634660721; bh=95zfq3H7AzOVXaStxwjek0lilnUiI4UGTpiGsI5GA68=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=V81ZepDcu2b0xZatBmX5hpojvnURXk3S52VuM9dZX+hCyIf6oTvg/NKQ2N8K7TsVe Blia5F0gDY7c9dwHnwoGCGDCqKKWHu2vW3miaJSRtrq6VW5y/5c6iRQ46rRXCqY+TH axCjMSE6G9g9IXCXcrFJPHOX3WSFWsc7pm4maxMQ= Date: Tue, 19 Oct 2021 18:25:18 +0200 From: Greg KH To: Luis Chamberlain Cc: Ming Lei , Benjamin Herrenschmidt , Paul Mackerras , tj@kernel.org, akpm@linux-foundation.org, minchan@kernel.org, jeyu@kernel.org, shuah@kernel.org, bvanassche@acm.org, dan.j.williams@intel.com, joe@perches.com, tglx@linutronix.de, keescook@chromium.org, rostedt@goodmis.org, linux-spdx@vger.kernel.org, linux-doc@vger.kernel.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v8 11/12] zram: fix crashes with cpu hotplug multistate Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 19, 2021 at 08:50:24AM -0700, Luis Chamberlain wrote: > So do you want to take the position: > > Hey driver authors: you cannot use any shared lock on module removal and > on sysfs ops? Yes, I would not recommend using such a lock at all. sysfs operations happen on a per-device basis, so you can lock the device structure. Module removal happens on a driver basis, and I have no idea what you want to lock there, but odds are it is NOT shared with your per-device structures either, right? If so, then yes, that is a bug, but a very rare one as drivers should do almost nothing except register/unregister_driver() in their module init/exit calls. zram is not a "normal" driver at all here, so fixing this type of problem up should be done in the zram code, it is not a generic module/sysfs issue at all. thanks, greg k-h