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:	Tue, 24 Mar 2015 13:11:05 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	xiyou.wangcong@...il.com
Cc:	netdev@...r.kernel.org, stephen@...workplumber.org
Subject: Re: [Patch net-next] net: allow to delete a whole device group

From: Cong Wang <xiyou.wangcong@...il.com>
Date: Mon, 23 Mar 2015 17:04:15 -0700

> +	for_each_netdev_safe(net, dev, aux) {
> +		if (dev->group == group) {
> +			const struct rtnl_link_ops *ops;
> +
> +			found = true;
> +			ops = dev->rtnl_link_ops;
> +			if (!ops || !ops->dellink)
> +				return -EOPNOTSUPP;
> +			ops->dellink(dev, &list_kill);
> +		}

These semantics are terrible.

A netlink request should always strive (no, I'll say it _must_) either
fully perform the requested operation for all relevant objects, or
have no side effects and return an error.

If need be you must completely unwind all partial changes before
returning that error, or alternatively defer commiting the
changes until you can guarantee that all of them can be performed.
--
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