Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103322
b: refs/heads/master
c: b891c5a
h: refs/heads/master
v: v3
  • Loading branch information
Pablo Neira Ayuso authored and David S. Miller committed Jul 8, 2008
1 parent 1ec3ad5 commit 6c3e4d6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 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: b11c16beb92112885edccc79e17d39c5d218f441
refs/heads/master: b891c5a831b13f74989dcbd7b39d04537b2a05d9
3 changes: 2 additions & 1 deletion trunk/include/net/netfilter/nf_conntrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ nf_ct_iterate_cleanup(int (*iter)(struct nf_conn *i, void *data), void *data);
extern void nf_conntrack_free(struct nf_conn *ct);
extern struct nf_conn *
nf_conntrack_alloc(const struct nf_conntrack_tuple *orig,
const struct nf_conntrack_tuple *repl);
const struct nf_conntrack_tuple *repl,
gfp_t gfp);

/* It's confirmed if it is, or has been in the hash table. */
static inline int nf_ct_is_confirmed(struct nf_conn *ct)
Expand Down
7 changes: 4 additions & 3 deletions trunk/net/netfilter/nf_conntrack_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,8 @@ static noinline int early_drop(unsigned int hash)
}

struct nf_conn *nf_conntrack_alloc(const struct nf_conntrack_tuple *orig,
const struct nf_conntrack_tuple *repl)
const struct nf_conntrack_tuple *repl,
gfp_t gfp)
{
struct nf_conn *ct = NULL;

Expand All @@ -489,7 +490,7 @@ struct nf_conn *nf_conntrack_alloc(const struct nf_conntrack_tuple *orig,
}
}

ct = kmem_cache_zalloc(nf_conntrack_cachep, GFP_ATOMIC);
ct = kmem_cache_zalloc(nf_conntrack_cachep, gfp);
if (ct == NULL) {
pr_debug("nf_conntrack_alloc: Can't alloc conntrack.\n");
atomic_dec(&nf_conntrack_count);
Expand Down Expand Up @@ -542,7 +543,7 @@ init_conntrack(const struct nf_conntrack_tuple *tuple,
return NULL;
}

ct = nf_conntrack_alloc(tuple, &repl_tuple);
ct = nf_conntrack_alloc(tuple, &repl_tuple, GFP_ATOMIC);
if (ct == NULL || IS_ERR(ct)) {
pr_debug("Can't allocate conntrack.\n");
return (struct nf_conntrack_tuple_hash *)ct;
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/netfilter/nf_conntrack_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ ctnetlink_create_conntrack(struct nlattr *cda[],
struct nf_conn_help *help;
struct nf_conntrack_helper *helper;

ct = nf_conntrack_alloc(otuple, rtuple);
ct = nf_conntrack_alloc(otuple, rtuple, GFP_KERNEL);
if (ct == NULL || IS_ERR(ct))
return -ENOMEM;

Expand Down

0 comments on commit 6c3e4d6

Please sign in to comment.