linux-hams.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lars Kellogg-Stedman <lars@oddbit.com>
To: linux-hams@vger.kernel.org
Subject: unregister_netdevice: waiting for ax0 to become free
Date: Tue, 9 Apr 2024 17:05:40 -0400	[thread overview]
Message-ID: <CA+Q+rdzYUcfYF8CcX1WOWjVBYiZgidFAY1M0kR4J4KL73yN9yA@mail.gmail.com> (raw)

First, apologies if this isn't the right place for this. I know this
is primarily a development list, but I'm trying to track down patches
for a kernel issue.

I'm running a kernel built from 2c71fdf02a9, which includes the recent
use-after-free patch from Duoming Zhou in fd819ad3ec. After bringing
up ax.25 (see below), If I make a single ax.25 connection to the host
(to an ax25d hosted service), it will subsequently fail to reboot; the
kernel gets stuck waiting for an ax.25 interface:

     3   [  217.717327] unregister_netdevice: waiting for ax0 to
become free. Usage count = 0
     2   [  227.957427] unregister_netdevice: waiting for ax0 to
become free. Usage count = 0

The kernel will get stuck here indefinitely (or until the watchdog
triggers). I know this isn't a new problem, but is it one for which
patches exist? There's a lot of older information out there, and the
website in the mailing list welcome message
(https://radio.linux.org.au/) appears to have gone away.

It looks there is a panic earlier in the shutdown process; the kernel
trace starts like this:

=== cut ===
[   32.072855] ------------[ cut here ]------------
[   32.074595] refcount_t: underflow; use-after-free.
[   32.075777] WARNING: CPU: 0 PID: 1354 at lib/refcount.c:28
refcount_warn_saturate+0xbe/0x110
[   32.077104] Modules linked in: mkiss ax25 ...
[   32.088624] CPU: 0 PID: 1354 Comm: socat Not tainted 6.9.0-rc3+ #3
=== cut ===

I'm running a test environment with a pair of AXUDP interfaces; I'm
configuring things like this:

=== cut ===
#!/bin/sh

mkdir -p /run/radio
socat \
        pty,link=/run/radio/ptyudp0 \
        pty,link=/run/radio/kissudp0 &
socat \
        pty,link=/run/radio/ptyudp1 \
        pty,link=/run/radio/kissudp1 &

while ! [ -c /run/radio/ptyudp0 ]; do sleep 1; done
while ! [ -c /run/radio/ptyudp1 ]; do sleep 1; done

ax25ipd -c /etc/ax25/ax25ipd-udp0.conf -d /run/radio/ptyudp0
ax25ipd -c /etc/ax25/ax25ipd-udp1.conf -d /run/radio/ptyudp1

kissattach -l $(readlink /run/radio/kissudp0) udp0
kissattach -l $(readlink /run/radio/kissudp1) udp1

kissparms -p udp0 -c 1
kissparms -p udp1 -c 1

ax25d -l
=== cut ===

-- 
Lars Kellogg-Stedman <lars@oddbit.com> | larsks@{twitter, irc, github,
...} | N1LKS

             reply	other threads:[~2024-04-09 22:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-09 21:05 Lars Kellogg-Stedman [this message]
2024-04-10  0:20 ` unregister_netdevice: waiting for ax0 to become free David Ranch
2024-04-10  1:21   ` Lars Kellogg-Stedman
2024-04-10 12:01 ` Dan Carpenter
2024-04-11  2:42   ` Lars Kellogg-Stedman
2024-04-11 13:47     ` Lars Kellogg-Stedman
2024-04-10 12:02 ` Dan Carpenter
2024-04-20  1:40 ` Lars Kellogg-Stedman
2024-04-24  2:06   ` Lars Kellogg-Stedman
2024-04-25 12:14     ` Lars Kellogg-Stedman

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=CA+Q+rdzYUcfYF8CcX1WOWjVBYiZgidFAY1M0kR4J4KL73yN9yA@mail.gmail.com \
    --to=lars@oddbit.com \
    --cc=linux-hams@vger.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 read-only IMAP folder(s) and NNTP newsgroup(s).