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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 20 Feb 2014 19:12:52 +0100
From:	Hannes Frederic Sowa <hannes@...essinduktion.org>
To:	David Howells <dhowells@...hat.com>
Cc:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: Getting a NIC's MTU size

On Thu, Feb 20, 2014 at 05:30:23PM +0000, David Howells wrote:
> David Miller <davem@...emloft.net> wrote:
> 
> > > One further question: If I want to get the MTU size of the NIC through
> > > which packets will go to get to a particular peer, can I do:
> > 
> > As has been suggested or at least hinted to by others, you have to use
> > the route dst's device pointer.
> 
> So I gather.  My query was intended to be about the safety of accessing the
> dst->dev pointer.  Can I just dereference it?  Or do I need to take a lock or
> use RCU?

No, you can just dereference it. dst holds a reference on ->dev, so it
is safe without lock or rcu as long as dst is alive and referenced.

Greetings,

  Hannes

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ