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:	Wed, 05 Nov 2008 11:27:17 +0200
From:	Lior Dotan <liodot@...il.com>
To:	Jiri Slaby <jirislaby@...il.com>, gregkh@...e.de
CC:	linux-kernel@...r.kernel.org, charrer@...critech.com
Subject: Re: [STAGING] slicoss - use kzalloc

-------- Original Message --------
Subject: Re: [STAGING] slicoss - use kzalloc
From: Jiri Slaby <jirislaby@...il.com>
To: Lior Dotan <liodot@...il.com>
CC: gregkh@...e.de, linux-kernel@...r.kernel.org, charrer@...critech.com
Date: 11/05/2008 12:01 AM

> On 11/04/2008 05:27 PM, Lior Dotan wrote:
>> This patch uses kzalloc() where applicable.
>>
>> Signed-off-by: Lior Dotan <liodot@...il.com>
> 
> /drivers/staging/slicoss/slicoss.c
> =======================================
> --- b/drivers/staging/slicoss/slicoss.c	2008-11-04 11:53:12.878116772 +0200
> +++ a/drivers/staging/slicoss/slicoss.c	2008-11-04 12:08:40.800644774 +0200
> @@ -2673,8 +2673,8 @@
> static·int·slic_card_init(struct·sliccar
> #if·SLIC_DUMP_ENABLED
> » if·(!card->dumpbuffer)·{
> -» » card->dumpbuffer·=·kmalloc(DUMP_PAGE_SIZE,·GFP_ATOMIC);
> +» » card->dumpbuffer·=·kzalloc(DUMP_PAGE_SIZE,·GFP_ATOMIC);
> » » ASSERT(card->dumpbuffer);
> » » if·(card->dumpbuffer·==·NULL)
> @@ -2683,8 +2683,7 @@
> static·int·slic_card_init(struct·sliccar
> » ·*··Smear·the·shared·memory·structure·and·then·obtain
> » ·*··the·PHYSICAL·address·of·this·structure
> » ·*/
> -» memset(card->dumpbuffer,·0,·DUMP_PAGE_SIZE);
> 
> 
> It's wrong, the function in called multiple times, the memset was called every
> time, now it would be called only for the first time.


You are right, thanks. Here's a fixed version.


This patch uses kzalloc() where really applicable.

Signed-off-by: Lior Dotan <liodot@...il.com>

View attachment "slicoss-kzalloc.patch" of type "text/plain" (571 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ