Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ext4: free orphan info with kvfree

Orphan info is now getting allocated with kvmalloc_array(). Free it with
kvfree() instead of kfree() to avoid complaints from mm.

Reported-by: Chris Mason <clm@meta.com>
Fixes: 0a6ce20c1564 ("ext4: verify orphan file size is not too big")
Cc: stable@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
Message-ID: <20251007134936.7291-2-jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>

authored by

Jan Kara and committed by
Theodore Ts'o
971843c5 1d3ad183

+2 -2
+2 -2
fs/ext4/orphan.c
··· 513 513 return; 514 514 for (i = 0; i < oi->of_blocks; i++) 515 515 brelse(oi->of_binfo[i].ob_bh); 516 - kfree(oi->of_binfo); 516 + kvfree(oi->of_binfo); 517 517 } 518 518 519 519 static struct ext4_orphan_block_tail *ext4_orphan_block_tail( ··· 637 637 out_free: 638 638 for (i--; i >= 0; i--) 639 639 brelse(oi->of_binfo[i].ob_bh); 640 - kfree(oi->of_binfo); 640 + kvfree(oi->of_binfo); 641 641 out_put: 642 642 iput(inode); 643 643 return ret;