mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 11:54:14 -04:00
ANDROID: incfs: Add check for ATTR_KILL_SUID and ATTR_MODE in incfs_setattr
Add an explicite check for ATTR_KILL_SUID and ATTR_MODE in incfs_setattr. Both of these attributes can not be set at the same time, otherwise notify_change() function will check it and invoke BUG(), crashing the system. Bug: 243394930 Signed-off-by: Tadeusz Struk <tadeusz.struk@linaro.org> Change-Id: I91080d68efbd62f1441e20a5c02feef3d1b06e4e
This commit is contained in:
parent
26eb689452
commit
297aa83408
1 changed files with 4 additions and 0 deletions
|
|
@ -2055,6 +2055,10 @@ static int incfs_setattr(struct dentry *dentry, struct iattr *ia)
|
|||
if (ia->ia_valid & ATTR_SIZE)
|
||||
return -EINVAL;
|
||||
|
||||
if ((ia->ia_valid & (ATTR_KILL_SUID|ATTR_KILL_SGID)) &&
|
||||
(ia->ia_valid & ATTR_MODE))
|
||||
return -EINVAL;
|
||||
|
||||
if (!di)
|
||||
return -EINVAL;
|
||||
backing_dentry = di->backing_path.dentry;
|
||||
|
|
|
|||
Loading…
Reference in a new issue