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]
Message-ID: <CAPDyKFppbyDHFMiYfaG_Eo9KLjg2tyA-ZV0d511a9ZV3u=OM9g@mail.gmail.com>
Date:	Thu, 19 Nov 2015 12:31:06 +0100
From:	Ulf Hansson <ulf.hansson@...aro.org>
To:	yalin wang <yalin.wang2010@...il.com>
Cc:	Adrian Hunter <adrian.hunter@...el.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Tobias Klauser <tklauser@...tanz.ch>,
	"JBottomley@...n.com" <JBottomley@...n.com>,
	Ben Hutchings <ben@...adent.org.uk>,
	"Dong, Chuanxiao" <chuanxiao.dong@...el.com>,
	Shawn Lin <shawn.lin@...k-chips.com>,
	Justin Wang (王丁) 
	<justin.wang@...eadtrum.com>,
	linux-mmc <linux-mmc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V2] mmc: change to use kmalloc

On 12 November 2015 at 12:27, yalin wang <yalin.wang2010@...il.com> wrote:
> Use kmalloc instead of kzalloc, zero the memory is not needed.
>
> Signed-off-by: yalin wang <yalin.wang2010@...il.com>

Thanks, applied for next! I took liberty to update the change log and
the commit message header to make it more descriptive.

Kind regards
Uffe


> ---
>  drivers/mmc/card/block.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
> index c742cfd..c3fd4c8 100644
> --- a/drivers/mmc/card/block.c
> +++ b/drivers/mmc/card/block.c
> @@ -345,7 +345,7 @@ static struct mmc_blk_ioc_data *mmc_blk_ioctl_copy_from_user(
>         struct mmc_blk_ioc_data *idata;
>         int err;
>
> -       idata = kzalloc(sizeof(*idata), GFP_KERNEL);
> +       idata = kmalloc(sizeof(*idata), GFP_KERNEL);
>         if (!idata) {
>                 err = -ENOMEM;
>                 goto out;
> @@ -365,7 +365,7 @@ static struct mmc_blk_ioc_data *mmc_blk_ioctl_copy_from_user(
>         if (!idata->buf_bytes)
>                 return idata;
>
> -       idata->buf = kzalloc(idata->buf_bytes, GFP_KERNEL);
> +       idata->buf = kmalloc(idata->buf_bytes, GFP_KERNEL);
>         if (!idata->buf) {
>                 err = -ENOMEM;
>                 goto idata_err;
> --
> 1.9.1
>
--
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