lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20240126111744.7f2dd7a3@kernel.org>
Date: Fri, 26 Jan 2024 11:17:44 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: David Wei <dw@...idwei.uk>
Cc: Jiri Pirko <jiri@...nulli.us>, Sabrina Dubroca <sd@...asysnail.net>,
 netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>, Eric
 Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next v6 1/4] netdevsim: allow two netdevsim ports to
 be connected

On Fri, 26 Jan 2024 10:54:35 -0800 David Wei wrote:
> > since you're under rtnl_lock you can use __get_device_by_index(),
> > it doesn't increase the refcount so you won't have to worry about
> > releasing it.  
> 
> Ah, I will change this. Is this true in general i.e. if I hold some big
> lock then I can use versions of functions that do not modify refcounts?

I don't think so, generally you can ignore refcounts if you're holding
the lock protecting the table in which the object is registered while
it is alive, and you just looked it up in that table... if that makes
sense.

netdev lifetime is a bit unusual in how much the rtnl_lock protects.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ