Commit 40f7a7e0 authored by John Johansen's avatar John Johansen Committed by Thadeu Lima de Souza Cascardo

UBUNTU: SAUCE: apparmor: fix not handling error case when securityfs_pin_fs() fails

BugLink: http://bugs.launchpad.net/bugs/1660842Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
Acked-by: default avatarStefan Bader <stefan.bader@canonical.com>
Acked-by: default avatarTim Gardner <tim.gardner@canonical.com>
Acked-by: default avatarBrad Figg <brad.figg@canonical.com>
Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@canonical.com>
parent 024dce01
......@@ -1049,8 +1049,10 @@ static int ns_mkdir_op(struct inode *dir, struct dentry *dentry, umode_t mode)
* for pin_fs
*/
inode_unlock(dir);
securityfs_pin_fs();
error = securityfs_pin_fs();
inode_lock_nested(dir, I_MUTEX_PARENT);
if (error)
return error;
error = __securityfs_setup_d_inode(dir, dentry, mode | S_IFDIR, NULL,
NULL, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment