Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110111
b: refs/heads/master
c: 0523820
h: refs/heads/master
i:
  110109: a7da74d
  110107: 671a852
  110103: 2359848
  110095: 45ea3ea
  110079: 8578b17
v: v3
  • Loading branch information
Timo Teras authored and David S. Miller committed Oct 1, 2008
1 parent 39640b7 commit c6a9995
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 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: 5dc121e9a7a8a3721cefeb07f3559f50fbedc67e
refs/heads/master: 0523820482dcb42784572ffd2296c2f08c275a2b
30 changes: 19 additions & 11 deletions trunk/net/key/af_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,18 @@ static int pfkey_can_dump(struct sock *sk)
return 0;
}

static int pfkey_do_dump(struct pfkey_sock *pfk)
static void pfkey_terminate_dump(struct pfkey_sock *pfk)
{
int rc;

rc = pfk->dump.dump(pfk);
if (rc == -ENOBUFS)
return 0;

pfk->dump.done(pfk);
pfk->dump.dump = NULL;
pfk->dump.done = NULL;
return rc;
if (pfk->dump.dump) {
pfk->dump.done(pfk);
pfk->dump.dump = NULL;
pfk->dump.done = NULL;
}
}

static void pfkey_sock_destruct(struct sock *sk)
{
pfkey_terminate_dump(pfkey_sk(sk));
skb_queue_purge(&sk->sk_receive_queue);

if (!sock_flag(sk, SOCK_DEAD)) {
Expand Down Expand Up @@ -310,6 +306,18 @@ static int pfkey_broadcast(struct sk_buff *skb, gfp_t allocation,
return err;
}

static int pfkey_do_dump(struct pfkey_sock *pfk)
{
int rc;

rc = pfk->dump.dump(pfk);
if (rc == -ENOBUFS)
return 0;

pfkey_terminate_dump(pfk);
return rc;
}

static inline void pfkey_hdr_dup(struct sadb_msg *new, struct sadb_msg *orig)
{
*new = *orig;
Expand Down

0 comments on commit c6a9995

Please sign in to comment.