Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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:
iwlwifi: Allow building iwl3945 without iwl4965.
wireless: Fix compile error with wifi & leds
tcp: Fix slab corruption with ipv6 and tcp6fuzz
ipv4/ipv6 compat: Fix SSM applications on 64bit kernels.
[IPSEC]: Use digest_null directly for auth
sunrpc: fix missing kernel-doc
can: Fix copy_from_user() results interpretation
Revert "ipv6: Fix typo in net/ipv6/Kconfig"
tipc: endianness annotations
ipv6: result of csum_fold() is already 16bit, no need to cast
[XFRM] AUDIT: Fix flowlabel text format ambibuity.

+159 -25
+1 -1
drivers/net/wireless/Makefile
··· 56 56 57 57 obj-$(CONFIG_ADM8211) += adm8211.o 58 58 59 - obj-$(CONFIG_IWLCORE) += iwlwifi/ 59 + obj-$(CONFIG_IWLWIFI) += iwlwifi/ 60 60 obj-$(CONFIG_RT2X00) += rt2x00/ 61 61 62 62 obj-$(CONFIG_P54_COMMON) += p54/
+6
drivers/net/wireless/iwlwifi/Kconfig
··· 1 + config IWLWIFI 2 + bool 3 + default n 4 + 1 5 config IWLCORE 2 6 tristate "Intel Wireless Wifi Core" 3 7 depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL 8 + select IWLWIFI 4 9 5 10 config IWLWIFI_LEDS 6 11 bool ··· 111 106 tristate "Intel PRO/Wireless 3945ABG/BG Network Connection" 112 107 depends on PCI && MAC80211 && WLAN_80211 && EXPERIMENTAL 113 108 select FW_LOADER 109 + select IWLWIFI 114 110 ---help--- 115 111 Select to build the driver supporting the: 116 112
+3
include/net/compat.h
··· 40 40 41 41 extern int cmsghdr_from_user_compat_to_kern(struct msghdr *, struct sock *, unsigned char *, int); 42 42 43 + extern int compat_mc_setsockopt(struct sock *, int, int, char __user *, int, 44 + int (*)(struct sock *, int, int, char __user *, int)); 45 + 43 46 #endif /* NET_COMPAT_H */
+10 -11
net/can/raw.c
··· 435 435 if (!filter) 436 436 return -ENOMEM; 437 437 438 - err = copy_from_user(filter, optval, optlen); 439 - if (err) { 438 + if (copy_from_user(filter, optval, optlen)) { 440 439 kfree(filter); 441 - return err; 440 + return -EFAULT; 442 441 } 443 442 } else if (count == 1) { 444 - err = copy_from_user(&sfilter, optval, optlen); 445 - if (err) 446 - return err; 443 + if (copy_from_user(&sfilter, optval, optlen)) 444 + return -EFAULT; 447 445 } 448 446 449 447 lock_sock(sk); ··· 491 493 if (optlen != sizeof(err_mask)) 492 494 return -EINVAL; 493 495 494 - err = copy_from_user(&err_mask, optval, optlen); 495 - if (err) 496 - return err; 496 + if (copy_from_user(&err_mask, optval, optlen)) 497 + return -EFAULT; 497 498 498 499 err_mask &= CAN_ERR_MASK; 499 500 ··· 528 531 if (optlen != sizeof(ro->loopback)) 529 532 return -EINVAL; 530 533 531 - err = copy_from_user(&ro->loopback, optval, optlen); 534 + if (copy_from_user(&ro->loopback, optval, optlen)) 535 + return -EFAULT; 532 536 533 537 break; 534 538 ··· 537 539 if (optlen != sizeof(ro->recv_own_msgs)) 538 540 return -EINVAL; 539 541 540 - err = copy_from_user(&ro->recv_own_msgs, optval, optlen); 542 + if (copy_from_user(&ro->recv_own_msgs, optval, optlen)) 543 + return -EFAULT; 541 544 542 545 break; 543 546
+117
net/compat.c
··· 24 24 25 25 #include <net/scm.h> 26 26 #include <net/sock.h> 27 + #include <net/ip.h> 28 + #include <net/ipv6.h> 27 29 #include <asm/uaccess.h> 28 30 #include <net/compat.h> 29 31 ··· 523 521 } 524 522 return err; 525 523 } 524 + 525 + struct compat_group_req { 526 + __u32 gr_interface; 527 + struct __kernel_sockaddr_storage gr_group 528 + __attribute__ ((aligned(4))); 529 + } __attribute__ ((packed)); 530 + 531 + struct compat_group_source_req { 532 + __u32 gsr_interface; 533 + struct __kernel_sockaddr_storage gsr_group 534 + __attribute__ ((aligned(4))); 535 + struct __kernel_sockaddr_storage gsr_source 536 + __attribute__ ((aligned(4))); 537 + } __attribute__ ((packed)); 538 + 539 + struct compat_group_filter { 540 + __u32 gf_interface; 541 + struct __kernel_sockaddr_storage gf_group 542 + __attribute__ ((aligned(4))); 543 + __u32 gf_fmode; 544 + __u32 gf_numsrc; 545 + struct __kernel_sockaddr_storage gf_slist[1] 546 + __attribute__ ((aligned(4))); 547 + } __attribute__ ((packed)); 548 + 549 + 550 + int compat_mc_setsockopt(struct sock *sock, int level, int optname, 551 + char __user *optval, int optlen, 552 + int (*setsockopt)(struct sock *,int,int,char __user *,int)) 553 + { 554 + char __user *koptval = optval; 555 + int koptlen = optlen; 556 + 557 + switch (optname) { 558 + case MCAST_JOIN_GROUP: 559 + case MCAST_LEAVE_GROUP: 560 + { 561 + struct compat_group_req __user *gr32 = (void *)optval; 562 + struct group_req __user *kgr = 563 + compat_alloc_user_space(sizeof(struct group_req)); 564 + u32 interface; 565 + 566 + if (!access_ok(VERIFY_READ, gr32, sizeof(*gr32)) || 567 + !access_ok(VERIFY_WRITE, kgr, sizeof(struct group_req)) || 568 + __get_user(interface, &gr32->gr_interface) || 569 + __put_user(interface, &kgr->gr_interface) || 570 + copy_in_user(&kgr->gr_group, &gr32->gr_group, 571 + sizeof(kgr->gr_group))) 572 + return -EFAULT; 573 + koptval = (char __user *)kgr; 574 + koptlen = sizeof(struct group_req); 575 + break; 576 + } 577 + case MCAST_JOIN_SOURCE_GROUP: 578 + case MCAST_LEAVE_SOURCE_GROUP: 579 + case MCAST_BLOCK_SOURCE: 580 + case MCAST_UNBLOCK_SOURCE: 581 + { 582 + struct compat_group_source_req __user *gsr32 = (void *)optval; 583 + struct group_source_req *kgsr = compat_alloc_user_space( 584 + sizeof(struct group_source_req)); 585 + u32 interface; 586 + 587 + if (!access_ok(VERIFY_READ, gsr32, sizeof(*gsr32)) || 588 + !access_ok(VERIFY_WRITE, kgsr, 589 + sizeof(struct group_source_req)) || 590 + __get_user(interface, &gsr32->gsr_interface) || 591 + __put_user(interface, &kgsr->gsr_interface) || 592 + copy_in_user(&kgsr->gsr_group, &gsr32->gsr_group, 593 + sizeof(kgsr->gsr_group)) || 594 + copy_in_user(&kgsr->gsr_source, &gsr32->gsr_source, 595 + sizeof(kgsr->gsr_source))) 596 + return -EFAULT; 597 + koptval = (char __user *)kgsr; 598 + koptlen = sizeof(struct group_source_req); 599 + break; 600 + } 601 + case MCAST_MSFILTER: 602 + { 603 + struct compat_group_filter __user *gf32 = (void *)optval; 604 + struct group_filter *kgf; 605 + u32 interface, fmode, numsrc; 606 + 607 + if (!access_ok(VERIFY_READ, gf32, sizeof(*gf32)) || 608 + __get_user(interface, &gf32->gf_interface) || 609 + __get_user(fmode, &gf32->gf_fmode) || 610 + __get_user(numsrc, &gf32->gf_numsrc)) 611 + return -EFAULT; 612 + koptlen = optlen + sizeof(struct group_filter) - 613 + sizeof(struct compat_group_filter); 614 + if (koptlen < GROUP_FILTER_SIZE(numsrc)) 615 + return -EINVAL; 616 + kgf = compat_alloc_user_space(koptlen); 617 + if (!access_ok(VERIFY_WRITE, kgf, koptlen) || 618 + __put_user(interface, &kgf->gf_interface) || 619 + __put_user(fmode, &kgf->gf_fmode) || 620 + __put_user(numsrc, &kgf->gf_numsrc) || 621 + copy_in_user(&kgf->gf_group, &gf32->gf_group, 622 + sizeof(kgf->gf_group)) || 623 + (numsrc && copy_in_user(&kgf->gf_slist, &gf32->gf_slist, 624 + numsrc * sizeof(kgf->gf_slist[0])))) 625 + return -EFAULT; 626 + koptval = (char __user *)kgf; 627 + break; 628 + } 629 + 630 + default: 631 + break; 632 + } 633 + return setsockopt(sock, level, optname, koptval, koptlen); 634 + } 635 + 636 + EXPORT_SYMBOL(compat_mc_setsockopt); 637 + 638 + 526 639 /* Argument list sizes for compat_sys_socketcall */ 527 640 #define AL(x) ((x) * sizeof(u32)) 528 641 static unsigned char nas[18]={AL(0),AL(3),AL(3),AL(3),AL(2),AL(3),
+5
net/ipv4/ip_sockglue.c
··· 36 36 #include <linux/mroute.h> 37 37 #include <net/route.h> 38 38 #include <net/xfrm.h> 39 + #include <net/compat.h> 39 40 #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 40 41 #include <net/transp_v6.h> 41 42 #endif ··· 923 922 924 923 if (level != SOL_IP) 925 924 return -ENOPROTOOPT; 925 + 926 + if (optname >= MCAST_JOIN_GROUP && optname <= MCAST_MSFILTER) 927 + return compat_mc_setsockopt(sk, level, optname, optval, optlen, 928 + ip_setsockopt); 926 929 927 930 err = do_ip_setsockopt(sk, level, optname, optval, optlen); 928 931 #ifdef CONFIG_NETFILTER
+1 -2
net/ipv4/tcp_input.c
··· 4925 4925 tcp_data_snd_check(sk); 4926 4926 tcp_ack_snd_check(sk); 4927 4927 4928 - if (tcp_defer_accept_check(sk)) 4929 - return -1; 4928 + tcp_defer_accept_check(sk); 4930 4929 return 0; 4931 4930 4932 4931 csum_error:
+1 -1
net/ipv6/Kconfig
··· 167 167 Tunneling means encapsulating data of one protocol type within 168 168 another protocol and sending it over a channel that understands the 169 169 encapsulating protocol. This driver implements encapsulation of IPv6 170 - into IPv4 packets. This is useful if you want to connect to IPv6 170 + into IPv4 packets. This is useful if you want to connect two IPv6 171 171 networks over an IPv4-only path. 172 172 173 173 Saying M here will produce a module called sit.ko. If unsure, say Y.
+1 -1
net/ipv6/ip6mr.c
··· 358 358 if (pim->type != ((PIM_VERSION << 4) | PIM_REGISTER) || 359 359 (pim->flags & PIM_NULL_REGISTER) || 360 360 (ip_compute_csum((void *)pim, sizeof(*pim)) != 0 && 361 - (u16)csum_fold(skb_checksum(skb, 0, skb->len, 0)))) 361 + csum_fold(skb_checksum(skb, 0, skb->len, 0)))) 362 362 goto drop; 363 363 364 364 /* check if the inner packet is destined to mcast group */
+5
net/ipv6/ipv6_sockglue.c
··· 52 52 #include <net/udp.h> 53 53 #include <net/udplite.h> 54 54 #include <net/xfrm.h> 55 + #include <net/compat.h> 55 56 56 57 #include <asm/uaccess.h> 57 58 ··· 779 778 780 779 if (level != SOL_IPV6) 781 780 return -ENOPROTOOPT; 781 + 782 + if (optname >= MCAST_JOIN_GROUP && optname <= MCAST_MSFILTER) 783 + return compat_mc_setsockopt(sk, level, optname, optval, optlen, 784 + ipv6_setsockopt); 782 785 783 786 err = do_ipv6_setsockopt(sk, level, optname, optval, optlen); 784 787 #ifdef CONFIG_NETFILTER
+3 -1
net/mac80211/Kconfig
··· 73 73 74 74 config MAC80211_LEDS 75 75 bool "Enable LED triggers" 76 - depends on MAC80211 && LEDS_TRIGGERS 76 + depends on MAC80211 77 + select NEW_LEDS 78 + select LEDS_TRIGGERS 77 79 ---help--- 78 80 This option enables a few LED triggers for different 79 81 packet receive/transmit events.
+1 -1
net/sunrpc/xprt.c
··· 445 445 /** 446 446 * xprt_wait_for_buffer_space - wait for transport output buffer to clear 447 447 * @task: task to be put to sleep 448 - * 448 + * @action: function pointer to be executed after wait 449 449 */ 450 450 void xprt_wait_for_buffer_space(struct rpc_task *task, rpc_action action) 451 451 {
+3 -4
net/tipc/msg.h
··· 70 70 u32 pos, u32 mask, u32 val) 71 71 { 72 72 val = (val & mask) << pos; 73 - val = htonl(val); 74 - mask = htonl(mask << pos); 75 - m->hdr[w] &= ~mask; 76 - m->hdr[w] |= val; 73 + mask = mask << pos; 74 + m->hdr[w] &= ~htonl(mask); 75 + m->hdr[w] |= htonl(val); 77 76 } 78 77 79 78 /*
+1 -2
net/xfrm/xfrm_algo.c
··· 129 129 130 130 static struct xfrm_algo_desc aalg_list[] = { 131 131 { 132 - .name = "hmac(digest_null)", 133 - .compat = "digest_null", 132 + .name = "digest_null", 134 133 135 134 .uinfo = { 136 135 .auth = {
+1 -1
net/xfrm/xfrm_state.c
··· 2112 2112 iph6 = ipv6_hdr(skb); 2113 2113 audit_log_format(audit_buf, 2114 2114 " src=" NIP6_FMT " dst=" NIP6_FMT 2115 - " flowlbl=0x%x%x%x", 2115 + " flowlbl=0x%x%02x%02x", 2116 2116 NIP6(iph6->saddr), 2117 2117 NIP6(iph6->daddr), 2118 2118 iph6->flow_lbl[0] & 0x0f,