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 vfs: add rcu argument to ->get_acl() callback 2021-08-18 22:08:24 +02:00
dcache.c fs: orangefs: fix error return code of orangefs_revalidate_lookup() 2021-10-11 14:25:34 -04:00
devorangefs-req.c Merge branch 'work.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-06-16 16:21:50 +09:00
dir.c orangefs: stop setting atime on inode dirty 2017-11-13 15:10:11 -05:00
downcall.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
file.c Orangef: implement orangefs_readahead. 2021-04-28 07:33:04 -04:00
inode.c mm: don't include <linux/blkdev.h> in <linux/backing-dev.h> 2021-10-18 06:17:01 -06:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
namei.c fs: make helpers idmap mount aware 2021-01-24 14:27:20 +01:00
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: copy Orangefs-sized blocks into the pagecache if possible. 2019-05-03 14:32:39 -04:00
orangefs-cache.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
orangefs-debug.h orangefs: remove unused code 2018-04-03 21:55:28 -04:00
orangefs-debugfs.c help_next should increase position index 2020-02-04 15:22:04 -05:00
orangefs-debugfs.h orangefs: fix build warning from debugfs cleanup patch 2019-07-04 10:30:33 +02:00
orangefs-dev-proto.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
orangefs-kernel.h vfs: add rcu argument to ->get_acl() callback 2021-08-18 22:08:24 +02:00
orangefs-mod.c orangefs: leave files in the page cache for a few micro seconds at least 2021-04-29 08:06:05 -04:00
orangefs-sysfs.c orangefs: use default_groups in kobj_type 2021-12-31 14:37:43 -05:00
orangefs-sysfs.h Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
orangefs-utils.c orangefs_inode_is_stale(): i_mode type bits do *not* form a bitmap... 2021-03-12 22:15:17 -05:00
protocol.h orangefs: specify user pointers when using dev_map_desc and bufmap 2018-06-01 14:51:36 -04:00
super.c orangefs: three fixes from other folks... 2021-11-09 10:34:06 -08:00
symlink.c orangefs: stop setting atime on inode dirty 2017-11-13 15:10:11 -05:00
upcall.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
waitqueue.c orangefs: service ops done for writeback are not killable 2019-05-03 14:32:38 -04:00
xattr.c acl: handle idmapped mounts 2021-01-24 14:27:17 +01:00