OSDN Git Service

ANDROID: sdcardfs: fix potential crash when reserved_mb is not zero
authorLianjun Huang <huanglianjun@vivo.com>
Sat, 16 Jun 2018 14:59:46 +0000 (22:59 +0800)
committerAmit Pundir <amit.pundir@linaro.org>
Tue, 14 Aug 2018 12:17:11 +0000 (17:47 +0530)
commit5da41806c9f84162c48d6e110a3368ba9d6609c4
tree5ae9f0fbbb5e47543ccae7d2cdc6812a5f0ba55c
parent31c4549ca793130b2d2158965d06bca598de59c7
ANDROID: sdcardfs: fix potential crash when reserved_mb is not zero

sdcardfs_mkdir() calls check_min_free_space(). When reserved_mb is not zero, a negative dentry will be passed to
ext4_statfs() at last and ext4_statfs() will crash. The parent dentry is positive. So we use the parent dentry to
check free space.

Change-Id: I80ab9623fe59ba911f4cc9f0e029a1c6f7ee421b
Signed-off-by: Lianjun Huang <huanglianjun@vivo.com>
fs/sdcardfs/inode.c