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:   Thu, 27 Aug 2020 18:19:23 +0300
From:   Denis Efremov <efremov@...ux.com>
To:     Jan Kara <jack@...e.com>
Cc:     Denis Efremov <efremov@...ux.com>, linux-kernel@...r.kernel.org
Subject: [PATCH] udf: Use kvzalloc() in udf_sb_alloc_bitmap()

Use kvzalloc() in udf_sb_alloc_bitmap() instead of open-coding it.

Signed-off-by: Denis Efremov <efremov@...ux.com>
---

I'm not sure about TODO comment, through.

 fs/udf/super.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/udf/super.c b/fs/udf/super.c
index 1c42f544096d..c7cd15219b7c 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -1013,10 +1013,7 @@ static struct udf_bitmap *udf_sb_alloc_bitmap(struct super_block *sb, u32 index)
 	size = sizeof(struct udf_bitmap) +
 		(sizeof(struct buffer_head *) * nr_groups);
 
-	if (size <= PAGE_SIZE)
-		bitmap = kzalloc(size, GFP_KERNEL);
-	else
-		bitmap = vzalloc(size); /* TODO: get rid of vzalloc */
+	bitmap = kvzalloc(size, GFP_KERNEL);
 
 	if (!bitmap)
 		return NULL;
-- 
2.26.2

Powered by blists - more mailing lists