aboutsummaryrefslogtreecommitdiff
path: root/net
AgeCommit message (Collapse)AuthorFilesLines
2009-09-16ipv6: Ignore route option with ROUTER_PREF_INVALIDJens Rosenboom1-1/+1
RFC4191 says that "If the Reserved (10) value is received, the Route Information Option MUST be ignored.", so this patch makes us conform to the RFC. This is different to the usage of the Default Router Preference, where an invalid value must indeed be treated as PREF_MEDIUM. Signed-off-by: Jens Rosenboom <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-16Merge branch 'master' of ↵David S. Miller3-10/+20
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
2009-09-16cfg80211: fix SME connectJohannes Berg1-8/+13
There's a check saying /* we're good if we have both BSSID and channel */ if (wdev->conn->params.bssid && wdev->conn->params.channel) { but that isn't true -- we need the BSS struct. This leads to errors such as Trying to associate with 00:1b:53:11:dc:40 (SSID='TEST' freq=2412 MHz) ioctl[SIOCSIWFREQ]: No such file or directory ioctl[SIOCSIWESSID]: No such file or directory Association request to the driver failed Associated with 00:1b:53:11:dc:40 in wpa_supplicant, as reported by Holger. Instead, we really need to have the BSS struct, and if we don't, then we need to initiate a scan for it. But we may already have the BSS struct here, so hang on to it if we do and scan if we don't. Signed-off-by: Johannes Berg <[email protected]> Tested-by: Holger Schurig <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-09-16rc80211_minstrel: fix contention window calculationPavel Roskin1-1/+1
The contention window is supposed to be a power of two minus one, i.e. 15, 31, 63, 127... minstrel_rate_init() forgets to subtract 1, so the sequence becomes 15, 32, 66, 134... Bug reported by Dan Halperin <[email protected]> Signed-off-by: Pavel Roskin <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-09-16Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6Linus Torvalds2-3/+3
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: Driver Core: devtmpfs - kernel-maintained tmpfs-based /dev debugfs: Modify default debugfs directory for debugging pktcdvd. debugfs: Modified default dir of debugfs for debugging UHCI. debugfs: Change debugfs directory of IWMC3200 debugfs: Change debuhgfs directory of trace-events-sample.h debugfs: Fix mount directory of debugfs by default in events.txt hpilo: add poll f_op hpilo: add interrupt handler hpilo: staging for interrupt handling driver core: platform_device_add_data(): use kmemdup() Driver core: Add support for compatibility classes uio: add generic driver for PCI 2.3 devices driver-core: move dma-coherent.c from kernel to driver/base mem_class: fix bug mem_class: use minor as index instead of searching the array driver model: constify attribute groups UIO: remove 'default n' from Kconfig Driver core: Add accessor for device platform data Driver core: move dev_get/set_drvdata to drivers/base/dd.c Driver core: add new device to bus's list before probing
2009-09-16RxRPC: Use uX/sX rather than uintX_t/intX_t typesDavid Howells3-12/+12
Use uX rather than uintX_t types for consistency. Signed-off-by: David Howells <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-15tcp: fix CONFIG_TCP_MD5SIG + CONFIG_PREEMPT timer BUG()Robert Varga1-1/+1
I have recently came across a preemption imbalance detected by: <4>huh, entered ffffffff80644630 with preempt_count 00000102, exited with 00000101? <0>------------[ cut here ]------------ <2>kernel BUG at /usr/src/linux/kernel/timer.c:664! <0>invalid opcode: 0000 [1] PREEMPT SMP with ffffffff80644630 being inet_twdr_hangman(). This appeared after I enabled CONFIG_TCP_MD5SIG and played with it a bit, so I looked at what might have caused it. One thing that struck me as strange is tcp_twsk_destructor(), as it calls tcp_put_md5sig_pool() -- which entails a put_cpu(), causing the detected imbalance. Found on 2.6.23.9, but 2.6.31 is affected as well, as far as I can tell. Signed-off-by: Robert Varga <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-15pkt_sched: Fix qdisc_create on stab error handlingJarek Poplawski1-2/+2
If qdisc_get_stab returns error in qdisc_create there is skipped qdisc ops->destroy, which is necessary because it's after ops->init at the moment, so memory leaks are quite probable. Signed-off-by: Jarek Poplawski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-15SUNRPC: Defer the auth_gss upcall when the RPC call is asynchronousTrond Myklebust2-10/+14
Otherwise, the upcall is going to be synchronous, which may not be what the caller wants... Signed-off-by: Trond Myklebust <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2009-09-15driver model: constify attribute groupsDavid Brownell2-3/+3
Let attribute group vectors be declared "const". We'd like to let most attribute metadata live in read-only sections... this is a start. Signed-off-by: David Brownell <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2009-09-15Merge branch 'for-linus' of ↵Linus Torvalds5-7/+9
git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (46 commits) powerpc64: convert to dynamic percpu allocator sparc64: use embedding percpu first chunk allocator percpu: kill lpage first chunk allocator x86,percpu: use embedding for 64bit NUMA and page for 32bit NUMA percpu: update embedding first chunk allocator to handle sparse units percpu: use group information to allocate vmap areas sparsely vmalloc: implement pcpu_get_vm_areas() vmalloc: separate out insert_vmalloc_vm() percpu: add chunk->base_addr percpu: add pcpu_unit_offsets[] percpu: introduce pcpu_alloc_info and pcpu_group_info percpu: move pcpu_lpage_build_unit_map() and pcpul_lpage_dump_cfg() upward percpu: add @align to pcpu_fc_alloc_fn_t percpu: make @dyn_size mandatory for pcpu_setup_first_chunk() percpu: drop @static_size from first chunk allocators percpu: generalize first chunk allocator selection percpu: build first chunk allocators selectively percpu: rename 4k first chunk allocator to page percpu: improve boot messages percpu: fix pcpu_reclaim() locking ... Fix trivial conflict as by Tejun Heo in kernel/sched.c
2009-09-15ieee802154: add locking for seq numbersDmitry Eremin-Solenikov1-0/+4
Signed-off-by: Dmitry Eremin-Solenikov <[email protected]>
2009-09-15af_ieee802154: setsockopt optlen arg isn't __userDmitry Eremin-Solenikov2-2/+2
Remove __user annotation from optlen arg as it's bogus. Signed-off-by: Dmitry Eremin-Solenikov <[email protected]>
2009-09-15pkt_sched: Fix tx queue selection in tc_modify_qdiscJarek Poplawski2-7/+16
After the recent mq change there is the new select_queue qdisc class method used in tc_modify_qdisc, but it works OK only for direct child qdiscs of mq qdisc. Grandchildren always get the first tx queue, which would give wrong qdisc_root etc. results (e.g. for sch_htb as child of sch_prio). This patch fixes it by using parent's dev_queue for such grandchildren qdiscs. The select_queue method's return type is changed BTW. With feedback from: Patrick McHardy <[email protected]> Signed-off-by: Jarek Poplawski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-15RxRPC: Parse security index 5 keys (Kerberos 5)David Howells1-40/+537
Parse RxRPC security index 5 type keys (Kerberos 5 tokens). Signed-off-by: David Howells <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-15RxRPC: Allow RxRPC keys to be readDavid Howells1-0/+109
Allow RxRPC keys to be read. This is to allow pioctl() to be implemented in userspace. RxRPC keys are read out in XDR format. Signed-off-by: David Howells <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-15RxRPC: Allow key payloads to be passed in XDR formDavid Howells4-75/+298
Allow add_key() and KEYCTL_INSTANTIATE to accept key payloads in XDR form as described by openafs-1.4.10/src/auth/afs_token.xg. This provides a way of passing kaserver, Kerberos 4, Kerberos 5 and GSSAPI keys from userspace, and allows for future expansion. Signed-off-by: David Howells <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-15RxRPC: Declare the security index constants symbolicallyDavid Howells2-5/+5
Declare the security index constants symbolically rather than just referring to them numerically. Signed-off-by: David Howells <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-15[PATCH] net: kmemcheck annotation in struct socketEric Dumazet1-0/+1
struct socket has a 16 bit hole that triggers kmemcheck warnings. As suggested by Ingo, use kmemcheck annotations Signed-off-by: Eric Dumazet <[email protected]> Acked-by: Ingo Molnar <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-15bonding: remap muticast addresses without using dev_close() and dev_open()Moni Shoua5-2/+68
This patch fixes commit e36b9d16c6a6d0f59803b3ef04ff3c22c3844c10. The approach there is to call dev_close()/dev_open() whenever the device type is changed in order to remap the device IP multicast addresses to HW multicast addresses. This approach suffers from 2 drawbacks: *. It assumes tha the device is UP when calling dev_close(), or otherwise dev_close() has no affect. It is worth to mention that initscripts (Redhat) and sysconfig (Suse) doesn't act the same in this matter. *. dev_close() has other side affects, like deleting entries from the routing table, which might be unnecessary. The fix here is to directly remap the IP multicast addresses to HW multicast addresses for a bonding device that changes its type, and nothing else. Reported-by: Jason Gunthorpe <[email protected]> Signed-off-by: Moni Shoua <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-15can: fix NOHZ local_softirq_pending 08 warningOliver Hartkopp1-1/+3
When using nanosleep() in an userspace application we get a ratelimit warning NOHZ: local_softirq_pending 08 for 10 times. The echo of CAN frames is done from process context and softirq context only. Therefore the usage of netif_rx() was wrong (for years). This patch replaces netif_rx() with netif_rx_ni() which has to be used from process/softirq context. It also adds a missing comment that can_send() must no be used from hardirq context. Signed-off-by: Oliver Hartkopp <[email protected]> Signed-off-by: Urs Thuermann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-15tcp: fix ssthresh u16 leftoverIlpo Järvinen5-7/+8
It was once upon time so that snd_sthresh was a 16-bit quantity. ...That has not been true for long period of time. I run across some ancient compares which still seem to trust such legacy. Put all that magic into a single place, I hopefully found all of them. Compile tested, though linking of allyesconfig is ridiculous nowadays it seems. Signed-off-by: Ilpo Järvinen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-14pkt_sched: Fix qdisc_graft WRT ingress qdiscJarek Poplawski1-5/+10
After the recent mq change using ingress qdisc overwrites dev->qdisc; there is also a wrong old qdisc pointer passed to notify_and_destroy. Signed-off-by: Jarek Poplawski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-14Phonet: Netlink event for autoconfigured addressesRémi Denis-Courmont1-1/+8
From: Rémi Denis-Courmont <[email protected]> Signed-off-by: Rémi Denis-Courmont <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-14net: constify remaining proto_opsAlexey Dobriyan4-6/+6
Signed-off-by: Alexey Dobriyan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-14net: constify struct inet6_protocolAlexey Dobriyan16-30/+26
Signed-off-by: Alexey Dobriyan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-14net: constify struct net_protocolAlexey Dobriyan13-28/+24
Remove long removed "inet_protocol_base" declaration. Signed-off-by: Alexey Dobriyan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-14net-next-2.6 [PATCH 1/1] dccp: ccids whitespace-cleanup / CodingStyleGerrit Renker11-67/+48
No code change, cosmetical changes only: * whitespace cleanup via scripts/cleanfile, * remove self-references to filename at top of files, * fix coding style (extraneous brackets), * fix documentation style (kernel-doc-nano-HOWTO). Thanks are due to Ivo Augusto Calado who raised these issues by submitting good-quality patches. Signed-off-by: Gerrit Renker <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-14genetlink: fix netns vs. netlink table lockingJohannes Berg2-23/+33
Since my commits introducing netns awareness into genetlink we can get this problem: BUG: scheduling while atomic: modprobe/1178/0x00000002 2 locks held by modprobe/1178: #0: (genl_mutex){+.+.+.}, at: [<ffffffff8135ee1a>] genl_register_mc_grou #1: (rcu_read_lock){.+.+..}, at: [<ffffffff8135eeb5>] genl_register_mc_g Pid: 1178, comm: modprobe Not tainted 2.6.31-rc8-wl-34789-g95cb731-dirty # Call Trace: [<ffffffff8103e285>] __schedule_bug+0x85/0x90 [<ffffffff81403138>] schedule+0x108/0x588 [<ffffffff8135b131>] netlink_table_grab+0xa1/0xf0 [<ffffffff8135c3a7>] netlink_change_ngroups+0x47/0x100 [<ffffffff8135ef0f>] genl_register_mc_group+0x12f/0x290 because I overlooked that netlink_table_grab() will schedule, thinking it was just the rwlock. However, in the contention case, that isn't actually true. Fix this by letting the code grab the netlink table lock first and then the RCU for netns protection. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-14Have atalk_route_packet() return NET_RX_SUCCESS not NET_XMIT_SUCCESSMark Smith1-1/+1
Have atalk_route_packet() return NET_RX_SUCCESS not NET_XMIT_SUCCESS atalk_route_packet() returns NET_RX_DROP if it's call to aarp_send_ddp() returns NET_XMIT_DROP. If aarp_send_ddp() returns anything else atalk_route_packet() should return NET_RX_SUCCESS, not NET_XMIT_SUCCESS. Signed-off-by: Mark Smith <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-14cfg80211: minimal error handling for wext-compat freq scanningHolger Schurig1-0/+5
Signed-off-by: Holger Schurig <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-09-14cfg80211: use cfg80211_wext_freq() for freq conversionHolger Schurig1-1/+1
WEXT's "struct iw_freq" can also be used to handle a channel. This patch now uses cfg80211_wext_freq() instead of hand-converting the frequency. That allows user-space to specify channels as well, like with SIOCSIWFREQ. Signed-off-by: Holger Schurig <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-09-14Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6Linus Torvalds328-8111/+16882
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1623 commits) netxen: update copyright netxen: fix tx timeout recovery netxen: fix file firmware leak netxen: improve pci memory access netxen: change firmware write size tg3: Fix return ring size breakage netxen: build fix for INET=n cdc-phonet: autoconfigure Phonet address Phonet: back-end for autoconfigured addresses Phonet: fix netlink address dump error handling ipv6: Add IFA_F_DADFAILED flag net: Add DEVTYPE support for Ethernet based devices mv643xx_eth.c: remove unused txq_set_wrr() ucc_geth: Fix hangs after switching from full to half duplex ucc_geth: Rearrange some code to avoid forward declarations phy/marvell: Make non-aneg speed/duplex forcing work for 88E1111 PHYs drivers/net/phy: introduce missing kfree drivers/net/wan: introduce missing kfree net: force bridge module(s) to be GPL Subject: [PATCH] appletalk: Fix skb leak when ipddp interface is not loaded ... Fixed up trivial conflicts: - arch/x86/include/asm/socket.h converted to <asm-generic/socket.h> in the x86 tree. The generic header has the same new #define's, so that works out fine. - drivers/net/tun.c fix conflict between 89f56d1e9 ("tun: reuse struct sock fields") that switched over to using 'tun->socket.sk' instead of the redundantly available (and thus removed) 'tun->sk', and 2b980dbd ("lsm: Add hooks to the TUN driver") which added a new 'tun->sk' use. Noted in 'next' by Stephen Rothwell.
2009-09-13nfsd41: sunrpc: add new xprt class for nfsv4.1 backchannelAlexandros Batsakis2-2/+95
[sunrpc: change idle timeout value for the backchannel] Signed-off-by: Alexandros Batsakis <[email protected]> Signed-off-by: Benny Halevy <[email protected]> Acked-by: Trond Myklebust <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2009-09-11sunrpc/cache: simplify cache_fresh_locked and cache_fresh_unlocked.NeilBrown1-13/+10
The extra call to cache_revisit_request in cache_fresh_unlocked is not needed, as should have been fairly clear at the time of commit 4013edea9a0b6cdcb1fdf5d4011e47e068fd6efb If there are requests to be revisited, then we can be sure that CACHE_PENDING is set, so the second call is sufficient. So remove the first call. Then remove the 'new' parameter, then remove the return value for cache_fresh_locked which is only used to provide the value for 'new'. Signed-off-by: NeilBrown <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2009-09-11sunrpc/cache: change cache_defer_req to return -ve error, not boolean.NeilBrown1-5/+5
As "cache_defer_req" does not sound like a predicate, having it return a boolean value can be confusing. It is more consistent to return 0 for success and negative for error. Exactly what error code to return is not important as we don't differentiate between reasons why the request wasn't deferred, we only care about whether it was deferred or not. Signed-off-by: NeilBrown <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2009-09-11Phonet: back-end for autoconfigured addressesRémi Denis-Courmont1-1/+25
In some cases, the network device driver knows what layer-3 address the device should have. This adds support for the Phonet stack to automatically request from the driver and add that address to the network device. Signed-off-by: Rémi Denis-Courmont <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-11Phonet: fix netlink address dump error handlingRémi Denis-Courmont1-1/+1
Signed-off-by: Rémi Denis-Courmont <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-11ipv6: Add IFA_F_DADFAILED flagBrian Haley1-5/+7
Add IFA_F_DADFAILED flag to denote an IPv6 address that has failed Duplicate Address Detection, that way tools like /sbin/ip can be more informative. 3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000 inet6 2001:db8::1/64 scope global tentative dadfailed valid_lft forever preferred_lft forever Signed-off-by: Brian Haley <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-11net: Add DEVTYPE support for Ethernet based devicesMarcel Holtmann3-0/+16
The Ethernet framing is used for a lot of devices these days. Most prominent are WiFi and WiMAX based devices. However for userspace application it is important to classify these devices correctly and not only see them as Ethernet devices. The daemons like HAL, DeviceKit or even NetworkManager with udev support tries to do the classification in userspace with a lot trickery and extra system calls. This is not good and actually reaches its limitations. Especially since the kernel does know the type of the Ethernet device it is pretty stupid. To solve this problem the underlying device type needs to be set and then the value will be exported as DEVTYPE via uevents and available within udev. # cat /sys/class/net/wlan0/uevent DEVTYPE=wlan INTERFACE=wlan0 IFINDEX=5 This is similar to subsystems like USB and SCSI that distinguish between hosts, devices, disks, partitions etc. The new SET_NETDEV_DEVTYPE() is a convenience helper to set the actual device type. All device types are free form, but for convenience the same strings as used with RFKILL are choosen. Signed-off-by: Marcel Holtmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-11net: force bridge module(s) to be GPLStephen Hemminger1-2/+2
The only valid usage for the bridge frame hooks are by a GPL components (such as the bridge module). The kernel should not leave a crack in the door for proprietary networking stacks to slip in. Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-11Subject: [PATCH] appletalk: Fix skb leak when ipddp interface is not loadedArnaldo Carvalho de Melo2-28/+35
And also do a better job of returning proper NET_{RX,XMIT}_ values. Based on a patch and suggestions by Mark Smith. This fixes CVE-2009-2903 Reported-by: Mark Smith <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-11nfsd41: sunrpc: Added rpc server-side backchannel handlingRahul Iyer5-39/+300
When the call direction is a reply, copy the xid and call direction into the req->rq_private_buf.head[0].iov_base otherwise rpc_verify_header returns rpc_garbage. Signed-off-by: Rahul Iyer <[email protected]> Signed-off-by: Mike Sager <[email protected]> Signed-off-by: Marc Eshel <[email protected]> Signed-off-by: Benny Halevy <[email protected]> Signed-off-by: Ricardo Labiaga <[email protected]> Signed-off-by: Andy Adamson <[email protected]> Signed-off-by: Benny Halevy <[email protected]> [get rid of CONFIG_NFSD_V4_1] [sunrpc: refactoring of svc_tcp_recvfrom] [nfsd41: sunrpc: create common send routine for the fore and the back channels] [nfsd41: sunrpc: Use free_page() to free server backchannel pages] [nfsd41: sunrpc: Document server backchannel locking] [nfsd41: sunrpc: remove bc_connect_worker()] [nfsd41: sunrpc: Define xprt_server_backchannel()[ [nfsd41: sunrpc: remove bc_close and bc_init_auto_disconnect dummy functions] [nfsd41: sunrpc: eliminate unneeded switch statement in xs_setup_tcp()] [nfsd41: sunrpc: Don't auto close the server backchannel connection] [nfsd41: sunrpc: Remove unused functions] Signed-off-by: Alexandros Batsakis <[email protected]> Signed-off-by: Ricardo Labiaga <[email protected]> Signed-off-by: Benny Halevy <[email protected]> [nfsd41: change bc_sock to bc_xprt] [nfsd41: sunrpc: move struct rpc_buffer def into a common header file] [nfsd41: sunrpc: use rpc_sleep in bc_send_request so not to block on mutex] [removed cosmetic changes] Signed-off-by: Benny Halevy <[email protected]> [sunrpc: add new xprt class for nfsv4.1 backchannel] [sunrpc: v2.1 change handling of auto_close and init_auto_disconnect operations for the nfsv4.1 backchannel] Signed-off-by: Alexandros Batsakis <[email protected]> [reverted more cosmetic leftovers] [got rid of xprt_server_backchannel] [separated "nfsd41: sunrpc: add new xprt class for nfsv4.1 backchannel"] Signed-off-by: Benny Halevy <[email protected]> Cc: Trond Myklebust <[email protected]> [sunrpc: change idle timeout value for the backchannel] Signed-off-by: Alexandros Batsakis <[email protected]> Signed-off-by: Benny Halevy <[email protected]> Acked-by: Trond Myklebust <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2009-09-11Merge branch 'nfs-for-2.6.32'Trond Myklebust14-800/+1780
2009-09-11net: unix: fix sending fds in multiple buffersMiklos Szeredi1-1/+4
Kalle Olavi Niemitalo reported that: "..., when one process calls sendmsg once to send 43804 bytes of data and one file descriptor, and another process then calls recvmsg three times to receive the 16032+16032+11740 bytes, each of those recvmsg calls returns the file descriptor in the ancillary data. I confirmed this with strace. The behaviour differs from Linux 2.6.26, where reportedly only one of those recvmsg calls (I think the first one) returned the file descriptor." This bug was introduced by a patch from me titled "net: unix: fix inflight counting bug in garbage collector", commit 6209344f5. And the reason is, quoting Kalle: "Before your patch, unix_attach_fds() would set scm->fp = NULL, so that if the loop in unix_stream_sendmsg() ran multiple iterations, it could not call unix_attach_fds() again. But now, unix_attach_fds() leaves scm->fp unchanged, and I think this causes it to be called multiple times and duplicate the same file descriptors to each struct sk_buff." Fix this by introducing a flag that is cleared at the start and set when the fds attached to the first buffer. The resulting code should work equivalently to the one on 2.6.26. Reported-by: Kalle Olavi Niemitalo <[email protected]> Signed-off-by: Miklos Szeredi <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-10Merge branch 'master' of ↵David S. Miller45-1040/+348
git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
2009-09-11Merge branch 'next' into for-linusJames Morris2-3/+3
2009-09-10nfsd41: sunrpc: move struct rpc_buffer def into sunrpc.hBenny Halevy2-5/+12
Move struct rpc_buffer's definition into a sunrpc.h, a common, internal header file, in preparation for supporting the nfsv4.1 backchannel. Signed-off-by: Benny Halevy <[email protected]> [nfs41: sunrpc: #include <linux/net.h> from sunrpc.h] Signed-off-by: Benny Halevy <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
2009-09-09net_sched: fix estimator lock selection for mq child qdiscsPatrick McHardy2-16/+27
When new child qdiscs are attached to the mq qdisc, they are actually attached as root qdiscs to the device queues. The lock selection for new estimators incorrectly picks the root lock of the existing and to be replaced qdisc, which results in a use-after-free once the old qdisc has been destroyed. Mark mq qdisc instances with a new flag and treat qdiscs attached to mq as children similar to regular root qdiscs. Additionally prevent estimators from being attached to the mq qdisc itself since it only updates its byte and packet counters during dumps. Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2009-09-09Merge branch 'master' of ↵David S. Miller2-8/+44
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6