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: <20080525110812.3a05e9fa@core>
Date:	Sun, 25 May 2008 11:08:12 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Wim Van Sebroeck <wim@...ana.be>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Samuel Tardieu <sam@...1149.net>,
	Mike Frysinger <vapier.adi@...il.com>,
	Mingarelli@...omag.iguana.be, Thomas <Thomas.Mingarelli@...com>,
	Jordan Crouse <jordan.crouse@....com>,
	Chen Gong <g.chen@...escale.com>,
	Gabriel C <nix.or.die@...glemail.com>
Subject: Re: [WATCHDOG] v2.6.26-rc3 patches

> +
> +static void geodewdt_ping(void)
> +{
> +	/* Stop the counter */
> +	geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, 0);
> +
> +	/* Reset the counter */
> +	geode_mfgpt_write(wdt_timer, MFGPT_REG_COUNTER, 0);
> +
> +	/* Enable the counter */
> +	geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, MFGPT_SETUP_CNTEN);
> +}
> +
> +static void geodewdt_disable(void)
> +{
> +	geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, 0);
> +	geode_mfgpt_write(wdt_timer, MFGPT_REG_COUNTER, 0);
> +}
> +
> +static int geodewdt_set_heartbeat(int val)
> +{
> +	if (val < 1 || val > GEODEWDT_MAX_SECONDS)
> +		return -EINVAL;
> +
> +	geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, 0);
> +	geode_mfgpt_write(wdt_timer, MFGPT_REG_CMP2, val * GEODEWDT_HZ);
> +	geode_mfgpt_write(wdt_timer, MFGPT_REG_COUNTER, 0);
> +	geode_mfgpt_write(wdt_timer, MFGPT_REG_SETUP, MFGPT_SETUP_CNTEN);
> +
> +	timeout = val;
> +	return 0;
> +}
> +

There is no locking in geodewdt - so all those routines can end up being
run together. Not sure it is a problem just noting it while reviewing.

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