]> git.baikalelectronics.ru Git - kernel.git/commit
CacheFiles: Fix error handling in cachefiles_determine_cache_security()
authorDavid Howells <dhowells@redhat.com>
Wed, 12 May 2010 14:34:03 +0000 (15:34 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 13 May 2010 01:23:58 +0000 (18:23 -0700)
commit27bccceb6a4ed9c2b02d254eccb7e241c46ad555
tree0fe199f0364c5b54012691c9e4ff4a11767d1797
parent5f44014213f6db01fd69f3478df2c3576875712e
CacheFiles: Fix error handling in cachefiles_determine_cache_security()

cachefiles_determine_cache_security() is expected to return with a
security override in place.  However, if set_create_files_as() fails, we
fail to do this.  In this case, we should just reinstate the security
override that was set by the caller.

Furthermore, if set_create_files_as() fails, we should dispose of the
new credentials we were in the process of creating.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/cachefiles/security.c