kernel_optimize_test/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
daemon.c
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
key.c CacheFiles: Downgrade the requirements passed to the allocator 2012-12-20 21:58:25 +00:00
main.c
Makefile
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
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
xattr.c CacheFiles: Fix memory leak in cachefiles_check_auxdata error paths 2013-09-20 15:15:42 -07:00