Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2100344yba; Mon, 15 Apr 2019 05:05:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqwaBVzYT2Sb+a4xeh+d8i2+QhotMhC3na3kg3CIlVRQ1cw8fyPviVb0mCKxtNPyNGNUP17J X-Received: by 2002:a63:5a1d:: with SMTP id o29mr69238850pgb.320.1555329907688; Mon, 15 Apr 2019 05:05:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555329907; cv=none; d=google.com; s=arc-20160816; b=v9YZk177NM/31aHUFNhKOpyRQ57zOXCC8t0GzUrY1Jh51NVw+JCxje7Lw0DiRJIRH0 I08eSRbWCZ5nYCYZ6ZFWfbzv+oqhhShYp+DIlVS0g1EfFUSpzlX3YdWn1lHItISjiVW7 Y7jnR4HcneXrVAjRVsVffrFFV8pb/F0BsPvPPT/D/Qm1LvA9GsBGT+NBIvCjWqGUQ97v mo+dWkYOtil4Bt0CklO8YGbKdAbZ3fCAmmm6t3dH73JS5eKDdy69DKBL+7YosfCQMxIk PXIBWbA1Yiofemzx3x0x8Ey1blZ0aknpvpWKt2cJ2mM6yxgLLrHtsGHKKNVWyMj97qar hyBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=+ZlkhWqlFDcJ0v+SJV/L1wUfotOgdmyPJR874Y1RxJk=; b=AVcew2ejM2YegdD7E6Lh4huaVk9gxvlwerf52BpN5gTjy9vOHvBtZ8hiShMjFT5i2t artwzk9XAdEHUwtpP0Jrm4rW8QJINRETKdFiRHT1G85c0teOP4KUq6FZIOrY77JFKlx2 zQ8hlp2/IbObw6Eqa+1VUH/7G1XlvY8dYynBG/uzRfqI9LzHMsRjaIAwbiBcTQAejta0 lvR0n5hAxghCyqQQjwnVV9yhU1tpTaA/L5zQgj/bzbicZ1hjl4Ow2rqVg9MkQ1owa+Rp S9UgJK7/y7clHgoTOTC/ursblbNOZKqPwVqmWcZiw72ryEb46IxUmLDp2rckA3Vy/Zzi AxEA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f20si45248814pfd.51.2019.04.15.05.04.50; Mon, 15 Apr 2019 05:05:07 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727221AbfDOMEH (ORCPT + 99 others); Mon, 15 Apr 2019 08:04:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47112 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725994AbfDOMEH (ORCPT ); Mon, 15 Apr 2019 08:04:07 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0B0F0308A953; Mon, 15 Apr 2019 12:04:07 +0000 (UTC) Received: from prarit.bos.redhat.com (prarit-guest.khw1.lab.eng.bos.redhat.com [10.16.200.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id 91BF060142; Mon, 15 Apr 2019 12:04:06 +0000 (UTC) Subject: Re: [PATCH] modules: Only return -EEXIST for modules that have finished loading To: Jessica Yu Cc: linux-kernel@vger.kernel.org, cavery@redhat.com References: <20190402133916.13513-1-prarit@redhat.com> <20190415112313.GA4080@linux-8ccs> From: Prarit Bhargava Message-ID: <2c27c9cf-0ce3-1c7f-bdc2-760d6d37d4d1@redhat.com> Date: Mon, 15 Apr 2019 08:04:05 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190415112313.GA4080@linux-8ccs> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Mon, 15 Apr 2019 12:04:07 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Thanks, P. > > Jessica >