From: Daniel Rosenberg Date: Wed, 7 Jun 2017 19:44:50 +0000 (-0700) Subject: ANDROID: sdcardfs: d_splice_alias can return error values X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d5dadb6c35fc11537280190084ed94b20be26571;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Bug: 62390017 Change-Id: Ifda0a052fb3f67e35c635a4e5e907876c5400978 --- diff --git a/fs/sdcardfs/lookup.c b/fs/sdcardfs/lookup.c index 83f6083e5aad..7dab5f76896b 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; }