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: <20080702171550.GE17872@solarflare.com>
Date:	Wed, 2 Jul 2008 18:15:52 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Eli Cohen <eli@....mellanox.co.il>
Cc:	netdev <netdev@...r.kernel.org>, fubar@...ibm.com,
	ogerlitz@...taire.com, Roland Dreier <rdreier@...co.com>,
	general-list <general@...ts.openfabrics.org>
Subject: Re: locking requirements when calling dev_set_mtu()

Eli Cohen wrote:
> Hi,
> 
> I have the need to change the MTU of IP over IB from the driver code
> and not from the shell. Looking for the right way to do it I came
> across the dev_set_mtu() which seems appropriate as it handles all
> notifications too. However, it is not clear to me whether I have to
> wrap the call to dev_set_mtu() with any locks. Specifically, I was
> referred to a mail thread that suggests that I have to use
> rtnl_lock()/rtnl_unlock():
> http://marc.info/?l=linux-netdev&m=121201324611292&w=2
[...]

Essentially any function that changes net device configuration requires
the caller to hold the RTNL lock.  This probably ought to be consistently
documented through kernel-doc and/or ASSERT_RTNL() though.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
--
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