diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-26 17:51:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-26 17:51:24 -0400 |
commit | 703071b5b93d88d5acb0edd5b9dd86c69ad970f2 (patch) | |
tree | 3da99cded2e42f65450bfe849615d56c845263ac /net/sched | |
parent | 6288c338661cc26ea66e7818b0d3862ee163fd1d (diff) | |
parent | 09c72ec8ed8f7499d115309a6e19cd5e66808d88 (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.c | 16 |
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) | |||
81 | 81 | ||
82 | static int basic_init(struct tcf_proto *tp) | 82 | static int basic_init(struct tcf_proto *tp) |
83 | { | 83 | { |
84 | struct basic_head *head; | ||
85 | |||
86 | head = kzalloc(sizeof(*head), GFP_KERNEL); | ||
87 | if (head == NULL) | ||
88 | return -ENOBUFS; | ||
89 | INIT_LIST_HEAD(&head->flist); | ||
90 | tp->root = head; | ||
84 | return 0; | 91 | return 0; |
85 | } | 92 | } |
86 | 93 | ||
@@ -176,15 +183,6 @@ static int basic_change(struct tcf_proto *tp, unsigned long base, u32 handle, | |||
176 | } | 183 | } |
177 | 184 | ||
178 | err = -ENOBUFS; | 185 | err = -ENOBUFS; |
179 | if (head == NULL) { | ||
180 | head = kzalloc(sizeof(*head), GFP_KERNEL); | ||
181 | if (head == NULL) | ||
182 | goto errout; | ||
183 | |||
184 | INIT_LIST_HEAD(&head->flist); | ||
185 | tp->root = head; | ||
186 | } | ||
187 | |||
188 | f = kzalloc(sizeof(*f), GFP_KERNEL); | 186 | f = kzalloc(sizeof(*f), GFP_KERNEL); |
189 | if (f == NULL) | 187 | if (f == NULL) |
190 | goto errout; | 188 | goto errout; |