From: Dan Carpenter <dan.carpenter@linaro.org>
To: Lars Kellogg-Stedman <lars@oddbit.com>
Cc: Duoming Zhou <duoming@zju.edu.cn>,
linux-hams@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, pabeni@redhat.com, kuba@kernel.org,
edumazet@google.com, davem@davemloft.net, jreuter@yaina.de
Subject: Re: [PATCH net] ax25: Fix refcount leak issues of ax25_dev
Date: Sat, 4 May 2024 15:16:55 +0300 [thread overview]
Message-ID: <1e14f4f1-29dd-4fe5-8010-de7df0866e93@moroto.mountain> (raw)
In-Reply-To: <ekgwuycs3hioz6vve57e6z7igovpls6s644rvdxpxqqr7v7is6@u5lqegkuwcex>
On Fri, May 03, 2024 at 07:40:32PM -0400, Lars Kellogg-Stedman wrote:
> On Fri, May 03, 2024 at 11:36:37PM +0300, Dan Carpenter wrote:
> > Could you test this diff?
>
> With that diff applied, there is no kernel panic, but I see the same
> refcount errors that I saw before the latest series of patches from
> Duoming:
Wait, which panic is this? The NULL dereference introduce by the
"ax25_dev" vs "res" typo?
>
> refcount_t: decrement hit 0; leaking memory.
> refcount_t: underflow; use-after-free.
Hm... Is there a missing netdev_hold() in ax25_bind() on the
"User already set interface with SO_BINDTODEVICE" path? That would
fit with the commit 9fd75b66b8f6 ("ax25: Fix refcount leaks caused by
ax25_cb_del()") which introduced the bug.
I'm not really sure I understand how netdev_hold() works.
(My patch here is correct, but apparently that's not the bug).
regards,
dan carpenter
next prev parent reply other threads:[~2024-05-04 12:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-01 6:02 [PATCH net] ax25: Fix refcount leak issues of ax25_dev Duoming Zhou
2024-05-01 17:33 ` Markus Elfring
2024-05-01 17:43 ` Dan Carpenter
2024-05-02 4:35 ` duoming
2024-05-02 7:56 ` Dan Carpenter
2024-05-02 9:30 ` Paolo Abeni
2024-05-02 1:29 ` Lars Kellogg-Stedman
2024-05-03 20:36 ` Dan Carpenter
2024-05-03 23:40 ` Lars Kellogg-Stedman
2024-05-04 12:16 ` Dan Carpenter [this message]
2024-05-04 22:16 ` Lars Kellogg-Stedman
2024-05-07 3:18 ` Lars Kellogg-Stedman
2024-05-07 8:08 ` Dan Carpenter
2024-05-07 9:04 ` duoming
2024-05-09 1:40 ` duoming
2024-05-23 12:30 ` Lars Kellogg-Stedman
2024-05-07 6:38 ` Dan Carpenter
2024-05-15 9:52 ` duoming
2024-05-04 11:04 ` Dan Carpenter
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=1e14f4f1-29dd-4fe5-8010-de7df0866e93@moroto.mountain \
--to=dan.carpenter@linaro.org \
--cc=davem@davemloft.net \
--cc=duoming@zju.edu.cn \
--cc=edumazet@google.com \
--cc=jreuter@yaina.de \
--cc=kuba@kernel.org \
--cc=lars@oddbit.com \
--cc=linux-hams@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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