@@ -1052,17 +1052,25 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
10521052 * @xfrm_policy_delete_security:
10531053 * @ctx contains the xfrm_sec_ctx.
10541054 * Authorize deletion of xp->security.
1055- * @xfrm_state_alloc_security :
1055+ * @xfrm_state_alloc :
10561056 * @x contains the xfrm_state being added to the Security Association
10571057 * Database by the XFRM system.
10581058 * @sec_ctx contains the security context information being provided by
10591059 * the user-level SA generation program (e.g., setkey or racoon).
1060- * @secid contains the secid from which to take the mls portion of the context.
10611060 * Allocate a security structure to the x->security field; the security
10621061 * field is initialized to NULL when the xfrm_state is allocated. Set the
1063- * context to correspond to either sec_ctx or polsec, with the mls portion
1064- * taken from secid in the latter case.
1065- * Return 0 if operation was successful (memory to allocate, legal context).
1062+ * context to correspond to sec_ctx. Return 0 if operation was successful
1063+ * (memory to allocate, legal context).
1064+ * @xfrm_state_alloc_acquire:
1065+ * @x contains the xfrm_state being added to the Security Association
1066+ * Database by the XFRM system.
1067+ * @polsec contains the policy's security context.
1068+ * @secid contains the secid from which to take the mls portion of the
1069+ * context.
1070+ * Allocate a security structure to the x->security field; the security
1071+ * field is initialized to NULL when the xfrm_state is allocated. Set the
1072+ * context to correspond to secid. Return 0 if operation was successful
1073+ * (memory to allocate, legal context).
10661074 * @xfrm_state_free_security:
10671075 * @x contains the xfrm_state.
10681076 * Deallocate x->security.
@@ -1679,9 +1687,11 @@ struct security_operations {
16791687 int (* xfrm_policy_clone_security ) (struct xfrm_sec_ctx * old_ctx , struct xfrm_sec_ctx * * new_ctx );
16801688 void (* xfrm_policy_free_security ) (struct xfrm_sec_ctx * ctx );
16811689 int (* xfrm_policy_delete_security ) (struct xfrm_sec_ctx * ctx );
1682- int (* xfrm_state_alloc_security ) (struct xfrm_state * x ,
1683- struct xfrm_user_sec_ctx * sec_ctx ,
1684- u32 secid );
1690+ int (* xfrm_state_alloc ) (struct xfrm_state * x ,
1691+ struct xfrm_user_sec_ctx * sec_ctx );
1692+ int (* xfrm_state_alloc_acquire ) (struct xfrm_state * x ,
1693+ struct xfrm_sec_ctx * polsec ,
1694+ u32 secid );
16851695 void (* xfrm_state_free_security ) (struct xfrm_state * x );
16861696 int (* xfrm_state_delete_security ) (struct xfrm_state * x );
16871697 int (* xfrm_policy_lookup ) (struct xfrm_sec_ctx * ctx , u32 fl_secid , u8 dir );
0 commit comments