linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] f2fs: use kfree() to free super in read_raw_super_block()
@ 2020-06-05 18:15 Denis Efremov
  2020-06-05 18:15 ` [PATCH 2/2] f2fs: use kfree() to free sbi in f2fs_fill_super() Denis Efremov
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Denis Efremov @ 2020-06-05 18:15 UTC (permalink / raw)
  To: Jaegeuk Kim, Chao Yu; +Cc: Denis Efremov, linux-f2fs-devel, linux-kernel

Use kfree() instead of kvfree() to free super in
read_raw_super_block() because the memory is allocated with
kzalloc() in the function.

Fixes: 5222595d093e ("f2fs: use kvmalloc, if kmalloc is failed")
Signed-off-by: Denis Efremov <efremov@linux.com>
---
 fs/f2fs/super.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 8a9955902d84..9a3c8eba37e2 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -3130,7 +3130,7 @@ static int read_raw_super_block(struct f2fs_sb_info *sbi,
 
 	/* No valid superblock */
 	if (!*raw_super)
-		kvfree(super);
+		kfree(super);
 	else
 		err = 0;
 
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-06-18  3:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-05 18:15 [PATCH 1/2] f2fs: use kfree() to free super in read_raw_super_block() Denis Efremov
2020-06-05 18:15 ` [PATCH 2/2] f2fs: use kfree() to free sbi in f2fs_fill_super() Denis Efremov
2020-06-08  2:51   ` [f2fs-dev] " Chao Yu
2020-06-08  2:47 ` [f2fs-dev] [PATCH 1/2] f2fs: use kfree() to free super in read_raw_super_block() Chao Yu
2020-06-08 15:41 ` [PATCH v2] f2fs: use kfree() instead of kvfree() to free superblock data Denis Efremov
2020-06-09  1:22   ` Chao Yu
2020-06-09 22:14 ` [PATCH v3] " Denis Efremov
2020-06-09 22:25   ` Eric Biggers
2020-06-15 17:58     ` Jaegeuk Kim
2020-06-18  3:28       ` Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).