kernel_optimize_test/fs/orangefs
Christophe JAILLET 5d88e24b23 orangefs: Fix the size of a memory allocation in orangefs_bufmap_alloc()
commit 40a74870b2d1d3d44e13b3b73c6571dd34f5614d upstream.

'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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-20 09:17:50 +01:00
..
acl.c orangefs: posix acl fix... 2020-07-28 12:52:53 -04:00
dcache.c fs: orangefs: fix error return code of orangefs_revalidate_lookup() 2021-11-18 14:04:23 +01:00
devorangefs-req.c
dir.c
downcall.h
file.c orangefs: don't mess with I_DIRTY_TIMES in orangefs_flush 2020-04-08 09:39:11 -04:00
inode.c orangefs: use attach/detach_page_private 2020-06-02 10:59:08 -07:00
Kconfig
Makefile
namei.c
orangefs-bufmap.c orangefs: Fix the size of a memory allocation in orangefs_bufmap_alloc() 2022-01-20 09:17:50 +01: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: remove unnecessary assignment to variable ret 2020-08-04 15:01:58 -04:00
orangefs-sysfs.c
orangefs-sysfs.h
orangefs-utils.c
protocol.h
super.c orangefs: fix orangefs df output. 2021-07-20 16:05:48 +02:00
symlink.c
upcall.h
waitqueue.c
xattr.c