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]
Message-Id: <1464213858-4032-1-git-send-email-salah.triki@acm.org>
Date:	Wed, 25 May 2016 23:04:18 +0100
From:	Salah Triki <salah.triki@....org>
To:	richard@....at, dedekind1@...il.com, adrian.hunter@...el.com
Cc:	Salah Triki <salah.triki@....org>, linux-mtd@...ts.infradead.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] fs: ubifs: Replace kmem_cache_alloc/memset with kmem_cache_zalloc

Use kmem_cache_zalloc instead of kmem_cache_alloc/memset.

Signed-off-by: Salah Triki <salah.triki@....org>
---
 fs/ubifs/super.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 7034995..f509200 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -262,12 +262,10 @@ static struct inode *ubifs_alloc_inode(struct super_block *sb)
 {
 	struct ubifs_inode *ui;
 
-	ui = kmem_cache_alloc(ubifs_inode_slab, GFP_NOFS);
+	ui = kmem_cache_zalloc(ubifs_inode_slab, GFP_NOFS);
 	if (!ui)
 		return NULL;
 
-	memset((void *)ui + sizeof(struct inode), 0,
-	       sizeof(struct ubifs_inode) - sizeof(struct inode));
 	mutex_init(&ui->ui_mutex);
 	spin_lock_init(&ui->ui_lock);
 	return &ui->vfs_inode;
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ