Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2166375yba; Mon, 15 Apr 2019 06:23:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/vr0LAbm5gVbgQosUJHm9r1J2A4SprwqpEsATvwXv4LYKpZBE4PlZwcDniXeSaVyR2dZz X-Received: by 2002:a17:902:168:: with SMTP id 95mr73421988plb.212.1555334590433; Mon, 15 Apr 2019 06:23:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555334590; cv=none; d=google.com; s=arc-20160816; b=ncjDY6AF//mup3lZu7MbJs3vn6s89744FytzeWCmKytYO2dLUEDughTkMf4BCWmLfa uXCCXMjsEjUf2mhSYHVOQbYF6vqKUTRxADcuJajbcqCzJDWCrO8iI3L16eYhsLyt98+P phXD8JnycX5Thdsw/DleUHtryxgQSd3erHuvmwvCFpe5gLZ9Z6rV2kiaCDf3zOB5sXRk kIYF3tDXsZnVIvNGurSAi3eDzRGKnLhE7ERvTV2KLKbPCTnS1U36ZMu5mfD9F7Ju07nE ChmF9LfSOfacWhFfQbJ/YCuRRhih1MpsapKH9G+0t1jCi15EoNzULH3wtZTvrk0TPkVs w16Q== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Omkg9SxFKGxdOww141HmniSDTV30LbwO1DRdnEl+uLs=; b=weCsVl9bleR2TL8dSLLQPbsFCNS8ZXuymdg8RNvv+MImr3PFcOb3JpPJMR6G30DtAz tXu5PRrhTghKuaAJCZ9deThUde23kHL1Xqul2TXUkVxXyR15H20xypNboNOmu6XExSUF qtO7jl/BIq7P/ZDBNZvDa8KRiYfqzXFcQS8AJIzt6zBZKdgyyCMxb5PP81yvkYYn2r9y /1xGy6v+uTI4eCSW+DIPIg2QF20G3uG1Jm53FPH8cNXn6laeQMfgBP66MWcwm1H+3GVP jyPLq4Nw/ca/Y580XuHvOGE17Vy1Fj21hDwBRfkB3qnaYxkirHzE0BuLrThmVtEf+g5E z7WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=A9gkIDV3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v69si43517745pgd.276.2019.04.15.06.22.53; Mon, 15 Apr 2019 06:23:10 -0700 (PDT) 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=A9gkIDV3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727339AbfDONUs (ORCPT + 99 others); Mon, 15 Apr 2019 09:20:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:34206 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727025AbfDONUs (ORCPT ); Mon, 15 Apr 2019 09:20:48 -0400 Received: from linux-8ccs (ip5f5adbb4.dynamic.kabel-deutschland.de [95.90.219.180]) (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 7E79F206BA; Mon, 15 Apr 2019 13:20:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555334447; bh=T1DJ+q8KBIpU+X0s1yRAsBdx9eqz9nfumWEySbtCIzA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=A9gkIDV3W1tdncnhw5zZOHfdixp6VU6sCPSqd5CczwNoubEeeLqSBxZ09oY7erycl S5G2z0b7AX3f6MYjAnqzB4USdD5ZsWDfWFlQbnOJnYq+p1ikr1di+yRVEwmCqBNYbr qRuOOGd247ucDV8uRq8W7oxPTATEQqyepByL3uv8= Date: Mon, 15 Apr 2019 15:20:43 +0200 From: Jessica Yu To: Prarit Bhargava Cc: linux-kernel@vger.kernel.org, cavery@redhat.com Subject: Re: [PATCH] modules: Only return -EEXIST for modules that have finished loading Message-ID: <20190415132043.GB4080@linux-8ccs> References: <20190402133916.13513-1-prarit@redhat.com> <20190415112313.GA4080@linux-8ccs> <2c27c9cf-0ce3-1c7f-bdc2-760d6d37d4d1@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2c27c9cf-0ce3-1c7f-bdc2-760d6d37d4d1@redhat.com> X-OS: Linux linux-8ccs 5.1.0-rc1-lp150.12.28-default+ x86_64 User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +++ Prarit Bhargava [15/04/19 08:04 -0400]: > > >On 4/15/19 7:23 AM, Jessica Yu wrote: >> +++ Prarit Bhargava [02/04/19 09:39 -0400]: >>> Microsoft HyperV disables the X86_FEATURE_SMCA bit on AMD systems, and >>> linux guests boot with repeated errors: >>> >>> amd64_edac_mod: Unknown symbol amd_unregister_ecc_decoder (err -2) >>> amd64_edac_mod: Unknown symbol amd_register_ecc_decoder (err -2) >>> amd64_edac_mod: Unknown symbol amd_report_gart_errors (err -2) >>> amd64_edac_mod: Unknown symbol amd_unregister_ecc_decoder (err -2) >>> amd64_edac_mod: Unknown symbol amd_register_ecc_decoder (err -2) >>> amd64_edac_mod: Unknown symbol amd_report_gart_errors (err -2) >>> >>> The warnings occur because the module code erroneously returns -EEXIST >>> for modules that have failed to load and are in the process of being >>> removed from the module list. >>> >>> module amd64_edac_mod has a dependency on module edac_mce_amd.? Using >>> modules.dep, systemd will load edac_mce_amd for every request of >>> amd64_edac_mod.? When the edac_mce_amd module loads, the module has >>> state MODULE_STATE_UNFORMED and once the module load fails and the state >>> becomes MODULE_STATE_GOING.? Another request for edac_mce_amd module >>> executes and add_unformed_module() will erroneously return -EEXIST even >>> though the previous instance of edac_mce_amd has MODULE_STATE_GOING. >>> Upon receiving -EEXIST, systemd attempts to load amd64_edac_mod, which >>> fails because of unknown symbols from edac_mce_amd. >>> >>> add_unformed_module() must wait to return for any case other than >>> MODULE_STATE_LIVE to prevent a race between multiple loads of >>> dependent modules. >>> >>> Signed-off-by: Prarit Bhargava >>> Reported-by: Cathy Avery >>> Cc: Jessica Yu >> >> Applied to modules-next. Thanks Prarit! > >Jessica, could I have the URL of the git tree? Sure, you can find the modules-next branch at: git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux.git Thanks, Jessica