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>] [day] [month] [year] [list]
Message-ID: <466348F7.9030904@banksresearch.com>
Date:	Sun, 03 Jun 2007 19:04:23 -0400
From:	Wyatt Banks <wyatt@...ksresearch.com>
To:	zippel@...ux-m68k.org, linux-kernel@...r.kernel.org
Subject: [PATCH] HFSPlus: change kmalloc/memset to kzalloc

From:	Wyatt Banks <wyatt@...ksresearch.com>

Removed kmalloc and memset in favor of kzalloc.

Signed-off-by:	Wyatt Banks <wyatt@...ksresearch.com>

---

Patched against 2.6.21.3

To explain the HFSPLUS_SB() macro in the removed memset call:

hfsplus_fs.h:#define HFSPLUS_SB(super)  (*(struct hfsplus_sb_info *)(super)->s_fs_info)


--- linux-2.6.21.3/fs/hfsplus/super.c	2007-05-24 17:22:47.000000000 -0400
+++ linux-2.6.21.3-devel/fs/hfsplus/super.c	2007-06-02 12:29:33.000000000 -0400
@@ -283,11 +283,10 @@ static int hfsplus_fill_super(struct sup
	struct nls_table *nls = NULL;
	int err = -EINVAL;

-	sbi = kmalloc(sizeof(struct hfsplus_sb_info), GFP_KERNEL);
+	sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
	if (!sbi)
		return -ENOMEM;

-	memset(sbi, 0, sizeof(HFSPLUS_SB(sb)));
	sb->s_fs_info = sbi;
	INIT_HLIST_HEAD(&sbi->rsrc_inodes);
	hfsplus_fill_defaults(sbi);
-
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