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]
Date:	Tue, 29 May 2012 00:32:08 -0700
From:	Stephen Boyd <sboyd@...eaurora.org>
To:	Anton Vorontsov <anton.vorontsov@...aro.org>
CC:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Kees Cook <keescook@...omium.org>,
	Colin Cross <ccross@...roid.com>,
	Tony Luck <tony.luck@...el.com>, Arnd Bergmann <arnd@...db.de>,
	John Stultz <john.stultz@...aro.org>,
	Shuah Khan <shuahkhan@...il.com>, arve@...roid.com,
	Rebecca Schultz Zavin <rebecca@...roid.com>,
	Jesper Juhl <jj@...osbits.net>,
	Randy Dunlap <rdunlap@...otime.net>,
	Thomas Meyer <thomas@...3r.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Marco Stornelli <marco.stornelli@...il.com>,
	WANG Cong <xiyou.wangcong@...il.com>,
	linux-kernel@...r.kernel.org, devel@...verdev.osuosl.org,
	linaro-kernel@...ts.linaro.org, patches@...aro.org,
	kernel-team@...roid.com
Subject: Re: [PATCH 03/11] pstore/ram: Factor dmesg przs initialization out
 of probe()

On 5/26/2012 6:20 AM, Anton Vorontsov wrote:
> +static int ramoops_init_przs(struct device *dev, struct ramoops_context *cxt,
> +			      phys_addr_t *paddr, size_t dump_mem_sz)
> +{
> +	int err = -ENOMEM;
> +	int i;
> +
> +	if (!cxt->record_size)
> +		return 0;
> +
> +	cxt->max_dump_cnt = dump_mem_sz / cxt->record_size;
> +	if (!cxt->max_dump_cnt)
> +		return -ENOMEM;
> +
> +	cxt->przs = kzalloc(sizeof(*cxt->przs) * cxt->max_dump_cnt,
> +			     GFP_KERNEL);

kcalloc would be better but I see you're just moving code here so it
doesn't need to be changed in this patch.

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

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