Skip to content

Commit

Permalink
AUDIT: Properly account for alignment difference in nlmsg_len.
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
  • Loading branch information
Chris Wright authored and David Woodhouse committed May 11, 2005
1 parent eecb0a7 commit 5a241d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/audit.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ static inline int audit_log_drain(struct audit_buffer *ab)

if (audit_pid) {
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 */
retval = netlink_unicast(audit_sock, skb, audit_pid,
MSG_DONTWAIT);
Expand Down

0 comments on commit 5a241d7

Please sign in to comment.