This patch slightly fixes the documentation for the socket_post_create hook. The documentation states that i_security field is accessible through inode field of socket structure (i.e., 'sock->inode->i_security'). There is no inode field in the socket structure. The i_security field is accessible through SOCK_INODE macro. The patch updates the documentation to reflect this.
Unified · Split
| @@ -768,9 +768,9 @@ · 767 unmodified lines | |||
| 768 | * socket structure, but rather, the socket security information is stored | 768 | * socket structure, but rather, the socket security information is stored |
| 769 | * in the associated inode. Typically, the inode alloc_security hook will | 769 | * in the associated inode. Typically, the inode alloc_security hook will |
| 770 | * allocate and and attach security information to | 770 | * allocate and and attach security information to |
| 771 | * sock->inode->i_security. This hook may be used to update the | 771 | * SOCK_INODE(sock)->i_security. This hook may be used to update the |
| 772 | * sock->inode->i_security field with additional information that wasn't | 772 | * SOCK_INODE(sock)->i_security field with additional information that |
| 773 | * available when the inode was allocated. | 773 | * wasn't available when the inode was allocated. |
| 774 | * @sock contains the newly created socket structure. | 774 | * @sock contains the newly created socket structure. |
| 775 | * @family contains the requested protocol family. | 775 | * @family contains the requested protocol family. |
| 776 | * @type contains the requested communications type. | 776 | * @type contains the requested communications type. |