From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32F03440C for ; Wed, 30 Oct 2024 00:14:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730247278; cv=none; b=Kzs73dRSWTnkws+2Vwy3M6klkynxzFdwBGdbSB79H35DImnq0vX7Xi2UwpzOT6A/H4Y57F0KGySxlMuRe+3EfYZEEa7PdUIeUV4j+9ISfdFtKL+qPS3oCUk/jxenb6rsUgafTkS54SFJT9PUrMkJ605uEGP3a+P7kxOpnsvskKc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730247278; c=relaxed/simple; bh=vu2etmpFYYgitN/04P9hwKI2HiYdQTVxczs/MzMmepI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=R+1BiLlqPyjLY9KkM+SNTfwZQ/Cf5GCjArcY3aViSDDxJv19Fo5MFtFwG9KnDmOFv/T4rSSeesJMsUyuRJSN72pWStKevU6cKJBi8h0r6xUMOtcUJ9iDdHhI6J8HA23D8R1PPTBs8DmNCL5RuW7I4se0IJ9VKOk1KcGIYyjbe6E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=f7NKJC/N; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="f7NKJC/N" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52337C4CECD; Wed, 30 Oct 2024 00:14:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1730247277; bh=vu2etmpFYYgitN/04P9hwKI2HiYdQTVxczs/MzMmepI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=f7NKJC/NBtWbVq83DkmUw3cfztmRR+pTd61b5RuOaW/5GrVnZLPAwneiiBiuZi1eO Q3ejIcj594xfmKH8V1+DQaCWU+HIZaISiZC9biVkfDXgapuK5Zl00EfX8sjCsgwUMi 6jIHGw15lGBOvazM6cy3ur0mH8D10kVF/8cx4GLg= Date: Wed, 30 Oct 2024 01:14:24 +0100 From: Greg Kroah-Hartman To: Dionna Glaze Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Luis Chamberlain , Russ Weight , Danilo Krummrich , "Rafael J. Wysocki" , Tianfei zhang , Russ Weight Subject: Re: [PATCH 2/4] firmware_loader: Move module refcounts to allow unloading Message-ID: <2024103012-precise-utmost-f423@gregkh> References: <20241029183907.3536683-1-dionnaglaze@google.com> <20241029183907.3536683-3-dionnaglaze@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241029183907.3536683-3-dionnaglaze@google.com> On Tue, Oct 29, 2024 at 06:39:02PM +0000, Dionna Glaze wrote: > If a kernel module registers a firmware upload API ops set, then it's > unable to be moved due to effectively a cyclic reference that the module > depends on the upload which depends on the module. > > Instead, only require the try_module_get when an upload is requested to > disallow unloading a module only while the upload is in progress. > > Fixes: 97730bbb242cd ("firmware_loader: Add firmware-upload support") > > CC: Luis Chamberlain > CC: Russ Weight > CC: Danilo Krummrich > CC: Greg Kroah-Hartman > CC: "Rafael J. Wysocki" > CC: Tianfei zhang > > Signed-off-by: Dionna Glaze > Change-Id: Ifac9513de2f58a5120d4c0a681e969cd71cd3c68 Please always run checkpatch on a change before sending it out :(