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]
Message-ID: <20140529193319.GB13007@t520.home>
Date:	Thu, 29 May 2014 16:33:19 -0300
From:	Flavio Leitner <fbl@...hat.com>
To:	Jiri Pirko <jiri@...nulli.us>
Cc:	netdev@...r.kernel.org, davem@...emloft.net
Subject: Re: [patch net] team: fix mtu setting

On Thu, May 29, 2014 at 08:46:17PM +0200, Jiri Pirko wrote:
> Now it is not possible to set mtu to team device which has a port
> enslaved to it. The reason is that when team_change_mtu() calls
> dev_set_mtu() for port device, notificator for NETDEV_PRECHANGEMTU
> event is called and team_device_event() returns NOTIFY_BAD forbidding
> the change. So fix this by returning NOTIFY_DONE here in case team is
> changing mtu in team_change_mtu().
> 
> Introduced-by: 3d249d4c "net: introduce ethernet teaming device"
> Signed-off-by: Jiri Pirko <jiri@...nulli.us>
> ---

Alright, so changing the team's mtu is now allowed but changing
port's mtu isn't allowed.
LGTM.

Since there are some common code between the unwide and the
successful code paths, I'd suggest to simply use:
...
	list_for_each_entry() {
		err = 
		if (err)
			break
	}

	if (err) {
		unwind
	}
	else
		dev->mtu = new_mtu;

	<common code>

But I suspect that due to the long function name, any
additional indentation there will cause the code to look
less readable.

Acked-by: Flavio Leitner <fbl@...hat.com>

--
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