ntfs-add-sanity-check-on-allocation-size.patch removed from -mm tree
The patch titled
Subject: ntfs: add sanity check on allocation size
has been removed from the -mm tree. Its filename was
ntfs-add-sanity-check-on-allocation-size.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Dongliang Mu <[email protected]>
Subject: ntfs: add sanity check on allocation size
ntfs_read_inode_mount invokes ntfs_malloc_nofs with zero allocation size. It triggers one BUG in the __ntfs_malloc function.
Fix this by adding sanity check on ni->attr_list_size.
Reported-by [email protected]
Signed-off-by Dongliang Mu <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
fs/ntfs/inode.c | 4 ++++ 1 file changed, 4 insertions(+)
fs/ntfs/inode.c renamed from fs/ntfs/inode.c~ntfs-add-sanity-check-on-allocation-size +4 -0
@@ -1881,6 +1881,10 @@ int ntfs_read_inode_mount(struct inode * }/* Now allocate memory for the attribute list. */ ni->attr_list_size = (u32 )ntfs_attr_size (a); +if (!ni->attr_list_size) { +ntfs_error (sb,"Attr_list_size is zero" ); + goto put_err_out; + } ni->attr_list =ntfs_malloc_nofs (ni->attr_list_size);if (!ni->attr_list) { ntfs_error(sb, "Not enough memory to allocate buffer "
_
Patches currently in -mm which might be from [email protected] are