summaryrefslogtreecommitdiff
path: root/net/sched
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-26 14:51:24 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-26 14:51:24 -0700
commit703071b5b93d88d5acb0edd5b9dd86c69ad970f2 (patch)
tree3da99cded2e42f65450bfe849615d56c845263ac /net/sched
parent6288c338661cc26ea66e7818b0d3862ee163fd1d (diff)
parent09c72ec8ed8f7499d115309a6e19cd5e66808d88 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [SUNGEM]: Fix MAC address setting when interface is up. [IPV4] fib_trie: Document locking. [NET]: Correct accept(2) recovery after sock_attach_fd() [PPP]: Don't leak an sk_buff on interface destruction. [NET_SCHED]: Fix ingress locking [NET_SCHED]: cls_basic: fix NULL pointer dereference [DCCP]: make dccp_write_xmit_timer() static again [TG3]: Update version and reldate. [TG3]: Exit irq handler during chip reset. [TG3]: Eliminate the unused TG3_FLAG_SPLIT_MODE flag. [IPV6]: Fix routing round-robin locking. [DECNet] fib: Fix out of bound access of dn_fib_props[] [IPv4] fib: Fix out of bound access of fib_props[] [NET] AX.25 Kconfig and docs updates and fixes [NET]: Fix neighbour destructor handling. [NET]: Fix fib_rules compatibility breakage [SCTP]: Update SCTP Maintainers entry [NET]: remove unused header file: drivers/net/wan/lmc/lmc_media.h
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/cls_basic.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/net/sched/cls_basic.c b/net/sched/cls_basic.c
index fad08e521c24..70fe36eb66a2 100644
--- a/net/sched/cls_basic.c
+++ b/net/sched/cls_basic.c
@@ -81,6 +81,13 @@ static void basic_put(struct tcf_proto *tp, unsigned long f)
static int basic_init(struct tcf_proto *tp)
{
+ struct basic_head *head;
+
+ head = kzalloc(sizeof(*head), GFP_KERNEL);
+ if (head == NULL)
+ return -ENOBUFS;
+ INIT_LIST_HEAD(&head->flist);
+ tp->root = head;
return 0;
}
@@ -176,15 +183,6 @@ static int basic_change(struct tcf_proto *tp, unsigned long base, u32 handle,
}
err = -ENOBUFS;
- if (head == NULL) {
- head = kzalloc(sizeof(*head), GFP_KERNEL);
- if (head == NULL)
- goto errout;
-
- INIT_LIST_HEAD(&head->flist);
- tp->root = head;
- }
-
f = kzalloc(sizeof(*f), GFP_KERNEL);
if (f == NULL)
goto errout;