All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Christian Brauner <brauner@kernel.org>
Cc: Kuniyuki Iwashima <kuniyu@google.com>,
	linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH][RFC] don't bother with path_get()/path_put() in unix_open_file()
Date: Mon, 14 Jul 2025 16:04:12 +0100	[thread overview]
Message-ID: <20250714150412.GF1880847@ZenIV> (raw)
In-Reply-To: <20250714-digital-tollwut-82312f134986@brauner>

On Mon, Jul 14, 2025 at 10:24:11AM +0200, Christian Brauner wrote:
> On Sat, Jul 12, 2025 at 06:38:33AM +0000, Kuniyuki Iwashima wrote:
> > From: Al Viro <viro@zeniv.linux.org.uk>
> > Date: Sat, 12 Jul 2025 06:41:57 +0100
> > > Once unix_sock ->path is set, we are guaranteed that its ->path will remain
> > > unchanged (and pinned) until the socket is closed.  OTOH, dentry_open()
> > > does not modify the path passed to it.
> > > 
> > > IOW, there's no need to copy unix_sk(sk)->path in unix_open_file() - we
> > > can just pass it to dentry_open() and be done with that.
> > > 
> > > Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> > 
> > Sounds good.  I confirmed vfs_open() copies the passed const path ptr.
> > 
> > Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
> 
> I can just throw that into the SCM_PIDFD branch?

Fine by me; the thing is, I don't have anything else in the area at the moment
(and won't until -rc1 - CLASS(get_unused_fd) series will stray there, but
it's not settled enough yet, so it's definitely the next cycle fodder).

So if you (or netdev folks) already have anything going on in the af_unix.c,
I've no problem with that thing going there.

  reply	other threads:[~2025-07-14 15:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-12  5:41 [PATCH][RFC] don't bother with path_get()/path_put() in unix_open_file() Al Viro
2025-07-12  6:38 ` Kuniyuki Iwashima
2025-07-14  8:24   ` Christian Brauner
2025-07-14 15:04     ` Al Viro [this message]
2025-07-14 16:11       ` Kuniyuki Iwashima
2025-07-15  9:46 ` Christian Brauner

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=20250714150412.GF1880847@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=brauner@kernel.org \
    --cc=kuniyu@google.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=netdev@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 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.