diff options
Diffstat (limited to 'kernel/audit.c')
-rw-r--r-- | kernel/audit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/audit.c b/kernel/audit.c index ea8521417d13..80a7457dadbf 100644 --- a/kernel/audit.c +++ b/kernel/audit.c | |||
@@ -151,7 +151,7 @@ struct audit_buffer { | |||
151 | 151 | ||
152 | static void audit_set_pid(struct audit_buffer *ab, pid_t pid) | 152 | static void audit_set_pid(struct audit_buffer *ab, pid_t pid) |
153 | { | 153 | { |
154 | struct nlmsghdr *nlh = (struct nlmsghdr *)ab->skb->data; | 154 | struct nlmsghdr *nlh = nlmsg_hdr(ab->skb); |
155 | nlh->nlmsg_pid = pid; | 155 | nlh->nlmsg_pid = pid; |
156 | } | 156 | } |
157 | 157 | ||
@@ -750,7 +750,7 @@ static void audit_receive_skb(struct sk_buff *skb) | |||
750 | u32 rlen; | 750 | u32 rlen; |
751 | 751 | ||
752 | while (skb->len >= NLMSG_SPACE(0)) { | 752 | while (skb->len >= NLMSG_SPACE(0)) { |
753 | nlh = (struct nlmsghdr *)skb->data; | 753 | nlh = nlmsg_hdr(skb); |
754 | if (nlh->nlmsg_len < sizeof(*nlh) || skb->len < nlh->nlmsg_len) | 754 | if (nlh->nlmsg_len < sizeof(*nlh) || skb->len < nlh->nlmsg_len) |
755 | return; | 755 | return; |
756 | rlen = NLMSG_ALIGN(nlh->nlmsg_len); | 756 | rlen = NLMSG_ALIGN(nlh->nlmsg_len); |
@@ -1268,7 +1268,7 @@ void audit_log_end(struct audit_buffer *ab) | |||
1268 | audit_log_lost("rate limit exceeded"); | 1268 | audit_log_lost("rate limit exceeded"); |
1269 | } else { | 1269 | } else { |
1270 | if (audit_pid) { | 1270 | if (audit_pid) { |
1271 | struct nlmsghdr *nlh = (struct nlmsghdr *)ab->skb->data; | 1271 | struct nlmsghdr *nlh = nlmsg_hdr(ab->skb); |
1272 | nlh->nlmsg_len = ab->skb->len - NLMSG_SPACE(0); | 1272 | nlh->nlmsg_len = ab->skb->len - NLMSG_SPACE(0); |
1273 | skb_queue_tail(&audit_skb_queue, ab->skb); | 1273 | skb_queue_tail(&audit_skb_queue, ab->skb); |
1274 | ab->skb = NULL; | 1274 | ab->skb = NULL; |