diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 13:09:07 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 13:09:07 -0500 |
commit | 3d412f60b71e588544e7b75861084f12aa1d7acd (patch) | |
tree | cd527e396da9e85dcf85e14c4fabfe29e61ff5d0 | |
parent | 3098a1801f8b92575a5cd69c77d9fa94ea504dde (diff) | |
parent | 3113e88c3cb3c0a22920b621f8e4d1f2ccc07f1e (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (21 commits)
[PKT_SCHED]: vlan tag match
[NET]: Add if_addrlabel.h to sanitized headers.
[NET] rtnetlink.c: remove no longer used functions
[ICMP]: Restore pskb_pull calls in receive function
[INET]: Fix accidentally broken inet(6)_hash_connect's port offset calculations.
[NET]: Remove further references to net-modules.txt
bluetooth rfcomm tty: destroy before tty_close()
bluetooth: blacklist another Broadcom BCM2035 device
drivers/bluetooth/btsdio.c: fix double-free
drivers/bluetooth/bpa10x.c: fix memleak
bluetooth: uninlining
bluetooth: hidp_process_hid_control remove unnecessary parameter dealing
tun: impossible to deassert IFF_ONE_QUEUE or IFF_NO_PI
hamradio: fix dmascc section mismatch
[SCTP]: Fix kernel panic while received AUTH chunk with BAD shared key identifier
[SCTP]: Fix kernel panic while received AUTH chunk while enabled auth
[IPV4]: Formatting fix for /proc/net/fib_trie.
[IPV6]: Fix sysctl compilation error.
[NET_SCHED]: Add #ifdef CONFIG_NET_EMATCH in net/sched/cls_flow.c (latest git broken build)
[IPV4]: Fix compile error building without CONFIG_FS_PROC
...
-rw-r--r-- | drivers/bluetooth/bpa10x.c | 1 | ||||
-rw-r--r-- | drivers/bluetooth/btsdio.c | 4 | ||||
-rw-r--r-- | drivers/bluetooth/hci_usb.c | 1 | ||||
-rw-r--r-- | drivers/net/Kconfig | 6 | ||||
-rw-r--r-- | drivers/net/hamradio/dmascc.c | 4 | ||||
-rw-r--r-- | drivers/net/tun.c | 4 | ||||
-rw-r--r-- | include/linux/Kbuild | 1 | ||||
-rw-r--r-- | include/linux/pkt_cls.h | 3 | ||||
-rw-r--r-- | include/linux/rtnetlink.h | 12 | ||||
-rw-r--r-- | include/linux/tc_ematch/tc_em_meta.h | 1 | ||||
-rw-r--r-- | include/net/inet_hashtables.h | 2 | ||||
-rw-r--r-- | include/net/ip_fib.h | 8 | ||||
-rw-r--r-- | include/net/ipv6.h | 6 | ||||
-rw-r--r-- | net/bluetooth/hidp/core.c | 49 | ||||
-rw-r--r-- | net/bluetooth/rfcomm/tty.c | 3 | ||||
-rw-r--r-- | net/core/rtnetlink.c | 44 | ||||
-rw-r--r-- | net/ipv4/fib_trie.c | 3 | ||||
-rw-r--r-- | net/ipv4/icmp.c | 3 | ||||
-rw-r--r-- | net/ipv4/inet_hashtables.c | 6 | ||||
-rw-r--r-- | net/ipv4/xfrm4_mode_beet.c | 2 | ||||
-rw-r--r-- | net/ipv6/icmp.c | 3 | ||||
-rw-r--r-- | net/ipv6/inet6_hashtables.c | 2 | ||||
-rw-r--r-- | net/sched/cls_flow.c | 4 | ||||
-rw-r--r-- | net/sched/em_meta.c | 17 | ||||
-rw-r--r-- | net/sctp/auth.c | 6 | ||||
-rw-r--r-- | net/sctp/sm_statefuns.c | 4 |
26 files changed, 84 insertions, 115 deletions
diff --git a/drivers/bluetooth/bpa10x.c b/drivers/bluetooth/bpa10x.c index 1375b5345a0a..3b28658f5a1f 100644 --- a/drivers/bluetooth/bpa10x.c +++ b/drivers/bluetooth/bpa10x.c | |||
@@ -423,6 +423,7 @@ static int bpa10x_send_frame(struct sk_buff *skb) | |||
423 | break; | 423 | break; |
424 | 424 | ||
425 | default: | 425 | default: |
426 | usb_free_urb(urb); | ||
426 | return -EILSEQ; | 427 | return -EILSEQ; |
427 | } | 428 | } |
428 | 429 | ||
diff --git a/drivers/bluetooth/btsdio.c b/drivers/bluetooth/btsdio.c index b786f6187902..58630cc1eff2 100644 --- a/drivers/bluetooth/btsdio.c +++ b/drivers/bluetooth/btsdio.c | |||
@@ -162,10 +162,8 @@ static int btsdio_rx_packet(struct btsdio_data *data) | |||
162 | bt_cb(skb)->pkt_type = hdr[3]; | 162 | bt_cb(skb)->pkt_type = hdr[3]; |
163 | 163 | ||
164 | err = hci_recv_frame(skb); | 164 | err = hci_recv_frame(skb); |
165 | if (err < 0) { | 165 | if (err < 0) |
166 | kfree(skb); | ||
167 | return err; | 166 | return err; |
168 | } | ||
169 | 167 | ||
170 | sdio_writeb(data->func, 0x00, REG_PC_RRT, NULL); | 168 | sdio_writeb(data->func, 0x00, REG_PC_RRT, NULL); |
171 | 169 | ||
diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c index 98a9cdeaffb6..372c7ef633da 100644 --- a/drivers/bluetooth/hci_usb.c +++ b/drivers/bluetooth/hci_usb.c | |||
@@ -111,6 +111,7 @@ static struct usb_device_id blacklist_ids[] = { | |||
111 | { USB_DEVICE(0x0a5c, 0x2033), .driver_info = HCI_IGNORE }, | 111 | { USB_DEVICE(0x0a5c, 0x2033), .driver_info = HCI_IGNORE }, |
112 | 112 | ||
113 | /* Broadcom BCM2035 */ | 113 | /* Broadcom BCM2035 */ |
114 | { USB_DEVICE(0x0a5c, 0x2035), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU }, | ||
114 | { USB_DEVICE(0x0a5c, 0x200a), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU }, | 115 | { USB_DEVICE(0x0a5c, 0x200a), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU }, |
115 | { USB_DEVICE(0x0a5c, 0x2009), .driver_info = HCI_BCM92035 }, | 116 | { USB_DEVICE(0x0a5c, 0x2009), .driver_info = HCI_BCM92035 }, |
116 | 117 | ||
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index f234ba3f0404..7d170cd381c3 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -920,8 +920,7 @@ config ENC28J60 | |||
920 | ---help--- | 920 | ---help--- |
921 | Support for the Microchip EN28J60 ethernet chip. | 921 | Support for the Microchip EN28J60 ethernet chip. |
922 | 922 | ||
923 | To compile this driver as a module, choose M here and read | 923 | To compile this driver as a module, choose M here. The module will be |
924 | <file:Documentation/networking/net-modules.txt>. The module will be | ||
925 | called enc28j60. | 924 | called enc28j60. |
926 | 925 | ||
927 | config ENC28J60_WRITEVERIFY | 926 | config ENC28J60_WRITEVERIFY |
@@ -2041,8 +2040,7 @@ config IGB | |||
2041 | More specific information on configuring the driver is in | 2040 | More specific information on configuring the driver is in |
2042 | <file:Documentation/networking/e1000.txt>. | 2041 | <file:Documentation/networking/e1000.txt>. |
2043 | 2042 | ||
2044 | To compile this driver as a module, choose M here and read | 2043 | To compile this driver as a module, choose M here. The module |
2045 | <file:Documentation/networking/net-modules.txt>. The module | ||
2046 | will be called igb. | 2044 | will be called igb. |
2047 | 2045 | ||
2048 | source "drivers/net/ixp2000/Kconfig" | 2046 | source "drivers/net/ixp2000/Kconfig" |
diff --git a/drivers/net/hamradio/dmascc.c b/drivers/net/hamradio/dmascc.c index 11b83dae00ac..e04bf9926441 100644 --- a/drivers/net/hamradio/dmascc.c +++ b/drivers/net/hamradio/dmascc.c | |||
@@ -262,8 +262,8 @@ static void tm_isr(struct scc_priv *priv); | |||
262 | 262 | ||
263 | static int io[MAX_NUM_DEVS] __initdata = { 0, }; | 263 | static int io[MAX_NUM_DEVS] __initdata = { 0, }; |
264 | 264 | ||
265 | /* Beware! hw[] is also used in cleanup_module(). */ | 265 | /* Beware! hw[] is also used in dmascc_exit(). */ |
266 | static struct scc_hardware hw[NUM_TYPES] __initdata_or_module = HARDWARE; | 266 | static struct scc_hardware hw[NUM_TYPES] = HARDWARE; |
267 | 267 | ||
268 | 268 | ||
269 | /* Global variables */ | 269 | /* Global variables */ |
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 46339f6bcd00..038c1ef94d2e 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -529,9 +529,13 @@ static int tun_set_iff(struct file *file, struct ifreq *ifr) | |||
529 | 529 | ||
530 | if (ifr->ifr_flags & IFF_NO_PI) | 530 | if (ifr->ifr_flags & IFF_NO_PI) |
531 | tun->flags |= TUN_NO_PI; | 531 | tun->flags |= TUN_NO_PI; |
532 | else | ||
533 | tun->flags &= ~TUN_NO_PI; | ||
532 | 534 | ||
533 | if (ifr->ifr_flags & IFF_ONE_QUEUE) | 535 | if (ifr->ifr_flags & IFF_ONE_QUEUE) |
534 | tun->flags |= TUN_ONE_QUEUE; | 536 | tun->flags |= TUN_ONE_QUEUE; |
537 | else | ||
538 | tun->flags &= ~TUN_ONE_QUEUE; | ||
535 | 539 | ||
536 | file->private_data = tun; | 540 | file->private_data = tun; |
537 | tun->attached = 1; | 541 | tun->attached = 1; |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index c0f9bb78727d..93631229fd5c 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -219,6 +219,7 @@ unifdef-y += i2c-dev.h | |||
219 | unifdef-y += icmp.h | 219 | unifdef-y += icmp.h |
220 | unifdef-y += icmpv6.h | 220 | unifdef-y += icmpv6.h |
221 | unifdef-y += if_addr.h | 221 | unifdef-y += if_addr.h |
222 | unifdef-y += if_addrlabel.h | ||
222 | unifdef-y += if_arp.h | 223 | unifdef-y += if_arp.h |
223 | unifdef-y += if_bridge.h | 224 | unifdef-y += if_bridge.h |
224 | unifdef-y += if_ec.h | 225 | unifdef-y += if_ec.h |
diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h index 1c1dba9ea5fb..40fac8c4559d 100644 --- a/include/linux/pkt_cls.h +++ b/include/linux/pkt_cls.h | |||
@@ -459,7 +459,8 @@ enum | |||
459 | #define TCF_EM_U32 3 | 459 | #define TCF_EM_U32 3 |
460 | #define TCF_EM_META 4 | 460 | #define TCF_EM_META 4 |
461 | #define TCF_EM_TEXT 5 | 461 | #define TCF_EM_TEXT 5 |
462 | #define TCF_EM_MAX 5 | 462 | #define TCF_EM_VLAN 6 |
463 | #define TCF_EM_MAX 6 | ||
463 | 464 | ||
464 | enum | 465 | enum |
465 | { | 466 | { |
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index b014f6b7fe29..b9e174079002 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -602,24 +602,12 @@ struct tcamsg | |||
602 | 602 | ||
603 | #include <linux/mutex.h> | 603 | #include <linux/mutex.h> |
604 | 604 | ||
605 | extern size_t rtattr_strlcpy(char *dest, const struct rtattr *rta, size_t size); | ||
606 | static __inline__ int rtattr_strcmp(const struct rtattr *rta, const char *str) | 605 | static __inline__ int rtattr_strcmp(const struct rtattr *rta, const char *str) |
607 | { | 606 | { |
608 | int len = strlen(str) + 1; | 607 | int len = strlen(str) + 1; |
609 | return len > rta->rta_len || memcmp(RTA_DATA(rta), str, len); | 608 | return len > rta->rta_len || memcmp(RTA_DATA(rta), str, len); |
610 | } | 609 | } |
611 | 610 | ||
612 | extern int rtattr_parse(struct rtattr *tb[], int maxattr, struct rtattr *rta, int len); | ||
613 | extern int __rtattr_parse_nested_compat(struct rtattr *tb[], int maxattr, | ||
614 | struct rtattr *rta, int len); | ||
615 | |||
616 | #define rtattr_parse_nested(tb, max, rta) \ | ||
617 | rtattr_parse((tb), (max), RTA_DATA((rta)), RTA_PAYLOAD((rta))) | ||
618 | |||
619 | #define rtattr_parse_nested_compat(tb, max, rta, data, len) \ | ||
620 | ({ data = RTA_PAYLOAD(rta) >= len ? RTA_DATA(rta) : NULL; \ | ||
621 | __rtattr_parse_nested_compat(tb, max, rta, len); }) | ||
622 | |||
623 | extern int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, u32 group, int echo); | 611 | extern int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, u32 group, int echo); |
624 | extern int rtnl_unicast(struct sk_buff *skb, struct net *net, u32 pid); | 612 | extern int rtnl_unicast(struct sk_buff *skb, struct net *net, u32 pid); |
625 | extern int rtnl_notify(struct sk_buff *skb, struct net *net, u32 pid, u32 group, | 613 | extern int rtnl_notify(struct sk_buff *skb, struct net *net, u32 pid, u32 group, |
diff --git a/include/linux/tc_ematch/tc_em_meta.h b/include/linux/tc_ematch/tc_em_meta.h index e21937cf91d0..c50d2ba5caf0 100644 --- a/include/linux/tc_ematch/tc_em_meta.h +++ b/include/linux/tc_ematch/tc_em_meta.h | |||
@@ -81,6 +81,7 @@ enum | |||
81 | TCF_META_ID_SK_SNDTIMEO, | 81 | TCF_META_ID_SK_SNDTIMEO, |
82 | TCF_META_ID_SK_SENDMSG_OFF, | 82 | TCF_META_ID_SK_SENDMSG_OFF, |
83 | TCF_META_ID_SK_WRITE_PENDING, | 83 | TCF_META_ID_SK_WRITE_PENDING, |
84 | TCF_META_ID_VLAN_TAG, | ||
84 | __TCF_META_ID_MAX | 85 | __TCF_META_ID_MAX |
85 | }; | 86 | }; |
86 | #define TCF_META_ID_MAX (__TCF_META_ID_MAX - 1) | 87 | #define TCF_META_ID_MAX (__TCF_META_ID_MAX - 1) |
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index 48ac620cb846..97dc35ad09be 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h | |||
@@ -389,7 +389,7 @@ static inline struct sock *inet_lookup(struct net *net, | |||
389 | } | 389 | } |
390 | 390 | ||
391 | extern int __inet_hash_connect(struct inet_timewait_death_row *death_row, | 391 | extern int __inet_hash_connect(struct inet_timewait_death_row *death_row, |
392 | struct sock *sk, | 392 | struct sock *sk, u32 port_offset, |
393 | int (*check_established)(struct inet_timewait_death_row *, | 393 | int (*check_established)(struct inet_timewait_death_row *, |
394 | struct sock *, __u16, struct inet_timewait_sock **), | 394 | struct sock *, __u16, struct inet_timewait_sock **), |
395 | void (*hash)(struct sock *sk)); | 395 | void (*hash)(struct sock *sk)); |
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index 90d1175f63de..8b12667f7a2b 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h | |||
@@ -266,6 +266,14 @@ static inline void fib_res_put(struct fib_result *res) | |||
266 | #ifdef CONFIG_PROC_FS | 266 | #ifdef CONFIG_PROC_FS |
267 | extern int __net_init fib_proc_init(struct net *net); | 267 | extern int __net_init fib_proc_init(struct net *net); |
268 | extern void __net_exit fib_proc_exit(struct net *net); | 268 | extern void __net_exit fib_proc_exit(struct net *net); |
269 | #else | ||
270 | static inline int fib_proc_init(struct net *net) | ||
271 | { | ||
272 | return 0; | ||
273 | } | ||
274 | static inline void fib_proc_exit(struct net *net) | ||
275 | { | ||
276 | } | ||
269 | #endif | 277 | #endif |
270 | 278 | ||
271 | #endif /* _NET_FIB_H */ | 279 | #endif /* _NET_FIB_H */ |
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index fa80ea48639d..c0c019f72ba9 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -110,7 +110,6 @@ struct frag_hdr { | |||
110 | 110 | ||
111 | /* sysctls */ | 111 | /* sysctls */ |
112 | extern int sysctl_mld_max_msf; | 112 | extern int sysctl_mld_max_msf; |
113 | |||
114 | extern struct ctl_path net_ipv6_ctl_path[]; | 113 | extern struct ctl_path net_ipv6_ctl_path[]; |
115 | 114 | ||
116 | #define _DEVINC(statname, modifier, idev, field) \ | 115 | #define _DEVINC(statname, modifier, idev, field) \ |
@@ -586,9 +585,6 @@ extern int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf, | |||
586 | int __user *optlen); | 585 | int __user *optlen); |
587 | 586 | ||
588 | #ifdef CONFIG_PROC_FS | 587 | #ifdef CONFIG_PROC_FS |
589 | extern struct ctl_table *ipv6_icmp_sysctl_init(struct net *net); | ||
590 | extern struct ctl_table *ipv6_route_sysctl_init(struct net *net); | ||
591 | |||
592 | extern int ac6_proc_init(void); | 588 | extern int ac6_proc_init(void); |
593 | extern void ac6_proc_exit(void); | 589 | extern void ac6_proc_exit(void); |
594 | extern int raw6_proc_init(void); | 590 | extern int raw6_proc_init(void); |
@@ -621,6 +617,8 @@ static inline int snmp6_unregister_dev(struct inet6_dev *idev) | |||
621 | extern ctl_table ipv6_route_table_template[]; | 617 | extern ctl_table ipv6_route_table_template[]; |
622 | extern ctl_table ipv6_icmp_table_template[]; | 618 | extern ctl_table ipv6_icmp_table_template[]; |
623 | 619 | ||
620 | extern struct ctl_table *ipv6_icmp_sysctl_init(struct net *net); | ||
621 | extern struct ctl_table *ipv6_route_sysctl_init(struct net *net); | ||
624 | extern int ipv6_sysctl_register(void); | 622 | extern int ipv6_sysctl_register(void); |
625 | extern void ipv6_sysctl_unregister(void); | 623 | extern void ipv6_sysctl_unregister(void); |
626 | #endif | 624 | #endif |
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index 782a22602b86..519cdb920f93 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c | |||
@@ -135,8 +135,8 @@ static void __hidp_copy_session(struct hidp_session *session, struct hidp_connin | |||
135 | } | 135 | } |
136 | } | 136 | } |
137 | 137 | ||
138 | static inline int hidp_queue_event(struct hidp_session *session, struct input_dev *dev, | 138 | static int hidp_queue_event(struct hidp_session *session, struct input_dev *dev, |
139 | unsigned int type, unsigned int code, int value) | 139 | unsigned int type, unsigned int code, int value) |
140 | { | 140 | { |
141 | unsigned char newleds; | 141 | unsigned char newleds; |
142 | struct sk_buff *skb; | 142 | struct sk_buff *skb; |
@@ -243,7 +243,8 @@ static void hidp_input_report(struct hidp_session *session, struct sk_buff *skb) | |||
243 | input_sync(dev); | 243 | input_sync(dev); |
244 | } | 244 | } |
245 | 245 | ||
246 | static inline int hidp_queue_report(struct hidp_session *session, unsigned char *data, int size) | 246 | static int hidp_queue_report(struct hidp_session *session, |
247 | unsigned char *data, int size) | ||
247 | { | 248 | { |
248 | struct sk_buff *skb; | 249 | struct sk_buff *skb; |
249 | 250 | ||
@@ -287,7 +288,7 @@ static void hidp_idle_timeout(unsigned long arg) | |||
287 | hidp_schedule(session); | 288 | hidp_schedule(session); |
288 | } | 289 | } |
289 | 290 | ||
290 | static inline void hidp_set_timer(struct hidp_session *session) | 291 | static void hidp_set_timer(struct hidp_session *session) |
291 | { | 292 | { |
292 | if (session->idle_to > 0) | 293 | if (session->idle_to > 0) |
293 | mod_timer(&session->timer, jiffies + HZ * session->idle_to); | 294 | mod_timer(&session->timer, jiffies + HZ * session->idle_to); |
@@ -332,7 +333,8 @@ static inline int hidp_send_ctrl_message(struct hidp_session *session, | |||
332 | return err; | 333 | return err; |
333 | } | 334 | } |
334 | 335 | ||
335 | static inline void hidp_process_handshake(struct hidp_session *session, unsigned char param) | 336 | static void hidp_process_handshake(struct hidp_session *session, |
337 | unsigned char param) | ||
336 | { | 338 | { |
337 | BT_DBG("session %p param 0x%02x", session, param); | 339 | BT_DBG("session %p param 0x%02x", session, param); |
338 | 340 | ||
@@ -365,38 +367,23 @@ static inline void hidp_process_handshake(struct hidp_session *session, unsigned | |||
365 | } | 367 | } |
366 | } | 368 | } |
367 | 369 | ||
368 | static inline void hidp_process_hid_control(struct hidp_session *session, unsigned char param) | 370 | static void hidp_process_hid_control(struct hidp_session *session, |
371 | unsigned char param) | ||
369 | { | 372 | { |
370 | BT_DBG("session %p param 0x%02x", session, param); | 373 | BT_DBG("session %p param 0x%02x", session, param); |
371 | 374 | ||
372 | switch (param) { | 375 | if (param == HIDP_CTRL_VIRTUAL_CABLE_UNPLUG) { |
373 | case HIDP_CTRL_NOP: | ||
374 | break; | ||
375 | |||
376 | case HIDP_CTRL_VIRTUAL_CABLE_UNPLUG: | ||
377 | /* Flush the transmit queues */ | 376 | /* Flush the transmit queues */ |
378 | skb_queue_purge(&session->ctrl_transmit); | 377 | skb_queue_purge(&session->ctrl_transmit); |
379 | skb_queue_purge(&session->intr_transmit); | 378 | skb_queue_purge(&session->intr_transmit); |
380 | 379 | ||
381 | /* Kill session thread */ | 380 | /* Kill session thread */ |
382 | atomic_inc(&session->terminate); | 381 | atomic_inc(&session->terminate); |
383 | break; | ||
384 | |||
385 | case HIDP_CTRL_HARD_RESET: | ||
386 | case HIDP_CTRL_SOFT_RESET: | ||
387 | case HIDP_CTRL_SUSPEND: | ||
388 | case HIDP_CTRL_EXIT_SUSPEND: | ||
389 | /* FIXME: We have to parse these and return no error */ | ||
390 | break; | ||
391 | |||
392 | default: | ||
393 | __hidp_send_ctrl_message(session, | ||
394 | HIDP_TRANS_HANDSHAKE | HIDP_HSHK_ERR_INVALID_PARAMETER, NULL, 0); | ||
395 | break; | ||
396 | } | 382 | } |
397 | } | 383 | } |
398 | 384 | ||
399 | static inline void hidp_process_data(struct hidp_session *session, struct sk_buff *skb, unsigned char param) | 385 | static void hidp_process_data(struct hidp_session *session, struct sk_buff *skb, |
386 | unsigned char param) | ||
400 | { | 387 | { |
401 | BT_DBG("session %p skb %p len %d param 0x%02x", session, skb, skb->len, param); | 388 | BT_DBG("session %p skb %p len %d param 0x%02x", session, skb, skb->len, param); |
402 | 389 | ||
@@ -423,7 +410,8 @@ static inline void hidp_process_data(struct hidp_session *session, struct sk_buf | |||
423 | } | 410 | } |
424 | } | 411 | } |
425 | 412 | ||
426 | static inline void hidp_recv_ctrl_frame(struct hidp_session *session, struct sk_buff *skb) | 413 | static void hidp_recv_ctrl_frame(struct hidp_session *session, |
414 | struct sk_buff *skb) | ||
427 | { | 415 | { |
428 | unsigned char hdr, type, param; | 416 | unsigned char hdr, type, param; |
429 | 417 | ||
@@ -457,7 +445,8 @@ static inline void hidp_recv_ctrl_frame(struct hidp_session *session, struct sk_ | |||
457 | kfree_skb(skb); | 445 | kfree_skb(skb); |
458 | } | 446 | } |
459 | 447 | ||
460 | static inline void hidp_recv_intr_frame(struct hidp_session *session, struct sk_buff *skb) | 448 | static void hidp_recv_intr_frame(struct hidp_session *session, |
449 | struct sk_buff *skb) | ||
461 | { | 450 | { |
462 | unsigned char hdr; | 451 | unsigned char hdr; |
463 | 452 | ||
@@ -625,7 +614,8 @@ static struct device *hidp_get_device(struct hidp_session *session) | |||
625 | return conn ? &conn->dev : NULL; | 614 | return conn ? &conn->dev : NULL; |
626 | } | 615 | } |
627 | 616 | ||
628 | static inline int hidp_setup_input(struct hidp_session *session, struct hidp_connadd_req *req) | 617 | static int hidp_setup_input(struct hidp_session *session, |
618 | struct hidp_connadd_req *req) | ||
629 | { | 619 | { |
630 | struct input_dev *input = session->input; | 620 | struct input_dev *input = session->input; |
631 | int i; | 621 | int i; |
@@ -702,7 +692,8 @@ static void hidp_setup_quirks(struct hid_device *hid) | |||
702 | hid->quirks = hidp_blacklist[n].quirks; | 692 | hid->quirks = hidp_blacklist[n].quirks; |
703 | } | 693 | } |
704 | 694 | ||
705 | static inline void hidp_setup_hid(struct hidp_session *session, struct hidp_connadd_req *req) | 695 | static void hidp_setup_hid(struct hidp_session *session, |
696 | struct hidp_connadd_req *req) | ||
706 | { | 697 | { |
707 | struct hid_device *hid = session->hid; | 698 | struct hid_device *hid = session->hid; |
708 | struct hid_report *report; | 699 | struct hid_report *report; |
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c index 788c70321858..e4c779bb8d76 100644 --- a/net/bluetooth/rfcomm/tty.c +++ b/net/bluetooth/rfcomm/tty.c | |||
@@ -429,7 +429,8 @@ static int rfcomm_release_dev(void __user *arg) | |||
429 | if (dev->tty) | 429 | if (dev->tty) |
430 | tty_vhangup(dev->tty); | 430 | tty_vhangup(dev->tty); |
431 | 431 | ||
432 | rfcomm_dev_del(dev); | 432 | if (!test_bit(RFCOMM_RELEASE_ONHUP, &dev->flags)) |
433 | rfcomm_dev_del(dev); | ||
433 | rfcomm_dev_put(dev); | 434 | rfcomm_dev_put(dev); |
434 | return 0; | 435 | return 0; |
435 | } | 436 | } |
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index ddbdde82a700..61ac8d06292c 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -82,32 +82,6 @@ int rtnl_trylock(void) | |||
82 | return mutex_trylock(&rtnl_mutex); | 82 | return mutex_trylock(&rtnl_mutex); |
83 | } | 83 | } |
84 | 84 | ||
85 | int rtattr_parse(struct rtattr *tb[], int maxattr, struct rtattr *rta, int len) | ||
86 | { | ||
87 | memset(tb, 0, sizeof(struct rtattr*)*maxattr); | ||
88 | |||
89 | while (RTA_OK(rta, len)) { | ||
90 | unsigned flavor = rta->rta_type; | ||
91 | if (flavor && flavor <= maxattr) | ||
92 | tb[flavor-1] = rta; | ||
93 | rta = RTA_NEXT(rta, len); | ||
94 | } | ||
95 | return 0; | ||
96 | } | ||
97 | |||
98 | int __rtattr_parse_nested_compat(struct rtattr *tb[], int maxattr, | ||
99 | struct rtattr *rta, int len) | ||
100 | { | ||
101 | if (RTA_PAYLOAD(rta) < len) | ||
102 | return -1; | ||
103 | if (RTA_PAYLOAD(rta) >= RTA_ALIGN(len) + sizeof(struct rtattr)) { | ||
104 | rta = RTA_DATA(rta) + RTA_ALIGN(len); | ||
105 | return rtattr_parse_nested(tb, maxattr, rta); | ||
106 | } | ||
107 | memset(tb, 0, sizeof(struct rtattr *) * maxattr); | ||
108 | return 0; | ||
109 | } | ||
110 | |||
111 | static struct rtnl_link *rtnl_msg_handlers[NPROTO]; | 85 | static struct rtnl_link *rtnl_msg_handlers[NPROTO]; |
112 | 86 | ||
113 | static inline int rtm_msgindex(int msgtype) | 87 | static inline int rtm_msgindex(int msgtype) |
@@ -442,21 +416,6 @@ void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const void *data | |||
442 | memset(RTA_DATA(rta) + attrlen, 0, RTA_ALIGN(size) - size); | 416 | memset(RTA_DATA(rta) + attrlen, 0, RTA_ALIGN(size) - size); |
443 | } | 417 | } |
444 | 418 | ||
445 | size_t rtattr_strlcpy(char *dest, const struct rtattr *rta, size_t size) | ||
446 | { | ||
447 | size_t ret = RTA_PAYLOAD(rta); | ||
448 | char *src = RTA_DATA(rta); | ||
449 | |||
450 | if (ret > 0 && src[ret - 1] == '\0') | ||
451 | ret--; | ||
452 | if (size > 0) { | ||
453 | size_t len = (ret >= size) ? size - 1 : ret; | ||
454 | memset(dest, 0, size); | ||
455 | memcpy(dest, src, len); | ||
456 | } | ||
457 | return ret; | ||
458 | } | ||
459 | |||
460 | int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, unsigned group, int echo) | 419 | int rtnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, unsigned group, int echo) |
461 | { | 420 | { |
462 | struct sock *rtnl = net->rtnl; | 421 | struct sock *rtnl = net->rtnl; |
@@ -1411,9 +1370,6 @@ void __init rtnetlink_init(void) | |||
1411 | } | 1370 | } |
1412 | 1371 | ||
1413 | EXPORT_SYMBOL(__rta_fill); | 1372 | EXPORT_SYMBOL(__rta_fill); |
1414 | EXPORT_SYMBOL(rtattr_strlcpy); | ||
1415 | EXPORT_SYMBOL(rtattr_parse); | ||
1416 | EXPORT_SYMBOL(__rtattr_parse_nested_compat); | ||
1417 | EXPORT_SYMBOL(rtnetlink_put_metrics); | 1373 | EXPORT_SYMBOL(rtnetlink_put_metrics); |
1418 | EXPORT_SYMBOL(rtnl_lock); | 1374 | EXPORT_SYMBOL(rtnl_lock); |
1419 | EXPORT_SYMBOL(rtnl_trylock); | 1375 | EXPORT_SYMBOL(rtnl_trylock); |
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 35851c96bdfb..f5fba3f71c06 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
@@ -2431,8 +2431,7 @@ static int fib_trie_seq_show(struct seq_file *seq, void *v) | |||
2431 | rtn_type(buf2, sizeof(buf2), | 2431 | rtn_type(buf2, sizeof(buf2), |
2432 | fa->fa_type)); | 2432 | fa->fa_type)); |
2433 | if (fa->fa_tos) | 2433 | if (fa->fa_tos) |
2434 | seq_printf(seq, "tos =%d\n", | 2434 | seq_printf(seq, " tos=%d", fa->fa_tos); |
2435 | fa->fa_tos); | ||
2436 | seq_putc(seq, '\n'); | 2435 | seq_putc(seq, '\n'); |
2437 | } | 2436 | } |
2438 | } | 2437 | } |
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index a7321a82df6d..a13c074dac09 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c | |||
@@ -1015,7 +1015,8 @@ int icmp_rcv(struct sk_buff *skb) | |||
1015 | goto error; | 1015 | goto error; |
1016 | } | 1016 | } |
1017 | 1017 | ||
1018 | __skb_pull(skb, sizeof(*icmph)); | 1018 | if (!pskb_pull(skb, sizeof(*icmph))) |
1019 | goto error; | ||
1019 | 1020 | ||
1020 | icmph = icmp_hdr(skb); | 1021 | icmph = icmp_hdr(skb); |
1021 | 1022 | ||
diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c index 90f422c9447b..9cac6c034abd 100644 --- a/net/ipv4/inet_hashtables.c +++ b/net/ipv4/inet_hashtables.c | |||
@@ -398,7 +398,7 @@ out: | |||
398 | EXPORT_SYMBOL_GPL(inet_unhash); | 398 | EXPORT_SYMBOL_GPL(inet_unhash); |
399 | 399 | ||
400 | int __inet_hash_connect(struct inet_timewait_death_row *death_row, | 400 | int __inet_hash_connect(struct inet_timewait_death_row *death_row, |
401 | struct sock *sk, | 401 | struct sock *sk, u32 port_offset, |
402 | int (*check_established)(struct inet_timewait_death_row *, | 402 | int (*check_established)(struct inet_timewait_death_row *, |
403 | struct sock *, __u16, struct inet_timewait_sock **), | 403 | struct sock *, __u16, struct inet_timewait_sock **), |
404 | void (*hash)(struct sock *sk)) | 404 | void (*hash)(struct sock *sk)) |
@@ -413,7 +413,7 @@ int __inet_hash_connect(struct inet_timewait_death_row *death_row, | |||
413 | if (!snum) { | 413 | if (!snum) { |
414 | int i, remaining, low, high, port; | 414 | int i, remaining, low, high, port; |
415 | static u32 hint; | 415 | static u32 hint; |
416 | u32 offset = hint + inet_sk_port_offset(sk); | 416 | u32 offset = hint + port_offset; |
417 | struct hlist_node *node; | 417 | struct hlist_node *node; |
418 | struct inet_timewait_sock *tw = NULL; | 418 | struct inet_timewait_sock *tw = NULL; |
419 | 419 | ||
@@ -502,7 +502,7 @@ EXPORT_SYMBOL_GPL(__inet_hash_connect); | |||
502 | int inet_hash_connect(struct inet_timewait_death_row *death_row, | 502 | int inet_hash_connect(struct inet_timewait_death_row *death_row, |
503 | struct sock *sk) | 503 | struct sock *sk) |
504 | { | 504 | { |
505 | return __inet_hash_connect(death_row, sk, | 505 | return __inet_hash_connect(death_row, sk, inet_sk_port_offset(sk), |
506 | __inet_check_established, __inet_hash_nolisten); | 506 | __inet_check_established, __inet_hash_nolisten); |
507 | } | 507 | } |
508 | 508 | ||
diff --git a/net/ipv4/xfrm4_mode_beet.c b/net/ipv4/xfrm4_mode_beet.c index e093a7b59e18..b47030ba162b 100644 --- a/net/ipv4/xfrm4_mode_beet.c +++ b/net/ipv4/xfrm4_mode_beet.c | |||
@@ -102,7 +102,7 @@ static int xfrm4_beet_input(struct xfrm_state *x, struct sk_buff *skb) | |||
102 | 102 | ||
103 | XFRM_MODE_SKB_CB(skb)->protocol = ph->nexthdr; | 103 | XFRM_MODE_SKB_CB(skb)->protocol = ph->nexthdr; |
104 | 104 | ||
105 | if (!pskb_may_pull(skb, phlen)); | 105 | if (!pskb_may_pull(skb, phlen)) |
106 | goto out; | 106 | goto out; |
107 | __skb_pull(skb, phlen); | 107 | __skb_pull(skb, phlen); |
108 | } | 108 | } |
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index cbb5b9cf84ad..121d517bf91c 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
@@ -683,7 +683,8 @@ static int icmpv6_rcv(struct sk_buff *skb) | |||
683 | } | 683 | } |
684 | } | 684 | } |
685 | 685 | ||
686 | __skb_pull(skb, sizeof(*hdr)); | 686 | if (!pskb_pull(skb, sizeof(*hdr))) |
687 | goto discard_it; | ||
687 | 688 | ||
688 | hdr = icmp6_hdr(skb); | 689 | hdr = icmp6_hdr(skb); |
689 | 690 | ||
diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c index 43f3993e1f30..99fd25f7f005 100644 --- a/net/ipv6/inet6_hashtables.c +++ b/net/ipv6/inet6_hashtables.c | |||
@@ -236,7 +236,7 @@ static inline u32 inet6_sk_port_offset(const struct sock *sk) | |||
236 | int inet6_hash_connect(struct inet_timewait_death_row *death_row, | 236 | int inet6_hash_connect(struct inet_timewait_death_row *death_row, |
237 | struct sock *sk) | 237 | struct sock *sk) |
238 | { | 238 | { |
239 | return __inet_hash_connect(death_row, sk, | 239 | return __inet_hash_connect(death_row, sk, inet6_sk_port_offset(sk), |
240 | __inet6_check_established, __inet6_hash); | 240 | __inet6_check_established, __inet6_hash); |
241 | } | 241 | } |
242 | 242 | ||
diff --git a/net/sched/cls_flow.c b/net/sched/cls_flow.c index 5a7f6a3060fc..8d7698621f0a 100644 --- a/net/sched/cls_flow.c +++ b/net/sched/cls_flow.c | |||
@@ -594,11 +594,11 @@ static int flow_dump(struct tcf_proto *tp, unsigned long fh, | |||
594 | 594 | ||
595 | if (tcf_exts_dump(skb, &f->exts, &flow_ext_map) < 0) | 595 | if (tcf_exts_dump(skb, &f->exts, &flow_ext_map) < 0) |
596 | goto nla_put_failure; | 596 | goto nla_put_failure; |
597 | 597 | #ifdef CONFIG_NET_EMATCH | |
598 | if (f->ematches.hdr.nmatches && | 598 | if (f->ematches.hdr.nmatches && |
599 | tcf_em_tree_dump(skb, &f->ematches, TCA_FLOW_EMATCHES) < 0) | 599 | tcf_em_tree_dump(skb, &f->ematches, TCA_FLOW_EMATCHES) < 0) |
600 | goto nla_put_failure; | 600 | goto nla_put_failure; |
601 | 601 | #endif | |
602 | nla_nest_end(skb, nest); | 602 | nla_nest_end(skb, nest); |
603 | 603 | ||
604 | if (tcf_exts_dump_stats(skb, &f->exts, &flow_ext_map) < 0) | 604 | if (tcf_exts_dump_stats(skb, &f->exts, &flow_ext_map) < 0) |
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c index a1e5619b1876..9c2ec1992a2a 100644 --- a/net/sched/em_meta.c +++ b/net/sched/em_meta.c | |||
@@ -65,6 +65,7 @@ | |||
65 | #include <linux/string.h> | 65 | #include <linux/string.h> |
66 | #include <linux/skbuff.h> | 66 | #include <linux/skbuff.h> |
67 | #include <linux/random.h> | 67 | #include <linux/random.h> |
68 | #include <linux/if_vlan.h> | ||
68 | #include <linux/tc_ematch/tc_em_meta.h> | 69 | #include <linux/tc_ematch/tc_em_meta.h> |
69 | #include <net/dst.h> | 70 | #include <net/dst.h> |
70 | #include <net/route.h> | 71 | #include <net/route.h> |
@@ -170,6 +171,21 @@ META_COLLECTOR(var_dev) | |||
170 | } | 171 | } |
171 | 172 | ||
172 | /************************************************************************** | 173 | /************************************************************************** |
174 | * vlan tag | ||
175 | **************************************************************************/ | ||
176 | |||
177 | META_COLLECTOR(int_vlan_tag) | ||
178 | { | ||
179 | unsigned short tag; | ||
180 | if (vlan_get_tag(skb, &tag) < 0) | ||
181 | *err = -1; | ||
182 | else | ||
183 | dst->value = tag; | ||
184 | } | ||
185 | |||
186 | |||
187 | |||
188 | /************************************************************************** | ||
173 | * skb attributes | 189 | * skb attributes |
174 | **************************************************************************/ | 190 | **************************************************************************/ |
175 | 191 | ||
@@ -520,6 +536,7 @@ static struct meta_ops __meta_ops[TCF_META_TYPE_MAX+1][TCF_META_ID_MAX+1] = { | |||
520 | [META_ID(SK_SNDTIMEO)] = META_FUNC(int_sk_sndtimeo), | 536 | [META_ID(SK_SNDTIMEO)] = META_FUNC(int_sk_sndtimeo), |
521 | [META_ID(SK_SENDMSG_OFF)] = META_FUNC(int_sk_sendmsg_off), | 537 | [META_ID(SK_SENDMSG_OFF)] = META_FUNC(int_sk_sendmsg_off), |
522 | [META_ID(SK_WRITE_PENDING)] = META_FUNC(int_sk_write_pend), | 538 | [META_ID(SK_WRITE_PENDING)] = META_FUNC(int_sk_write_pend), |
539 | [META_ID(VLAN_TAG)] = META_FUNC(int_vlan_tag), | ||
523 | } | 540 | } |
524 | }; | 541 | }; |
525 | 542 | ||
diff --git a/net/sctp/auth.c b/net/sctp/auth.c index 97e6ebd14500..ae367c82e512 100644 --- a/net/sctp/auth.c +++ b/net/sctp/auth.c | |||
@@ -420,15 +420,15 @@ struct sctp_shared_key *sctp_auth_get_shkey( | |||
420 | const struct sctp_association *asoc, | 420 | const struct sctp_association *asoc, |
421 | __u16 key_id) | 421 | __u16 key_id) |
422 | { | 422 | { |
423 | struct sctp_shared_key *key = NULL; | 423 | struct sctp_shared_key *key; |
424 | 424 | ||
425 | /* First search associations set of endpoint pair shared keys */ | 425 | /* First search associations set of endpoint pair shared keys */ |
426 | key_for_each(key, &asoc->endpoint_shared_keys) { | 426 | key_for_each(key, &asoc->endpoint_shared_keys) { |
427 | if (key->key_id == key_id) | 427 | if (key->key_id == key_id) |
428 | break; | 428 | return key; |
429 | } | 429 | } |
430 | 430 | ||
431 | return key; | 431 | return NULL; |
432 | } | 432 | } |
433 | 433 | ||
434 | /* | 434 | /* |
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index 5df0c4bd415b..f98658782d4f 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -3865,6 +3865,10 @@ sctp_disposition_t sctp_sf_eat_auth(const struct sctp_endpoint *ep, | |||
3865 | struct sctp_chunk *err_chunk; | 3865 | struct sctp_chunk *err_chunk; |
3866 | sctp_ierror_t error; | 3866 | sctp_ierror_t error; |
3867 | 3867 | ||
3868 | /* Make sure that the peer has AUTH capable */ | ||
3869 | if (!asoc->peer.auth_capable) | ||
3870 | return sctp_sf_unk_chunk(ep, asoc, type, arg, commands); | ||
3871 | |||
3868 | if (!sctp_vtag_verify(chunk, asoc)) { | 3872 | if (!sctp_vtag_verify(chunk, asoc)) { |
3869 | sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_BAD_TAG, | 3873 | sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_BAD_TAG, |
3870 | SCTP_NULL()); | 3874 | SCTP_NULL()); |