diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-23 10:51:40 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-23 10:51:40 -0400 |
| commit | d5a92dd43739f59f77247cfbcbefd229e2948131 (patch) | |
| tree | a16124c41e4da74c2a5f8edbd278b96e9d295c71 | |
| parent | d0b72a0817b0164986d35366c8ffe92fd985f713 (diff) | |
| parent | 4e8a5201506423e0241202de1349422af4260296 (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:
[PKT_SCHED] netem: Orphan SKB when adding to queue.
[NET]: kernel-doc fix for sock.h
[NET]: Reduce sizeof(struct flowi) by 20 bytes.
[IPv6] fib: initialize tb6_lock in common place to give lockdep a key
[ATM] nicstar: Fix a bogus casting warning
[ATM] firestream: handle thrown error
[ATM]: No need to return void
[ATM]: handle sysfs errors
[DCCP] ipv6: Fix opt_skb leak.
[DCCP]: Fix Oops in DCCPv6
| -rw-r--r-- | drivers/atm/ambassador.c | 4 | ||||
| -rw-r--r-- | drivers/atm/firestream.c | 4 | ||||
| -rw-r--r-- | drivers/atm/horizon.c | 4 | ||||
| -rw-r--r-- | drivers/atm/nicstar.c | 4 | ||||
| -rw-r--r-- | drivers/pci/quirks.c | 4 | ||||
| -rw-r--r-- | include/net/dn.h | 5 | ||||
| -rw-r--r-- | include/net/flow.h | 3 | ||||
| -rw-r--r-- | include/net/sock.h | 3 | ||||
| -rw-r--r-- | net/atm/atm_sysfs.c | 15 | ||||
| -rw-r--r-- | net/dccp/ipv4.c | 4 | ||||
| -rw-r--r-- | net/dccp/ipv6.c | 12 | ||||
| -rw-r--r-- | net/ipv6/ip6_fib.c | 9 | ||||
| -rw-r--r-- | net/sched/sch_netem.c | 2 |
13 files changed, 45 insertions, 28 deletions
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c index 323592de047b..9fffa7af6db1 100644 --- a/drivers/atm/ambassador.c +++ b/drivers/atm/ambassador.c | |||
| @@ -2452,8 +2452,8 @@ static int __init amb_module_init (void) | |||
| 2452 | static void __exit amb_module_exit (void) | 2452 | static void __exit amb_module_exit (void) |
| 2453 | { | 2453 | { |
| 2454 | PRINTD (DBG_FLOW|DBG_INIT, "cleanup_module"); | 2454 | PRINTD (DBG_FLOW|DBG_INIT, "cleanup_module"); |
| 2455 | 2455 | ||
| 2456 | return pci_unregister_driver(&amb_driver); | 2456 | pci_unregister_driver(&amb_driver); |
| 2457 | } | 2457 | } |
| 2458 | 2458 | ||
| 2459 | module_init(amb_module_init); | 2459 | module_init(amb_module_init); |
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c index 40ab9b65fae9..697ad82f6634 100644 --- a/drivers/atm/firestream.c +++ b/drivers/atm/firestream.c | |||
| @@ -1002,6 +1002,10 @@ static int fs_open(struct atm_vcc *atm_vcc) | |||
| 1002 | r = ROUND_UP; | 1002 | r = ROUND_UP; |
| 1003 | } | 1003 | } |
| 1004 | error = make_rate (pcr, r, &tmc0, NULL); | 1004 | error = make_rate (pcr, r, &tmc0, NULL); |
| 1005 | if (error) { | ||
| 1006 | kfree(tc); | ||
| 1007 | return error; | ||
| 1008 | } | ||
| 1005 | } | 1009 | } |
| 1006 | fs_dprintk (FS_DEBUG_OPEN, "pcr = %d.\n", pcr); | 1010 | fs_dprintk (FS_DEBUG_OPEN, "pcr = %d.\n", pcr); |
| 1007 | } | 1011 | } |
diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c index f59349206dd2..44268cba5a5a 100644 --- a/drivers/atm/horizon.c +++ b/drivers/atm/horizon.c | |||
| @@ -2932,8 +2932,8 @@ static int __init hrz_module_init (void) { | |||
| 2932 | 2932 | ||
| 2933 | static void __exit hrz_module_exit (void) { | 2933 | static void __exit hrz_module_exit (void) { |
| 2934 | PRINTD (DBG_FLOW, "cleanup_module"); | 2934 | PRINTD (DBG_FLOW, "cleanup_module"); |
| 2935 | 2935 | ||
| 2936 | return pci_unregister_driver(&hrz_driver); | 2936 | pci_unregister_driver(&hrz_driver); |
| 2937 | } | 2937 | } |
| 2938 | 2938 | ||
| 2939 | module_init(hrz_module_init); | 2939 | module_init(hrz_module_init); |
diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c index 632ede552761..bd0904594805 100644 --- a/drivers/atm/nicstar.c +++ b/drivers/atm/nicstar.c | |||
| @@ -2759,7 +2759,7 @@ static int ns_ioctl(struct atm_dev *dev, unsigned int cmd, void __user *arg) | |||
| 2759 | { | 2759 | { |
| 2760 | ns_dev *card; | 2760 | ns_dev *card; |
| 2761 | pool_levels pl; | 2761 | pool_levels pl; |
| 2762 | int btype; | 2762 | long btype; |
| 2763 | unsigned long flags; | 2763 | unsigned long flags; |
| 2764 | 2764 | ||
| 2765 | card = dev->dev_data; | 2765 | card = dev->dev_data; |
| @@ -2859,7 +2859,7 @@ static int ns_ioctl(struct atm_dev *dev, unsigned int cmd, void __user *arg) | |||
| 2859 | case NS_ADJBUFLEV: | 2859 | case NS_ADJBUFLEV: |
| 2860 | if (!capable(CAP_NET_ADMIN)) | 2860 | if (!capable(CAP_NET_ADMIN)) |
| 2861 | return -EPERM; | 2861 | return -EPERM; |
| 2862 | btype = (int) arg; /* an int is the same size as a pointer */ | 2862 | btype = (long) arg; /* a long is the same size as a pointer or bigger */ |
| 2863 | switch (btype) | 2863 | switch (btype) |
| 2864 | { | 2864 | { |
| 2865 | case NS_BUFTYPE_SMALL: | 2865 | case NS_BUFTYPE_SMALL: |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index e8a7f1b1b2bc..ecf8e4d6b9da 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
| @@ -1634,7 +1634,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C810, fixup_rev1 | |||
| 1634 | * is marked here since the boot video device will be the only enabled | 1634 | * is marked here since the boot video device will be the only enabled |
| 1635 | * video device at this point. | 1635 | * video device at this point. |
| 1636 | */ | 1636 | */ |
| 1637 | 1637 | #if 0 | |
| 1638 | static void __devinit fixup_video(struct pci_dev *pdev) | 1638 | static void __devinit fixup_video(struct pci_dev *pdev) |
| 1639 | { | 1639 | { |
| 1640 | struct pci_dev *bridge; | 1640 | struct pci_dev *bridge; |
| @@ -1663,7 +1663,7 @@ static void __devinit fixup_video(struct pci_dev *pdev) | |||
| 1663 | } | 1663 | } |
| 1664 | } | 1664 | } |
| 1665 | DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, fixup_video); | 1665 | DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, fixup_video); |
| 1666 | 1666 | #endif | |
| 1667 | 1667 | ||
| 1668 | static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f, struct pci_fixup *end) | 1668 | static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f, struct pci_fixup *end) |
| 1669 | { | 1669 | { |
diff --git a/include/net/dn.h b/include/net/dn.h index 465b78302782..ac4ce9091747 100644 --- a/include/net/dn.h +++ b/include/net/dn.h | |||
| @@ -199,11 +199,6 @@ static inline void dn_sk_ports_copy(struct flowi *fl, struct dn_scp *scp) | |||
| 199 | { | 199 | { |
| 200 | fl->uli_u.dnports.sport = scp->addrloc; | 200 | fl->uli_u.dnports.sport = scp->addrloc; |
| 201 | fl->uli_u.dnports.dport = scp->addrrem; | 201 | fl->uli_u.dnports.dport = scp->addrrem; |
| 202 | fl->uli_u.dnports.objnum = scp->addr.sdn_objnum; | ||
| 203 | if (fl->uli_u.dnports.objnum == 0) { | ||
| 204 | fl->uli_u.dnports.objnamel = (__u8)dn_ntohs(scp->addr.sdn_objnamel); | ||
| 205 | memcpy(fl->uli_u.dnports.objname, scp->addr.sdn_objname, 16); | ||
| 206 | } | ||
| 207 | } | 202 | } |
| 208 | 203 | ||
| 209 | extern unsigned dn_mss_from_pmtu(struct net_device *dev, int mtu); | 204 | extern unsigned dn_mss_from_pmtu(struct net_device *dev, int mtu); |
diff --git a/include/net/flow.h b/include/net/flow.h index 3b44d72b27d3..5cda27cd9deb 100644 --- a/include/net/flow.h +++ b/include/net/flow.h | |||
| @@ -68,9 +68,6 @@ struct flowi { | |||
| 68 | struct { | 68 | struct { |
| 69 | __le16 sport; | 69 | __le16 sport; |
| 70 | __le16 dport; | 70 | __le16 dport; |
| 71 | __u8 objnum; | ||
| 72 | __u8 objnamel; /* Not 16 bits since max val is 16 */ | ||
| 73 | __u8 objname[16]; /* Not zero terminated */ | ||
| 74 | } dnports; | 71 | } dnports; |
| 75 | 72 | ||
| 76 | __be32 spi; | 73 | __be32 spi; |
diff --git a/include/net/sock.h b/include/net/sock.h index 40bb90ebb2d1..ac286a353032 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -884,8 +884,7 @@ static inline int sk_filter(struct sock *sk, struct sk_buff *skb) | |||
| 884 | 884 | ||
| 885 | /** | 885 | /** |
| 886 | * sk_filter_release: Release a socket filter | 886 | * sk_filter_release: Release a socket filter |
| 887 | * @sk: socket | 887 | * @rcu: rcu_head that contains the sk_filter info to remove |
| 888 | * @fp: filter to remove | ||
| 889 | * | 888 | * |
| 890 | * Remove a filter from a socket and release its resources. | 889 | * Remove a filter from a socket and release its resources. |
| 891 | */ | 890 | */ |
diff --git a/net/atm/atm_sysfs.c b/net/atm/atm_sysfs.c index c0a4ae28fcfa..62f6ed1f2f98 100644 --- a/net/atm/atm_sysfs.c +++ b/net/atm/atm_sysfs.c | |||
| @@ -141,7 +141,7 @@ static struct class atm_class = { | |||
| 141 | int atm_register_sysfs(struct atm_dev *adev) | 141 | int atm_register_sysfs(struct atm_dev *adev) |
| 142 | { | 142 | { |
| 143 | struct class_device *cdev = &adev->class_dev; | 143 | struct class_device *cdev = &adev->class_dev; |
| 144 | int i, err; | 144 | int i, j, err; |
| 145 | 145 | ||
| 146 | cdev->class = &atm_class; | 146 | cdev->class = &atm_class; |
| 147 | class_set_devdata(cdev, adev); | 147 | class_set_devdata(cdev, adev); |
| @@ -151,10 +151,19 @@ int atm_register_sysfs(struct atm_dev *adev) | |||
| 151 | if (err < 0) | 151 | if (err < 0) |
| 152 | return err; | 152 | return err; |
| 153 | 153 | ||
| 154 | for (i = 0; atm_attrs[i]; i++) | 154 | for (i = 0; atm_attrs[i]; i++) { |
| 155 | class_device_create_file(cdev, atm_attrs[i]); | 155 | err = class_device_create_file(cdev, atm_attrs[i]); |
| 156 | if (err) | ||
| 157 | goto err_out; | ||
| 158 | } | ||
| 156 | 159 | ||
| 157 | return 0; | 160 | return 0; |
| 161 | |||
| 162 | err_out: | ||
| 163 | for (j = 0; j < i; j++) | ||
| 164 | class_device_remove_file(cdev, atm_attrs[j]); | ||
| 165 | class_device_del(cdev); | ||
| 166 | return err; | ||
| 158 | } | 167 | } |
| 159 | 168 | ||
| 160 | void atm_unregister_sysfs(struct atm_dev *adev) | 169 | void atm_unregister_sysfs(struct atm_dev *adev) |
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index 7e746c4c1688..aaaf4d09516b 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
| @@ -449,6 +449,8 @@ static inline u64 dccp_v4_init_sequence(const struct sock *sk, | |||
| 449 | dccp_hdr(skb)->dccph_sport); | 449 | dccp_hdr(skb)->dccph_sport); |
| 450 | } | 450 | } |
| 451 | 451 | ||
| 452 | static struct request_sock_ops dccp_request_sock_ops; | ||
| 453 | |||
| 452 | int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb) | 454 | int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb) |
| 453 | { | 455 | { |
| 454 | struct inet_request_sock *ireq; | 456 | struct inet_request_sock *ireq; |
| @@ -489,7 +491,7 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb) | |||
| 489 | if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) | 491 | if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) |
| 490 | goto drop; | 492 | goto drop; |
| 491 | 493 | ||
| 492 | req = reqsk_alloc(sk->sk_prot->rsk_prot); | 494 | req = reqsk_alloc(&dccp_request_sock_ops); |
| 493 | if (req == NULL) | 495 | if (req == NULL) |
| 494 | goto drop; | 496 | goto drop; |
| 495 | 497 | ||
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index 7171a78671aa..c8bf89bfb088 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c | |||
| @@ -672,7 +672,6 @@ static struct sock *dccp_v6_hnd_req(struct sock *sk,struct sk_buff *skb) | |||
| 672 | 672 | ||
| 673 | static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb) | 673 | static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb) |
| 674 | { | 674 | { |
| 675 | struct inet_request_sock *ireq; | ||
| 676 | struct dccp_sock dp; | 675 | struct dccp_sock dp; |
| 677 | struct request_sock *req; | 676 | struct request_sock *req; |
| 678 | struct dccp_request_sock *dreq; | 677 | struct dccp_request_sock *dreq; |
| @@ -701,7 +700,7 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb) | |||
| 701 | if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) | 700 | if (sk_acceptq_is_full(sk) && inet_csk_reqsk_queue_young(sk) > 1) |
| 702 | goto drop; | 701 | goto drop; |
| 703 | 702 | ||
| 704 | req = inet6_reqsk_alloc(sk->sk_prot->rsk_prot); | 703 | req = inet6_reqsk_alloc(&dccp6_request_sock_ops); |
| 705 | if (req == NULL) | 704 | if (req == NULL) |
| 706 | goto drop; | 705 | goto drop; |
| 707 | 706 | ||
| @@ -713,7 +712,6 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb) | |||
| 713 | goto drop_and_free; | 712 | goto drop_and_free; |
| 714 | 713 | ||
| 715 | ireq6 = inet6_rsk(req); | 714 | ireq6 = inet6_rsk(req); |
| 716 | ireq = inet_rsk(req); | ||
| 717 | ipv6_addr_copy(&ireq6->rmt_addr, &skb->nh.ipv6h->saddr); | 715 | ipv6_addr_copy(&ireq6->rmt_addr, &skb->nh.ipv6h->saddr); |
| 718 | ipv6_addr_copy(&ireq6->loc_addr, &skb->nh.ipv6h->daddr); | 716 | ipv6_addr_copy(&ireq6->loc_addr, &skb->nh.ipv6h->daddr); |
| 719 | req->rcv_wnd = dccp_feat_default_sequence_window; | 717 | req->rcv_wnd = dccp_feat_default_sequence_window; |
| @@ -997,6 +995,10 @@ static int dccp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) | |||
| 997 | if (sk->sk_state == DCCP_OPEN) { /* Fast path */ | 995 | if (sk->sk_state == DCCP_OPEN) { /* Fast path */ |
| 998 | if (dccp_rcv_established(sk, skb, dccp_hdr(skb), skb->len)) | 996 | if (dccp_rcv_established(sk, skb, dccp_hdr(skb), skb->len)) |
| 999 | goto reset; | 997 | goto reset; |
| 998 | if (opt_skb) { | ||
| 999 | /* This is where we would goto ipv6_pktoptions. */ | ||
| 1000 | __kfree_skb(opt_skb); | ||
| 1001 | } | ||
| 1000 | return 0; | 1002 | return 0; |
| 1001 | } | 1003 | } |
| 1002 | 1004 | ||
| @@ -1021,6 +1023,10 @@ static int dccp_v6_do_rcv(struct sock *sk, struct sk_buff *skb) | |||
| 1021 | 1023 | ||
| 1022 | if (dccp_rcv_state_process(sk, skb, dccp_hdr(skb), skb->len)) | 1024 | if (dccp_rcv_state_process(sk, skb, dccp_hdr(skb), skb->len)) |
| 1023 | goto reset; | 1025 | goto reset; |
| 1026 | if (opt_skb) { | ||
| 1027 | /* This is where we would goto ipv6_pktoptions. */ | ||
| 1028 | __kfree_skb(opt_skb); | ||
| 1029 | } | ||
| 1024 | return 0; | 1030 | return 0; |
| 1025 | 1031 | ||
| 1026 | reset: | 1032 | reset: |
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 8fcae7a6510b..f98ca30d7c1f 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c | |||
| @@ -169,7 +169,6 @@ static __inline__ void rt6_release(struct rt6_info *rt) | |||
| 169 | 169 | ||
| 170 | static struct fib6_table fib6_main_tbl = { | 170 | static struct fib6_table fib6_main_tbl = { |
| 171 | .tb6_id = RT6_TABLE_MAIN, | 171 | .tb6_id = RT6_TABLE_MAIN, |
| 172 | .tb6_lock = RW_LOCK_UNLOCKED, | ||
| 173 | .tb6_root = { | 172 | .tb6_root = { |
| 174 | .leaf = &ip6_null_entry, | 173 | .leaf = &ip6_null_entry, |
| 175 | .fn_flags = RTN_ROOT | RTN_TL_ROOT | RTN_RTINFO, | 174 | .fn_flags = RTN_ROOT | RTN_TL_ROOT | RTN_RTINFO, |
| @@ -187,6 +186,12 @@ static void fib6_link_table(struct fib6_table *tb) | |||
| 187 | { | 186 | { |
| 188 | unsigned int h; | 187 | unsigned int h; |
| 189 | 188 | ||
| 189 | /* | ||
| 190 | * Initialize table lock at a single place to give lockdep a key, | ||
| 191 | * tables aren't visible prior to being linked to the list. | ||
| 192 | */ | ||
| 193 | rwlock_init(&tb->tb6_lock); | ||
| 194 | |||
| 190 | h = tb->tb6_id & (FIB_TABLE_HASHSZ - 1); | 195 | h = tb->tb6_id & (FIB_TABLE_HASHSZ - 1); |
| 191 | 196 | ||
| 192 | /* | 197 | /* |
| @@ -199,7 +204,6 @@ static void fib6_link_table(struct fib6_table *tb) | |||
| 199 | #ifdef CONFIG_IPV6_MULTIPLE_TABLES | 204 | #ifdef CONFIG_IPV6_MULTIPLE_TABLES |
| 200 | static struct fib6_table fib6_local_tbl = { | 205 | static struct fib6_table fib6_local_tbl = { |
| 201 | .tb6_id = RT6_TABLE_LOCAL, | 206 | .tb6_id = RT6_TABLE_LOCAL, |
| 202 | .tb6_lock = RW_LOCK_UNLOCKED, | ||
| 203 | .tb6_root = { | 207 | .tb6_root = { |
| 204 | .leaf = &ip6_null_entry, | 208 | .leaf = &ip6_null_entry, |
| 205 | .fn_flags = RTN_ROOT | RTN_TL_ROOT | RTN_RTINFO, | 209 | .fn_flags = RTN_ROOT | RTN_TL_ROOT | RTN_RTINFO, |
| @@ -213,7 +217,6 @@ static struct fib6_table *fib6_alloc_table(u32 id) | |||
| 213 | table = kzalloc(sizeof(*table), GFP_ATOMIC); | 217 | table = kzalloc(sizeof(*table), GFP_ATOMIC); |
| 214 | if (table != NULL) { | 218 | if (table != NULL) { |
| 215 | table->tb6_id = id; | 219 | table->tb6_id = id; |
| 216 | table->tb6_lock = RW_LOCK_UNLOCKED; | ||
| 217 | table->tb6_root.leaf = &ip6_null_entry; | 220 | table->tb6_root.leaf = &ip6_null_entry; |
| 218 | table->tb6_root.fn_flags = RTN_ROOT | RTN_TL_ROOT | RTN_RTINFO; | 221 | table->tb6_root.fn_flags = RTN_ROOT | RTN_TL_ROOT | RTN_RTINFO; |
| 219 | } | 222 | } |
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index 45939bafbdf8..ef8874babf6a 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c | |||
| @@ -170,6 +170,8 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
| 170 | return NET_XMIT_BYPASS; | 170 | return NET_XMIT_BYPASS; |
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | skb_orphan(skb); | ||
| 174 | |||
| 173 | /* | 175 | /* |
| 174 | * If we need to duplicate packet, then re-insert at top of the | 176 | * If we need to duplicate packet, then re-insert at top of the |
| 175 | * qdisc tree, since parent queuer expects that only one | 177 | * qdisc tree, since parent queuer expects that only one |
