You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Minor improvement of 'smack_sb_kern_mount'
Fix a possible memory access fault when transmute is true and isp is NULL. Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
This commit is contained in:
committed by
Casey Schaufler
parent
f64410ec66
commit
55dfc5da1a
@@ -413,9 +413,11 @@ static int smack_sb_kern_mount(struct super_block *sb, int flags, void *data)
|
||||
* Initialize the root inode.
|
||||
*/
|
||||
isp = inode->i_security;
|
||||
if (inode->i_security == NULL) {
|
||||
inode->i_security = new_inode_smack(sp->smk_root);
|
||||
isp = inode->i_security;
|
||||
if (isp == NULL) {
|
||||
isp = new_inode_smack(sp->smk_root);
|
||||
if (isp == NULL)
|
||||
return -ENOMEM;
|
||||
inode->i_security = isp;
|
||||
} else
|
||||
isp->smk_inode = sp->smk_root;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user