Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 69431
b: refs/heads/master
c: f1673ca
h: refs/heads/master
i:
  69429: 11fbc38
  69427: 0278756
  69423: 2c4c73e
v: v3
  • Loading branch information
Denis V. Lunev authored and David S. Miller committed Oct 15, 2007
1 parent 38e5d05 commit d98f574
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 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: c749b01351d249a924d1dd061dd1431bd3ad0579
refs/heads/master: f1673ca52c04f1b311abe03fd67cd4d650d19435
7 changes: 1 addition & 6 deletions trunk/net/ipv4/ip_fragment.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ static __inline__ void ip4_frag_free(struct inet_frag_queue *q)

static __inline__ struct ipq *frag_alloc_queue(void)
{
struct ipq *qp = kmalloc(sizeof(struct ipq), GFP_ATOMIC);
struct ipq *qp = kzalloc(sizeof(struct ipq), GFP_ATOMIC);

if (!qp)
return NULL;
Expand Down Expand Up @@ -265,15 +265,10 @@ static struct ipq *ip_frag_create(struct iphdr *iph, u32 user)
goto out_nomem;

qp->protocol = iph->protocol;
qp->q.last_in = 0;
qp->id = iph->id;
qp->saddr = iph->saddr;
qp->daddr = iph->daddr;
qp->user = user;
qp->q.len = 0;
qp->q.meat = 0;
qp->q.fragments = NULL;
qp->iif = 0;
qp->peer = sysctl_ipfrag_max_dist ? inet_getpeer(iph->saddr, 1) : NULL;

/* Initialize a timer for this entry. */
Expand Down
7 changes: 3 additions & 4 deletions trunk/net/ipv6/netfilter/nf_conntrack_reasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,10 @@ static void nf_frag_free(struct inet_frag_queue *q)

static inline struct nf_ct_frag6_queue *frag_alloc_queue(void)
{
struct nf_ct_frag6_queue *fq = kmalloc(sizeof(struct nf_ct_frag6_queue), GFP_ATOMIC);
struct nf_ct_frag6_queue *fq;

if (!fq)
fq = kzalloc(sizeof(struct nf_ct_frag6_queue), GFP_ATOMIC);
if (fq == NULL)
return NULL;
atomic_add(sizeof(struct nf_ct_frag6_queue), &nf_frags.mem);
return fq;
Expand Down Expand Up @@ -230,8 +231,6 @@ nf_ct_frag6_create(unsigned int hash, __be32 id, struct in6_addr *src, str
goto oom;
}

memset(fq, 0, sizeof(struct nf_ct_frag6_queue));

fq->id = id;
ipv6_addr_copy(&fq->saddr, src);
ipv6_addr_copy(&fq->daddr, dst);
Expand Down

0 comments on commit d98f574

Please sign in to comment.