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: Re: unregister_netdevice: waiting for ax0 to become free
Date: Thu, 25 Apr 2024 08:14:48 -0400	[thread overview]
Message-ID: <krtmg7zird2nromfjnyywytlrjclvbgp3vtj56wk2ajzzoeilf@x4v2ohdtmjxt> (raw)
In-Reply-To: <hkgoneb732pm7cqc2wisrrducn3pdcxaauoeli6u7tgdigovax@oattb6ovobyq>

On Tue, Apr 23, 2024 at 10:06:44PM -0400, Lars Kellogg-Stedman wrote:
> It looks like we may be failing to increment the refcount on the
> *listening* socket when a connection is established...but we're
> decrementing it when the connection is closed, leading to problems.

The above problem can be resolved by adding a call to ax25_dev_hold() in
ax25_accept(), but it looks like a similar situation exists in the
device refcount (ax25_dev->dev->dev_refcnt), which also decrements for
every connection and ultimately experiences an underflow (1 -> 0 -> -1073741824).

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

      reply	other threads:[~2024-04-25 15:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-09 21:05 unregister_netdevice: waiting for ax0 to become free Lars Kellogg-Stedman
2024-04-10  0:20 ` 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 [this message]

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=krtmg7zird2nromfjnyywytlrjclvbgp3vtj56wk2ajzzoeilf@x4v2ohdtmjxt \
    --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).