linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Gregory Erwin <gregerwin256@gmail.com>
Cc: Rui Salvaterra <rsalvaterra@gmail.com>,
	Linux Crypto Mailing List <linux-crypto@vger.kernel.org>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: ath9k: hwrng blocks for several minutes when phy is un-associated
Date: Fri, 24 Jun 2022 02:50:26 +0200	[thread overview]
Message-ID: <YrUKUt5nvX8qf1Je@zx2c4.com> (raw)
In-Reply-To: <CAHmME9oAV+YbtfYh+h1OBpjTnJJzyfAujuCC1BSKMwsH8hDx0w@mail.gmail.com>

Hey again again,

On Fri, Jun 24, 2022 at 02:01:22AM +0200, Jason A. Donenfeld wrote:
> Hey again,
> 
> On Fri, Jun 24, 2022 at 1:47 AM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> >
> > Hey Gregory,
> >
> > On Fri, Jun 24, 2022 at 1:36 AM Gregory Erwin <gregerwin256@gmail.com> wrote:
> > >
> > > No luck.
> > >
> > > The first patch caused a warning and oops with ath9k_rng_read() at the
> > > top of the call stack when reading from /dev/hwrng:
> > >   WARNING: CPU: 1 PID: 454 at kernel/kthread.c:75 kthread_should_stop+0x2a/0x30
> > >   BUG: kernel NULL pointer dereference, address: 0000000000000000
> > >
> > > The second didn't have a noticeable effect, for better or worse.
> >
> > Alright. That's actually getting us somewhere. So the path in question
> > here is from reading /dev/hwrng, not from the kthread that's doing the
> > same read.
> >
> > Can you do a `cat /dev/hwrng > /dev/null`, and then do whatever it is
> > you do that causes everything to hang, and then while things are hung
> > in the bad way, look at the contents of /proc/[the pid of the cat you
> > just ran]/stack?
> 
> There's another flow I'm interested in. You said it prevents the
> system from sleeping. Does it also make a `ip link set wlan0 down`
> hang too? If so, could you send the `/proc/[pid of ip link set
> down]/stack ` of a hung ip process? That seems like the more relevant
> deadlock to look into.

I think I have a plausible theory. I'll send a real patch, and you can
test it. Incoming shortly...

Jason

  reply	other threads:[~2022-06-24  0:50 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-23  5:08 ath9k: hwrng blocks for several minutes when phy is un-associated Gregory Erwin
2022-06-23 12:14 ` Jason A. Donenfeld
2022-06-23 12:16   ` Jason A. Donenfeld
2022-06-23 23:36     ` Gregory Erwin
2022-06-23 23:47       ` Jason A. Donenfeld
2022-06-24  0:01         ` Jason A. Donenfeld
2022-06-24  0:50           ` Jason A. Donenfeld [this message]
2022-06-24  1:14             ` [PATCH] ath9k: rng: escape sleep loop when unregistering Jason A. Donenfeld
2022-06-24  5:25               ` Gregory Erwin
2022-06-24 19:12                 ` Jason A. Donenfeld
2022-06-24 20:44                   ` [PATCH v2] ath9k: sleep for less time when unregistering hwrng Jason A. Donenfeld
2022-06-25  0:13                     ` Gregory Erwin
2022-06-25  0:40                       ` Jason A. Donenfeld
2022-06-27  6:45                     ` Herbert Xu
2022-06-27  9:29                       ` [PATCH v3] " Jason A. Donenfeld
2022-06-27 10:49                         ` [PATCH v4] " Jason A. Donenfeld
2022-06-27 11:37                           ` [PATCH v5] " Jason A. Donenfeld
2022-06-27 12:07                             ` [PATCH v6] " Jason A. Donenfeld
2022-06-27 12:18                               ` Toke Høiland-Jørgensen
2022-06-28  1:39                                 ` Gregory Erwin
2022-06-28 10:46                                   ` Jason A. Donenfeld
2022-06-28 10:48                                     ` Jason A. Donenfeld
2022-06-28 10:51                                       ` Herbert Xu
2022-06-28 10:55                                         ` Jason A. Donenfeld
2022-06-28 12:05                                           ` Jason A. Donenfeld
2022-06-28 15:14                                             ` Jason A. Donenfeld
2022-06-28  1:53                               ` Herbert Xu
2022-06-28 10:45                               ` Toke Høiland-Jørgensen

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=YrUKUt5nvX8qf1Je@zx2c4.com \
    --to=jason@zx2c4.com \
    --cc=gregerwin256@gmail.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rsalvaterra@gmail.com \
    /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).