linux/fs/orangefs
Dan Carpenter eb82fbcf82 orangefs: silence harmless integer overflow warning
The issue here is that in orangefs_bufmap_alloc() we do:

	bufmap->buffer_index_array =
		kzalloc(DIV_ROUND_UP(bufmap->desc_count, BITS_PER_LONG), GFP_KERNEL);

If we choose a bufmap->desc_count like -31 then it means the
DIV_ROUND_UP ends up having an integer overflow.   The result is that
kzalloc() returns the ZERO_SIZE_PTR and there is a static checker
warning.

But this bug is harmless because on the next lines we use ->desc_count
to do a kcalloc().  That has integer overflow checking built in so the
kcalloc() fails and we return an error code.

Anyway, it doesn't make sense to talk about negative sizes and blocking
them silences the static checker warning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
2017-02-03 14:37:15 -05:00
..
acl.c posix_acl: Clear SGID bit when setting file permissions 2016-09-22 10:55:32 +02:00
dcache.c orangefs: don't use d_time 2016-10-24 14:50:07 -04:00
devorangefs-req.c Merge branch 'misc' into for-next 2016-09-28 14:50:46 -04:00
dir.c orangefs: use %pd/%pD 2016-08-07 23:38:47 -04:00
downcall.h orangefs: add features op 2016-08-12 15:12:54 -04:00
file.c orangefs: user file_inode() where it is due 2016-10-24 14:29:39 -04:00
inode.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2016-10-10 20:16:43 -07:00
Kconfig Orangefs: kernel client part 7 2015-10-03 11:40:00 -04:00
Makefile Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
namei.c orangefs: don't use d_time 2016-10-24 14:50:07 -04:00
orangefs-bufmap.c orangefs: silence harmless integer overflow warning 2017-02-03 14:37:15 -05:00
orangefs-bufmap.h orangefs-bufmap.h: trim unused junk 2016-03-25 22:30:54 -04:00
orangefs-cache.c orangefs: add features op 2016-08-12 15:12:54 -04:00
orangefs-debug.h Orangef: remove overlooked old-style userspace debug parts 2015-12-11 11:00:12 -05:00
orangefs-debugfs.c orangefs: fix memory leak of string 'new' on exit path 2016-12-12 11:43:25 -05:00
orangefs-debugfs.h orangefs: clean up debugfs globals 2016-08-15 11:38:36 -04:00
orangefs-dev-proto.h orangefs: add features op 2016-08-12 15:12:54 -04:00
orangefs-kernel.h orangefs: don't use d_time 2016-10-24 14:50:07 -04:00
orangefs-mod.c orangefs: clean up debugfs 2016-11-07 10:41:55 -05:00
orangefs-sysfs.c orangefs: Axe some dead code 2016-12-12 12:49:20 -05:00
orangefs-sysfs.h Orangefs: change pvfs2 filenames to orangefs 2015-12-04 12:56:14 -05:00
orangefs-utils.c orangefs: rename most remaining global variables 2016-08-16 11:41:24 -04:00
protocol.h orangefs: clean up debugfs globals 2016-08-15 11:38:36 -04:00
super.c Revert "orangefs: bump minimum userspace version" 2016-10-03 15:07:36 -04:00
symlink.c vfs: Remove {get,set,remove}xattr inode operations 2016-10-07 21:48:36 -04:00
upcall.h orangefs: add features op 2016-08-12 15:12:54 -04:00
waitqueue.c orangefs: rename most remaining global variables 2016-08-16 11:41:24 -04:00
xattr.c xattr: Stop calling {get,set,remove}xattr inode operations 2016-10-07 20:10:44 -04:00