securityfs: Drop dentry reference count when mknod fails
lookup_one_len increments dentry reference count which is not decremented when the create operation fails. This can cause a kernel BUG at fs/dcache.c:676 at unmount time. Also error code returned when new_inode() fails was replaced with more appropriate -ENOMEM. Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@sophos.com> Acked-by: NSerge E. Hallyn <serge@hallyn.com> Acked-by: NGreg Kroah-Hartman <gregkh@suse.de> Signed-off-by: NJames Morris <jmorris@namei.org>
Showing
想要评论请 注册 或 登录