Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154221
b: refs/heads/master
c: ee080e6
h: refs/heads/master
i:
  154219: 3759bf3
v: v3
  • Loading branch information
Eric Paris authored and Al Viro committed Jun 24, 2009
1 parent 7553ca7 commit 661bb5a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 038cbcf65fd6a30c79e3917690b8c46321a27915
refs/heads/master: ee080e6ce93d5993390bccf68c1df5efd9351276
30 changes: 15 additions & 15 deletions trunk/kernel/audit.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,22 +528,20 @@ struct sk_buff *audit_make_reply(int pid, int seq, int type, int done,
{
struct sk_buff *skb;
struct nlmsghdr *nlh;
int len = NLMSG_SPACE(size);
void *data;
int flags = multi ? NLM_F_MULTI : 0;
int t = done ? NLMSG_DONE : type;

skb = alloc_skb(len, GFP_KERNEL);
skb = nlmsg_new(size, GFP_KERNEL);
if (!skb)
return NULL;

nlh = NLMSG_PUT(skb, pid, seq, t, size);
nlh->nlmsg_flags = flags;
data = NLMSG_DATA(nlh);
nlh = NLMSG_NEW(skb, pid, seq, t, size, flags);
data = NLMSG_DATA(nlh);
memcpy(data, payload, size);
return skb;

nlmsg_failure: /* Used by NLMSG_PUT */
nlmsg_failure: /* Used by NLMSG_NEW */
if (skb)
kfree_skb(skb);
return NULL;
Expand Down Expand Up @@ -1083,18 +1081,20 @@ static struct audit_buffer * audit_buffer_alloc(struct audit_context *ctx,
goto err;
}

ab->skb = alloc_skb(AUDIT_BUFSIZ, gfp_mask);
if (!ab->skb)
goto err;

ab->ctx = ctx;
ab->gfp_mask = gfp_mask;
nlh = (struct nlmsghdr *)skb_put(ab->skb, NLMSG_SPACE(0));
nlh->nlmsg_type = type;
nlh->nlmsg_flags = 0;
nlh->nlmsg_pid = 0;
nlh->nlmsg_seq = 0;

ab->skb = nlmsg_new(AUDIT_BUFSIZ, gfp_mask);
if (!ab->skb)
goto nlmsg_failure;

nlh = NLMSG_NEW(ab->skb, 0, 0, type, 0, 0);

return ab;

nlmsg_failure: /* Used by NLMSG_NEW */
kfree_skb(ab->skb);
ab->skb = NULL;
err:
audit_buffer_free(ab);
return NULL;
Expand Down

0 comments on commit 661bb5a

Please sign in to comment.