mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2026-01-27 12:47:24 +01:00
ext4: free orphan info with kvfree
commit971843c511upstream. 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:0a6ce20c15("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
45d88df89e
commit
c6d254748b
|
|
@ -513,7 +513,7 @@ void ext4_release_orphan_info(struct super_block *sb)
|
|||
return;
|
||||
for (i = 0; i < oi->of_blocks; i++)
|
||||
brelse(oi->of_binfo[i].ob_bh);
|
||||
kfree(oi->of_binfo);
|
||||
kvfree(oi->of_binfo);
|
||||
}
|
||||
|
||||
static struct ext4_orphan_block_tail *ext4_orphan_block_tail(
|
||||
|
|
@ -637,7 +637,7 @@ int ext4_init_orphan_info(struct super_block *sb)
|
|||
out_free:
|
||||
for (i--; i >= 0; i--)
|
||||
brelse(oi->of_binfo[i].ob_bh);
|
||||
kfree(oi->of_binfo);
|
||||
kvfree(oi->of_binfo);
|
||||
out_put:
|
||||
iput(inode);
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user