linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Jordan <daniel.m.jordan@oracle.com>
To: Corentin Labbe <clabbe.montjoie@gmail.com>
Cc: Daniel Jordan <daniel.m.jordan@oracle.com>,
	Robin Murphy <robin.murphy@arm.com>,
	mark.rutland@arm.com, jiangshanlai@gmail.com,
	linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org,
	tj@kernel.org, Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: WARNING: at kernel/workqueue.c:1473 __queue_work+0x3b8/0x3d0
Date: Mon, 5 Oct 2020 13:09:10 -0400	[thread overview]
Message-ID: <20201005170910.vxwrdwnzlw3ahkb4@ca-dmjordan1.us.oracle.com> (raw)
In-Reply-To: <20201001175022.GA22444@Red>

On Thu, Oct 01, 2020 at 07:50:22PM +0200, Corentin Labbe wrote:
> On Tue, Mar 03, 2020 at 04:30:17PM -0500, Daniel Jordan wrote:
> > Barring other ideas, Corentin, would you be willing to boot with
> > 
> >     trace_event=initcall:*,module:* trace_options=stacktrace
> > 
> > and
> > 
> > diff --git a/kernel/module.c b/kernel/module.c
> > index 33569a01d6e1..393be6979a27 100644
> > --- a/kernel/module.c
> > +++ b/kernel/module.c
> > @@ -3604,8 +3604,11 @@ static noinline int do_init_module(struct module *mod)
> >  	 * be cleaned up needs to sync with the queued work - ie
> >  	 * rcu_barrier()
> >  	 */
> > -	if (llist_add(&freeinit->node, &init_free_list))
> > +	if (llist_add(&freeinit->node, &init_free_list)) {
> > +		pr_warn("%s: schedule_work for mod=%s\n", __func__, mod->name);
> > +		dump_stack();
> >  		schedule_work(&init_free_wq);
> > +	}
> >  
> >  	mutex_unlock(&module_mutex);
> >  	wake_up_all(&module_wq);
> > 
> > but not my earlier fix and share the dmesg and ftrace output to see if the
> > theory holds?
> > 
> > Also, could you attach your config?  Curious now what your crypto options look
> > like after fiddling with some of them today while trying and failing to see
> > this on x86.
> > 
> > thanks,
> > Daniel
> 
> Hello
> 
> Sorry for the very delayed answer.
> 
> I fail to reproduce it on x86 (qemu and  real hw) and arm.
> It seems to only happen on arm64.

Thanks for the config and dmesg, but there's no ftrace.  I see it's not
configured in your kernel, so could you boot with my earlier debug patch plus
this one and the kernel argument initcall_debug instead?

I'm trying to see whether it really is a request module call from the crypto
tests that's triggering this warning.  Preeetty likely that's what's happening,
but want to be sure since I can't reproduce this.  Then I can post the fix.

diff --git a/crypto/algapi.c b/crypto/algapi.c
index fdabf2675b63..0667c6b4588e 100644
--- a/crypto/algapi.c
+++ b/crypto/algapi.c
@@ -393,6 +393,10 @@ static void crypto_wait_for_test(struct crypto_larval *larval)
 {
 	int err;
 
+	pr_warn("%s: cra_name %s cra_driver_name %s\n", __func__,
+		larval->adult->cra_name, larval->adult->cra_driver_name);
+	dump_stack();
+
 	err = crypto_probing_notify(CRYPTO_MSG_ALG_REGISTER, larval->adult);
 	if (err != NOTIFY_STOP) {
 		if (WARN_ON(err != NOTIFY_DONE))
diff --git a/kernel/kmod.c b/kernel/kmod.c
index 3cd075ce2a1e..46c4645be763 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -166,6 +166,8 @@ int __request_module(bool wait, const char *fmt, ...)
 	}
 
 	trace_module_request(module_name, wait, _RET_IP_);
+	pr_warn("%s: %s\n", __func__, module_name);
+	dump_stack();
 
 	ret = call_modprobe(module_name, wait ? UMH_WAIT_PROC : UMH_WAIT_EXEC);
 

  reply	other threads:[~2020-10-05 17:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200217204803.GA13479@Red>
     [not found] ` <20200218163504.y5ofvaejleuf5tbh@ca-dmjordan1.us.oracle.com>
2020-02-20  9:03   ` WARNING: at kernel/workqueue.c:1473 __queue_work+0x3b8/0x3d0 Corentin Labbe
2020-02-21 17:42     ` Daniel Jordan
2020-02-28 12:33       ` Will Deacon
2020-02-28 15:33         ` Daniel Jordan
2020-03-01 17:53           ` Corentin Labbe
2020-03-02 17:25             ` Daniel Jordan
2020-03-02 18:00               ` Robin Murphy
2020-03-03 21:30                 ` Daniel Jordan
2020-03-03 22:43                   ` Eric Biggers
2020-03-06 16:12                     ` Daniel Jordan
2020-10-01 17:50                   ` Corentin Labbe
2020-10-05 17:09                     ` Daniel Jordan [this message]
2020-10-07 19:41                       ` Corentin Labbe
2020-10-08 17:07                         ` Daniel Jordan
2020-03-03  7:48               ` Corentin Labbe
2020-03-03 21:31                 ` Daniel Jordan
2020-09-25 18:12                   ` Corentin Labbe
2020-09-30 18:18                     ` Daniel Jordan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201005170910.vxwrdwnzlw3ahkb4@ca-dmjordan1.us.oracle.com \
    --to=daniel.m.jordan@oracle.com \
    --cc=clabbe.montjoie@gmail.com \
    --cc=jiangshanlai@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robin.murphy@arm.com \
    --cc=tj@kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).