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] [day] [month] [year] [list]
Date:	Mon, 17 Sep 2012 06:54:53 -0700
From:	Ben Chan <benchan@...omium.org>
To:	Peter Senna Tschudin <peter.senna@...il.com>
Cc:	gregkh@...uxfoundation.org, devendra.aaru@...il.com,
	syahn@...semi.com, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] drivers/staging/gdm72xx/gdm_sdio.c: Replace
 kmalloc+memset for kzalloc

FYI, a similar patch has already been applied: "staging: gdm72xx:
simplify alloc_tx_struct and alloc_rx_struct (commit
129575f2a8958a1e90780b0d5b80702bb45b5aac)"

Thanks,
Ben

On Mon, Sep 17, 2012 at 6:45 AM, Peter Senna Tschudin
<peter.senna@...il.com> wrote:
> Replace kmalloc+memset for kzalloc and cleanup related code.
>
> To be applied after 47ad3428a1086af425447f763705e06b16ae905d:
> [PATCH 5/9] drivers/staging/gdm72xx/gdm_sdio.c: Remove useless kfree
>
> Signed-off-by: Peter Senna Tschudin <peter.senna@...il.com>
> ---
>  drivers/staging/gdm72xx/gdm_sdio.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/gdm72xx/gdm_sdio.c b/drivers/staging/gdm72xx/gdm_sdio.c
> index a0621d9..2e1a964 100644
> --- a/drivers/staging/gdm72xx/gdm_sdio.c
> +++ b/drivers/staging/gdm72xx/gdm_sdio.c
> @@ -91,14 +91,12 @@ static void free_tx_struct(struct sdio_tx *t)
>
>  static struct sdio_rx *alloc_rx_struct(struct rx_cxt *rx)
>  {
> -       struct sdio_rx *r = NULL;
> +       struct sdio_rx *r;
>
> -       r = kmalloc(sizeof(*r), GFP_ATOMIC);
> +       r = kzalloc(sizeof(*r), GFP_ATOMIC);
>         if (!r)
>                 return NULL;
>
> -       memset(r, 0, sizeof(*r));
> -
>         r->rx_cxt = rx;
>
>         return r;
> --
> 1.7.11.4
>
--
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