diff options
author | Daniel Rosenberg <drosen@google.com> | 2017-06-07 12:44:50 -0700 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2017-07-17 10:27:40 +0530 |
commit | 8e62d8685af18f75cd7de823b40da6eefac23a4a (patch) | |
tree | ba8f648064b394a87e401ef16073485eeb1ec6d8 | |
parent | 941059106383628c433881106b9824d5bbf965fe (diff) | |
download | linaro-android-8e62d8685af18f75cd7de823b40da6eefac23a4a.tar.gz |
ANDROID: sdcardfs: d_splice_alias can return error values
We must check that d_splice_alias was successful before using its
output.
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 62390017
Change-Id: Ifda0a052fb3f67e35c635a4e5e907876c5400978
-rw-r--r-- | fs/sdcardfs/lookup.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/sdcardfs/lookup.c b/fs/sdcardfs/lookup.c index 17761c546617..843fcd216116 100644 --- a/fs/sdcardfs/lookup.c +++ b/fs/sdcardfs/lookup.c @@ -199,7 +199,8 @@ static struct dentry *__sdcardfs_interpose(struct dentry *dentry, ret_dentry = d_splice_alias(inode, dentry); dentry = ret_dentry ?: dentry; - update_derived_permission_lock(dentry); + if (!IS_ERR(dentry)) + update_derived_permission_lock(dentry); out: return ret_dentry; } |