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: <20151209105457.GG8644@n2100.arm.linux.org.uk>
Date:	Wed, 9 Dec 2015 10:54:57 +0000
From:	Russell King - ARM Linux <linux@....linux.org.uk>
To:	Alexander Aring <alex.aring@...il.com>
Cc:	Kevin Hilman <khilman@...nel.org>,
	Mark Rutland <mark.rutland@....com>,
	devicetree@...r.kernel.org, Ulf Hansson <ulf.hansson@...aro.org>,
	Florian Fainelli <f.fainelli@...il.com>,
	Pawel Moll <pawel.moll@....com>,
	Stephen Warren <swarren@...dotorg.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-pm@...r.kernel.org, "Rafael J. Wysocki" <rjw@...ysocki.net>,
	linux-kernel@...r.kernel.org, Jon Hunter <jonathanh@...dia.com>,
	Eric Anholt <eric@...olt.net>,
	Rob Herring <robh+dt@...nel.org>, Lee Jones <lee@...nel.org>,
	Pavel Machek <pavel@....cz>, Len Brown <len.brown@...el.com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	linux-arm-kernel@...ts.infradead.org,
	linux-rpi-kernel@...ts.infradead.org
Subject: Re: [PATCH v2 1/5] power: domain: add pm_genpd_exit

On Wed, Dec 09, 2015 at 11:47:58AM +0100, Alexander Aring wrote:
> Example: the error case is while probing, how we react on a -EBUSY there
> "in an error case" -> simple ignore it? But then nobody see that the use
> of this function is wrong.

The proper way to deal with functionality that can only be registered
but never removed is to report the error, but never fail during probing,
and never allow removal (empty removal function.)

If you return a failure code during probe, you end up in an inconsistent
situation where you have facilities registered, but resources that those
facilities require will be undone when probe() returns a failure, and
that can potentially lead to kernel oops or scribbling over someone
elses device or memory.

-- 
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ