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]
Date:	Mon, 02 Dec 2013 13:33:48 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	bhutchings@...arflare.com
Cc:	carolyn.wyborny@...el.com, jeffrey.t.kirsher@...el.com,
	netdev@...r.kernel.org, gospo@...hat.com, sassmann@...hat.com
Subject: Re: [net 1/8] igb: Update queue reinit function to call dev_close
 when init of queues fails

From: Ben Hutchings <bhutchings@...arflare.com>
Date: Mon, 2 Dec 2013 17:18:16 +0000

> David is saying that you should implement the reconfiguration in such a
> way that you can always roll back to the previous working state in case
> of a failure (which would make my concerns moot).  This is definitely a
> good goal but I'm not convinced that it's always possible.

In this case it is always possible.

The only failure possible in these code paths is for a memory
allocation failure.  Therefore, without a doubt, trying to allocate
the memory first before making any changes will provably allow perfect
rollback to a working state.  In fact, no state will be changed at all
if the allocation fails.

That's the whole point of my suggestion.  Do the one thing that
can fail, the memory allocation, before adjusting anything else.
--
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