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, 11 Mar 2013 17:44:49 +0000
From:	Ed Cashin <ecashin@...aid.com>
To:	Mihnea Dobrescu-Balaur <mihneadb@...il.com>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"Andrew Morton" <akpm@...ux-foundation.org>
Subject: Re: [PATCH] aoe: replace kmalloc and then memcpy with kmemdup

Looks OK, thanks.

On Mar 11, 2013, at 7:16 AM, Mihnea Dobrescu-Balaur wrote:

> Signed-off-by: Mihnea Dobrescu-Balaur <mihneadb@...il.com>
> ---
> drivers/block/aoe/aoechr.c |    3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/block/aoe/aoechr.c b/drivers/block/aoe/aoechr.c
> index 42e67ad..ab41be6 100644
> --- a/drivers/block/aoe/aoechr.c
> +++ b/drivers/block/aoe/aoechr.c
> @@ -139,13 +139,12 @@ bail:		spin_unlock_irqrestore(&emsgs_lock, flags);
> 		return;
> 	}
> 
> -	mp = kmalloc(n, GFP_ATOMIC);
> +	mp = kmemdup(msg, n, GFP_ATOMIC);
> 	if (mp == NULL) {
> 		printk(KERN_ERR "aoe: allocation failure, len=%ld\n", n);
> 		goto bail;
> 	}
> 
> -	memcpy(mp, msg, n);
> 	em->msg = mp;
> 	em->flags |= EMFL_VALID;
> 	em->len = n;
> -- 
> 1.7.10.4
> 

-- 
  Ed Cashin
  ecashin@...aid.com


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