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-next>] [day] [month] [year] [list]
Date:   Wed, 12 Feb 2020 17:54:21 +0800
From:   Yi Wang <wang.yi59@....com.cn>
To:     mingo@...hat.com
Cc:     peterz@...radead.org, juri.lelli@...hat.com,
        vincent.guittot@...aro.org, dietmar.eggemann@....com,
        rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
        linux-kernel@...r.kernel.org, xue.zhihong@....com.cn,
        wang.yi59@....com.cn, wang.liang82@....com.cn,
        Huang Zijiang <huang.zijiang@....com.cn>
Subject: [PATCH] sched: Use kmem_cache_zalloc() instead of kmem_cache_alloc() with flag GFP_ZERO.

From: Huang Zijiang <huang.zijiang@....com.cn>

 Use kmem_cache_zalloc instead of manually setting kmem_cache_alloc
 with flag GFP_ZERO since kzalloc sets allocated memory
 to zero.

 Change in v2:
      add indation

Signed-off-by: Huang Zijiang <huang.zijiang@....com.cn>
Signed-off-by: Yi Wang <wang.yi59@....com.cn>
---
 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 90e4b00..20ea28f 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6949,7 +6949,7 @@ struct task_group *sched_create_group(struct task_group *parent)
 {
 	struct task_group *tg;
 
-	tg = kmem_cache_alloc(task_group_cache, GFP_KERNEL | __GFP_ZERO);
+	tg = kmem_cache_zalloc(task_group_cache, GFP_KERNEL);
 	if (!tg)
 		return ERR_PTR(-ENOMEM);
 
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ