netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Antoine Tenart <atenart@kernel.org>
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	edumazet@google.com, netdev@vger.kernel.org,
	gregkh@linuxfoundation.org, mhocko@suse.com
Subject: Re: [RFC PATCH net-next 0/4] net-sysfs: remove rtnl_trylock/restart_syscall use
Date: Thu, 19 Oct 2023 07:54:32 -0700	[thread overview]
Message-ID: <20231019075432.4d975762@hermes.local> (raw)
In-Reply-To: <169770164786.433869.13558540630519879540@kwain>

On Thu, 19 Oct 2023 09:47:27 +0200
Antoine Tenart <atenart@kernel.org> wrote:

> > That doesn't mean the locking should not be fixed, just that better
> > to avoid the situation if possible.  
> 
> 100% agree on this one. I believe using netlink is the right way.
> 
> Having said that, sysfs is still there and (quite some time ago) while
> having discussions with different projects, some were keen to switch to
> netlink, but some weren't and pushed back because "sysfs is a stable
> API" and "if there is a kernel issue it should be fixed in the kernel".
> Not blaming anyone really, they'd have to support the two interfaces for
> compatibility. My point is, yes, I would encourage everyone to use
> netlink too, but we don't control every user and it's not like sysfs
> will disappear anytime soon.

I have seen code doing discovery of new devices via netlink then poking
around in sysfs. But that usage is inherently racy from the application
point of view. By the time device is discovered, it might be removed or
worse renamed before the sysfs operations.

      reply	other threads:[~2023-10-19 14:54 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-18 15:47 [RFC PATCH net-next 0/4] net-sysfs: remove rtnl_trylock/restart_syscall use Antoine Tenart
2023-10-18 15:47 ` [RFC PATCH net-next 1/4] net-sysfs: remove rtnl_trylock from device attributes Antoine Tenart
2023-10-18 16:49   ` Greg KH
2023-10-19  8:13     ` Antoine Tenart
2023-10-19 15:37       ` Greg KH
2023-10-18 18:13   ` Stephen Hemminger
2023-10-19  7:48     ` Antoine Tenart
2025-01-02 22:36   ` Jakub Kicinski
2025-01-03  8:41     ` Eric Dumazet
2025-01-07 16:30     ` Antoine Tenart
2025-01-07 17:06       ` Jakub Kicinski
2025-01-16 13:36         ` Antoine Tenart
2025-01-16 23:42           ` Jakub Kicinski
2025-01-16 23:43             ` Jakub Kicinski
2025-01-17  8:26               ` Antoine Tenart
2023-10-18 15:47 ` [RFC PATCH net-next 2/4] net-sysfs: move queue attribute groups outside the default groups Antoine Tenart
2023-10-18 15:47 ` [RFC PATCH net-next 3/4] net-sysfs: prevent uncleared queues from being re-added Antoine Tenart
2023-10-18 15:47 ` [RFC PATCH net-next 4/4] net-sysfs: remove rtnl_trylock from queue attributes Antoine Tenart
2023-10-18 15:57 ` [RFC PATCH net-next 0/4] net-sysfs: remove rtnl_trylock/restart_syscall use Stephen Hemminger
2023-10-18 16:34   ` Antoine Tenart
2023-10-18 18:15 ` Stephen Hemminger
2023-10-19  7:47   ` Antoine Tenart
2023-10-19 14:54     ` Stephen Hemminger [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=20231019075432.4d975762@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=atenart@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kuba@kernel.org \
    --cc=mhocko@suse.com \
    --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;
as well as URLs for NNTP newsgroup(s).