i_security is NULL when calling post_create

From: Hawk Xu (h.xu@private)
Date: Mon Nov 21 2005 - 21:06:17 PST


I use inode_alloc_security() hook to alloate space for security 
attributes of inodes.  But I found that for the i_security field is 
still NULL for:

1. all files (the security LSM is loaded manually after system boot)
2. all files created after system boot (the security LSM is loaded 
during system boot)

It seems that the inode_alloc_security() hook is not always called.  And 
in my inode_post_setxattr() hook, I have to check that the i_security 
field is non-NULL before setting security attributes for the inode. Any 
idea to avoid this?

(The kernel version is


Best regards,

Hawk Xu, M.S.C.S.
h.xu `echo "ta"|rev` 163 `echo "tod"|rev` com

This archive was generated by hypermail 2.1.3 : Mon Nov 21 2005 - 21:23:02 PST