+ proc-vmcore-use-kzalloc-in-get_new_element.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     proc: vmcore - use kzalloc in get_new_element
has been added to the -mm tree.  Its filename is
     proc-vmcore-use-kzalloc-in-get_new_element.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: proc: vmcore - use kzalloc in get_new_element
From: Cyrill Gorcunov <gorcunov@xxxxxxxxx>

Instead of kmalloc+memset better use straight kzalloc

Signed-off-by: Cyrill Gorcunov <gorcunov@xxxxxxxxxx>
Reviewed-by: WANG Cong <xiyou.wangcong@xxxxxxxxx>
Acked-by: Vivek Goyal <vgoyal@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/proc/vmcore.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff -puN fs/proc/vmcore.c~proc-vmcore-use-kzalloc-in-get_new_element fs/proc/vmcore.c
--- a/fs/proc/vmcore.c~proc-vmcore-use-kzalloc-in-get_new_element
+++ a/fs/proc/vmcore.c
@@ -166,12 +166,7 @@ static const struct file_operations proc
 
 static struct vmcore* __init get_new_element(void)
 {
-	struct vmcore *p;
-
-	p = kmalloc(sizeof(*p), GFP_KERNEL);
-	if (p)
-		memset(p, 0, sizeof(*p));
-	return p;
+	return kzalloc(sizeof(struct vmcore), GFP_KERNEL);
 }
 
 static u64 __init get_vmcore_size_elf64(char *elfptr)
_

Patches currently in -mm which might be from gorcunov@xxxxxxxxx are

origin.patch
proc-vmcore-use-kzalloc-in-get_new_element.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux