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: <20061005081705.GA6920@osiris.boeblingen.de.ibm.com>
Date:	Thu, 5 Oct 2006 10:17:05 +0200
From:	Heiko Carstens <heiko.carstens@...ibm.com>
To:	Cornelia Huck <cornelia.huck@...ibm.com>
Cc:	Jeff Garzik <jeff@...zik.org>, Greg KH <greg@...ah.com>,
	Andrew Morton <akpm@...l.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Ashok Raj <ashok.raj@...el.com>,
	Nathan Lynch <nathanl@...tin.ibm.com>
Subject: Re: [PATCH] drivers/base: error handling fixes

On Wed, Oct 04, 2006 at 05:24:34PM +0200, Cornelia Huck wrote:
> On Wed, 4 Oct 2006 09:05:54 -0400,
> Jeff Garzik <jeff@...zik.org> wrote:
> 
> >  static int __cpuinit topology_cpu_callback(struct notifier_block *nfb,
> > @@ -112,17 +110,18 @@ static int __cpuinit topology_cpu_callba
> >  {
> >  	unsigned int cpu = (unsigned long)hcpu;
> >  	struct sys_device *sys_dev;
> > +	int rc = 0;
> >  
> >  	sys_dev = get_cpu_sysdev(cpu);
> >  	switch (action) {
> >  	case CPU_ONLINE:
> > -		topology_add_dev(sys_dev);
> > +		rc = topology_add_dev(sys_dev);
> >  		break;
> >  	case CPU_DEAD:
> >  		topology_remove_dev(sys_dev);
> >  		break;
> >  	}
> > -	return NOTIFY_OK;
> > +	return rc ? NOTIFY_BAD : NOTIFY_OK;
> >  }
> 
> Wouldn't that also require that _cpu_up checked the return code when
> doing CPU_ONLINE notification (and clean up on error)?

After all code that gets a CPU_ONLINE notification is not supposed to fail.
For allocating resources while bringing up a cpu CPU_UP_PREPARE is supposed
to be used. That one is allowed to fail.
-
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