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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 09 May 2011 13:22:22 -0700
From:	john stultz <johnstul@...ibm.com>
To:	Jamie Iles <jamie@...ieiles.com>
Cc:	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	Jacob Pan <jacob.jun.pan@...ux.intel.com>
Subject: Re: [PATCHv3] x86, mrst: share APB timer code with other platforms

On Tue, 2011-04-12 at 12:10 +0100, Jamie Iles wrote:
> The APB timers are an IP block from Synopsys (DesignWare APB timers)
> and are also found in other systems including ARM SoC's.  This patch
> adds functions for creating clock_event_devices and clocksources from
> APB timers but does not do the resource allocation.  This is handled
> in a higher layer to allow the timers to be created from multiple
> methods such as platform_devices.
> 
> Changes since v2:
> 	- Make eoi() for clock_event_device optional for x86 where eoi
> 	is handled in firmware.
> Changes since v1:
> 	- Use the correct timer for clocksource on x86
> 	- Select the correct timer rating for x86
> 	- Restore freerunning timer behaviour for oneshot event devices
> 	- Reenable event irq correctly for hotplug

Sorry for being slow to review this.

Just a minor nit below.

> +struct dw_apb_clocksource *
> +dw_apb_clocksource_init(unsigned rating, char *name, void __iomem *base,
> +			unsigned long freq)
> +{
> +	struct dw_apb_clocksource *dw_cs = kzalloc(sizeof(*dw_cs), GFP_KERNEL);
> +
> +	if (!dw_cs)
> +		return NULL;
> +
> +	dw_cs->timer.base = base;
> +	dw_cs->timer.freq = freq;
> +	dw_cs->cs.name = name;
> +	dw_cs->cs.rating = rating;
> +	dw_cs->cs.read = __apbt_read_clocksource;
> +	dw_cs->cs.mask = CLOCKSOURCE_MASK(32);
> +	dw_cs->cs.flags = CLOCK_SOURCE_IS_CONTINUOUS;
> +	dw_cs->cs.resume = apbt_restart_clocksource;
> +
> +	return dw_cs;
> +}

So I don't see anything that frees the dw_apb_clocksource structure
after it has been allocated. Should this instead be allocated by the
caller and passed in to be initialized here?

thanks
-john


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