linux/fs/orangefs
Christophe JAILLET 40a74870b2 orangefs: Fix the size of a memory allocation in orangefs_bufmap_alloc()
'buffer_index_array' really looks like a bitmap. So it should be allocated
as such.
When kzalloc is called, a number of bytes is expected, but a number of
longs is passed instead.

In get(), if not enough memory is allocated, un-allocated memory may be
read or written.

So use bitmap_zalloc() to safely allocate the correct memory size and
avoid un-expected behavior.

While at it, change the corresponding kfree() into bitmap_free() to keep
the semantic.

Fixes: ea2c9c9f65 ("orangefs: bufmap rewrite")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2021-12-31 14:37:43 -05:00
..
acl.c
dcache.c fs: orangefs: fix error return code of orangefs_revalidate_lookup() 2021-10-11 14:25:34 -04:00
devorangefs-req.c
dir.c
downcall.h
file.c
inode.c mm: don't include <linux/blkdev.h> in <linux/backing-dev.h> 2021-10-18 06:17:01 -06:00
Kconfig
Makefile
namei.c
orangefs-bufmap.c orangefs: Fix the size of a memory allocation in orangefs_bufmap_alloc() 2021-12-31 14:37:43 -05:00
orangefs-bufmap.h
orangefs-cache.c
orangefs-debug.h
orangefs-debugfs.c
orangefs-debugfs.h
orangefs-dev-proto.h
orangefs-kernel.h
orangefs-mod.c
orangefs-sysfs.c orangefs: use default_groups in kobj_type 2021-12-31 14:37:43 -05:00
orangefs-sysfs.h
orangefs-utils.c
protocol.h
super.c orangefs: three fixes from other folks... 2021-11-09 10:34:06 -08:00
symlink.c
upcall.h
waitqueue.c
xattr.c