mirror of https://github.com/torvalds/linux.git
'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:
|
||
|---|---|---|
| .. | ||
| Kconfig | ||
| Makefile | ||
| acl.c | ||
| dcache.c | ||
| devorangefs-req.c | ||
| dir.c | ||
| downcall.h | ||
| file.c | ||
| inode.c | ||
| namei.c | ||
| orangefs-bufmap.c | ||
| 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-sysfs.h | ||
| orangefs-utils.c | ||
| protocol.h | ||
| super.c | ||
| symlink.c | ||
| upcall.h | ||
| waitqueue.c | ||
| xattr.c | ||