All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Schiller <ms@dev.tdt.de>
To: Wentao Liang <vulab@iscas.ac.cn>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	linux-x25@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] net/x25: release the route on a nonblocking connect
Date: Mon, 23 Nov 2026 18:44:34 +0100 (CET)	[thread overview]
Message-ID: <2b85d5c0abedae444d312de12a388ef4@dev.tdt.de> (raw)
In-Reply-To: <179375957890.488859.954022080109103885@kernel.org>

On Wed, 04 Nov 2026 03:32:58 +0100, netdev-bot wrote:
> - Whether the issue was actually triggered, or is only theoretical
>   (e.g. found by code inspection). If it was triggered please include
>   the symptoms, like the stack trace or error messages.

It is real and easy to trigger: every nonblocking connect() leaks one
reference on the route. After a single nonblocking connect() and
deleting the route with SIOCDELRT, kmemleak reports the route:

  unreferenced object 0xffff8880008cf940 (size 64):
    comm "x25test", pid 26, jiffies 4294892916
    backtrace (crc 40ba0c57):
      __kmalloc_cache_noprof+0x3c/0x69
      x25_route_ioctl+0xe8/0x1bf
      sock_ioctl+0x2d4/0x35d
      __x64_sys_ioctl+0x56a/0x77c

With the patch applied, kmemleak stays quiet. Good catch, I missed
the route reference in e21dba7a4df4.

Wentao, as the patch is marked "Changes Requested", please send a v2
as a new thread with [PATCH net v2] in the subject:

- describe in the commit message, in plain words, how you found the
  issue, e.g. "discovered by an AI code review agent", and add the
  kmemleak report above as validation: a single nonblocking connect()
  followed by deleting the route with SIOCDELRT is enough;
- drop the Assisted-by: line, checkpatch rejects it; if you want to
  say which tools helped with the patch itself, do so below the "---"
  line;
- add a link to this v1 below the "---" line.

Feel free to add my

Acked-by: Martin Schiller <ms@dev.tdt.de>

      reply	other threads:[~2026-11-23 17:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04  2:28 [PATCH] net/x25: release the route on a nonblocking connect Wentao Liang
2026-11-04  2:32 ` netdev-bot+sinfo
2026-11-23 17:44   ` Martin Schiller [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=2b85d5c0abedae444d312de12a388ef4@dev.tdt.de \
    --to=ms@dev.tdt.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-x25@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vulab@iscas.ac.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.