android_kernel_motorola_sm6225/fs/cachefiles
Josh Boyer 607566aecc CacheFiles: Fix memory leak in cachefiles_check_auxdata error paths
In cachefiles_check_auxdata(), we allocate auxbuf but fail to free it if
we determine there's an error or that the data is stale.

Further, assigning the output of vfs_getxattr() to auxbuf->len gives
problems with checking for errors as auxbuf->len is a u16.  We don't
actually need to set auxbuf->len, so keep the length in a variable for
now.  We shouldn't need to check the upper limit of the buffer as an
overflow there should be indicated by -ERANGE.

While we're at it, fscache_check_aux() returns an enum value, not an
int, so assign it to an appropriately typed variable rather than to ret.

Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Hongyi Jia <jiayisuse@gmail.com>
cc: Milosz Tanski <milosz@adfin.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-09-20 15:15:42 -07:00
..
bind.c kill useless checks for sb->s_op == NULL 2011-07-20 01:44:21 -04:00
daemon.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
interface.c CacheFiles: Implement interface to check cache consistency 2013-09-06 09:17:30 +01:00
internal.h CacheFiles: Implement interface to check cache consistency 2013-09-06 09:17:30 +01:00
Kconfig CacheFiles: A cache that backs onto a mounted filesystem 2009-04-03 16:42:41 +01:00
key.c CacheFiles: Downgrade the requirements passed to the allocator 2012-12-20 21:58:25 +00:00
main.c CacheFiles: A cache that backs onto a mounted filesystem 2009-04-03 16:42:41 +01:00
Makefile CacheFiles: A cache that backs onto a mounted filesystem 2009-04-03 16:42:41 +01:00
namei.c FS-Cache: Fix object state machine to have separate work and wait states 2013-06-19 14:16:47 +01:00
proc.c CacheFiles: A cache that backs onto a mounted filesystem 2009-04-03 16:42:41 +01:00
rdwr.c mm: remove lru parameter from __pagevec_lru_add and remove parts of pagevec API 2013-07-03 16:07:31 -07:00
security.c CacheFiles: Fix error handling in cachefiles_determine_cache_security() 2010-05-12 18:23:58 -07:00
xattr.c CacheFiles: Fix memory leak in cachefiles_check_auxdata error paths 2013-09-20 15:15:42 -07:00