Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4186059pxu; Mon, 12 Oct 2020 11:39:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxL+oRN7waOR+HnbwPUErKvzhXbDwuMYwjuGnCA0OqRW7etwCcBVfHEI0xtFLNjJ0pCd1/6 X-Received: by 2002:a17:906:2604:: with SMTP id h4mr28293015ejc.26.1602527985973; Mon, 12 Oct 2020 11:39:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602527985; cv=none; d=google.com; s=arc-20160816; b=s5dB4WS8DFGxopaQA0/lwL4NkevkT5KenKZtPf/3fmufjrJWO6/9Bejl4hIVg3hmm9 cC5iuWSNHgHlIg84f4fovRkkH39cZ/f5lylOf8cr8soOkVhVDFcM1yMPoWlRGPmTKM6y tfBHh5as8Mgm1h1CkRggQgwc7/8iH5GAF9jq0i4+DTVP82r9vaQwDuP/P7ESERECx6ph TNcz8JSNLctoaI7e/03V53AhjqMQW8COOoVoK/g5gJ8WvNjNkwRMmcduF8nB0j1/Tkxj yYUHqdJiz7gtYRFOZtaYLRISHRNRjsfEoyltBOTx36o4xdCMrvOQAXbMQMABNwnMzd7t WPOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=BaPAfL8GFEeUzc+bvnnZhmGXSyCYxcFlLg+6KGDv0ro=; b=rcnwKtYMfFjgAUP1+P2m4f+NZv1L04GXVb3dZC+RVwKF0qK2pNZxa5+b2V8MuaavBK KJya5in+gPC0GZB7e0j0BSbje8DfdcXwZV8QZXFdqemO/zIZXAMb/0+Xp5BgJiN2z+CS lvvArfw+4vDg1GviJLKCNvo6F0A1Q25LZu7lJoGcqMd5mk+jjbqrNlt0zJW2JPIut4zg J1cFWfBjqfsiu5i3QuF5pzCnYtfC0wB4volaznci0wnnq9QuKZp7j9m9wB3XinsSR1sH 99X+7I5ycJCshLfrcJAed4nEelKS9Zk/m6NGyhjb0Ha1P9ZzBSswDhJk/neEgy2k8bkV jvmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=S7hfWuJJ; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u17si12822300edd.286.2020.10.12.11.39.21; Mon, 12 Oct 2020 11:39:45 -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=@kernel.org header.s=default header.b=S7hfWuJJ; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389657AbgJLSfD (ORCPT + 99 others); Mon, 12 Oct 2020 14:35:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:43432 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389213AbgJLSfC (ORCPT ); Mon, 12 Oct 2020 14:35:02 -0400 Received: from linux-8ccs (p57a236d4.dip0.t-ipconnect.de [87.162.54.212]) (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 9933020797; Mon, 12 Oct 2020 18:35:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602527702; bh=4bedygPxkAIdJoSdpOeA13U7DggA6lrz5iExsiBazPA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=S7hfWuJJGRQ3EMneN7eL6QLc2STkWB9VKl2NCkFX2dzbQzYkhWqgWUnpuMWjdxE8f vsaSAbVKrj7hDPWwY3cbGtzd30e24nBJ06PiSqY5i+XD6mVmYioG9FLrREZev5ksn/ PGJzqGfubIl9Q5894Dbr2c9fOoOqO6wZCoMuBfTA= Date: Mon, 12 Oct 2020 20:34:57 +0200 From: Jessica Yu To: Daniel Jordan Cc: Corentin Labbe , Eric Biggers , Rick Edgecombe , Robin Murphy , Will Deacon , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] module: statically initialize init section freeing data Message-ID: <20201012183456.GA7338@linux-8ccs> References: <20201008173220.923671-1-daniel.m.jordan@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20201008173220.923671-1-daniel.m.jordan@oracle.com> X-OS: Linux linux-8ccs 4.12.14-lp150.12.61-default x86_64 User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +++ Daniel Jordan [08/10/20 13:32 -0400]: >Corentin hit the following workqueue warning when running with >CRYPTO_MANAGER_EXTRA_TESTS: > > WARNING: CPU: 2 PID: 147 at kernel/workqueue.c:1473 __queue_work+0x3b8/0x3d0 > Modules linked in: ghash_generic > CPU: 2 PID: 147 Comm: modprobe Not tainted > 5.6.0-rc1-next-20200214-00068-g166c9264f0b1-dirty #545 > Hardware name: Pine H64 model A (DT) > pc : __queue_work+0x3b8/0x3d0 > Call trace: > __queue_work+0x3b8/0x3d0 > queue_work_on+0x6c/0x90 > do_init_module+0x188/0x1f0 > load_module+0x1d00/0x22b0 > >I wasn't able to reproduce on x86 or rpi 3b+. > >This is > > WARN_ON(!list_empty(&work->entry)) > >from __queue_work(), and it happens because the init_free_wq work item >isn't initialized in time for a crypto test that requests the gcm >module. Some crypto tests were recently moved earlier in boot as >explained in commit c4741b230597 ("crypto: run initcalls for generic >implementations earlier"), which went into mainline less than two weeks >before the Fixes commit. > >Avoid the warning by statically initializing init_free_wq and the >corresponding llist. > >Link: https://lore.kernel.org/lkml/20200217204803.GA13479@Red/ >Fixes: 1a7b7d922081 ("modules: Use vmalloc special flag") >Reported-by: Corentin Labbe >Tested-by: Corentin Labbe >Tested-on: sun50i-h6-pine-h64 >Tested-on: imx8mn-ddr4-evk >Tested-on: sun50i-a64-bananapi-m64 >Signed-off-by: Daniel Jordan Applied, thanks! Jessica