提交 5a241d77 编写于 作者: C Chris Wright 提交者: David Woodhouse

AUDIT: Properly account for alignment difference in nlmsg_len.

Signed-off-by: NChris Wright <chrisw@osdl.org>
Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
上级 eecb0a73
...@@ -488,7 +488,7 @@ static inline int audit_log_drain(struct audit_buffer *ab) ...@@ -488,7 +488,7 @@ static inline int audit_log_drain(struct audit_buffer *ab)
if (audit_pid) { if (audit_pid) {
struct nlmsghdr *nlh = (struct nlmsghdr *)skb->data; struct nlmsghdr *nlh = (struct nlmsghdr *)skb->data;
nlh->nlmsg_len = skb->len - sizeof(*nlh); nlh->nlmsg_len = skb->len - NLMSG_SPACE(0);
skb_get(skb); /* because netlink_* frees */ skb_get(skb); /* because netlink_* frees */
retval = netlink_unicast(audit_sock, skb, audit_pid, retval = netlink_unicast(audit_sock, skb, audit_pid,
MSG_DONTWAIT); MSG_DONTWAIT);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册