aboutsummaryrefslogtreecommitdiffstats
path: root/block (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2007-10-17[IPSEC]: Disallow combinations of RO and AH/ESP/IPCOMPHerbert Xu4-12/+24
Combining RO and AH/ESP/IPCOMP does not make sense. So this patch adds a check in the state initialisation function to prevent this. This allows us to safely remove the mode input function of RO since it can never be called anymore. Indeed, if somehow it does get called we'll know about it through an OOPS instead of it slipping past silently. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[IPSEC]: Use the top IPv4 route's peer instead of the bottomHerbert Xu1-6/+6
For IPv4 we were using the bottom route's peer instead of the top one. This is wrong because the peer is only used by TCP to keep track of information about the TCP destination address which certainly does not live in the bottom route. This patch fixes that which allows us to get rid of the family check since the bottom route could be IPv6 while the top one must always be IPv4. I've also changed the other fields which are IPv4-specific to get the info from the top route instead of potentially bogus data from the bottom route. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[IPSEC]: Store afinfo pointer in xfrm_modeHerbert Xu6-37/+24
It is convenient to have a pointer from xfrm_state to address-specific functions such as the output function for a family. Currently the address-specific policy code calls out to the xfrm state code to get those pointers when we could get it in an easier way via the state itself. This patch adds an xfrm_state_afinfo to xfrm_mode (since they're address-specific) and changes the policy code to use it. I've also added an owner field to do reference counting on the module providing the afinfo even though it isn't strictly necessary today since IPv6 can't be unloaded yet. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[IPSEC]: Add missing BEET checksHerbert Xu14-12/+25
Currently BEET mode does not reinject the packet back into the stack like tunnel mode does. Since BEET should behave just like tunnel mode this is incorrect. This patch fixes this by introducing a flags field to xfrm_mode that tells the IPsec code whether it should terminate and reinject the packet back into the stack. It then sets the flag for BEET and tunnel mode. I've also added a number of missing BEET checks elsewhere where we check whether a given mode is a tunnel or not. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[IPSEC]: Move type and mode map into xfrm_state.cHerbert Xu3-179/+172
The type and mode maps are only used by SAs, not policies. So it makes sense to move them from xfrm_policy.c into xfrm_state.c. This also allows us to mark xfrm_get_type/xfrm_put_type/xfrm_get_mode/xfrm_put_mode as static. The only other change I've made in the move is to get rid of the casts on the request_module call for types. They're unnecessary because C will promote them to ints anyway. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[IPSEC]: Fix length check in xfrm_parse_spiHerbert Xu1-1/+4
Currently xfrm_parse_spi requires there to be 16 bytes for AH and ESP. In contrived cases there may not actually be 16 bytes there since the respective header sizes are less than that (8 and 12 currently). This patch changes the test to use the actual header length instead of 16. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[IPSEC]: Move ip_summed zapping out of xfrm6_rcv_spiHerbert Xu2-1/+2
Not every transform needs to zap ip_summed. For example, a pure tunnel mode encapsulation does not affect the hardware checksum at all. In fact, every algorithm (that needs this) other than AH6 already does its own ip_summed zapping. This patch moves the zapping into AH6 which is in line with what IPv4 does. Possible future optimisation: Checksum the data as we copy them in IPComp. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[IPSEC]: Get nexthdr from caller in xfrm6_rcv_spiHerbert Xu3-7/+6
Currently xfrm6_rcv_spi gets the nexthdr value itself from the packet. This means that we need to fix up the value in case we have a 4-on-6 tunnel. Moving this logic into the caller simplifies things and allows us to merge the code with IPv4. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[IPSEC]: Move tunnel parsing for IPv4 out of xfrm4_inputHerbert Xu3-27/+26
This patch moves the tunnel parsing for IPv4 out of xfrm4_input and into xfrm4_tunnel. This change is in line with what IPv6 does and will allow us to merge the two input functions. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[IPSEC]: Fix pure tunnel modes involving IPv6Herbert Xu2-2/+2
I noticed that my recent patch broke 6-on-4 pure IPsec tunnels (the ones that are only used for incompressible IPsec packets). Subsequent reviews show that I broke 6-on-6 pure tunnels more than three years ago and nobody ever noticed. I suppose every must be testing 6-on-6 IPComp with large pings which are very compressible :) This patch fixes both cases. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[IPV6]: Cleanup snmp6_alloc_dev()Pavel Emelyanov1-6/+1
This functions is never called with NULL or not setup argument, so the checks inside are redundant. Also, the return value is always -ENOMEM, so no need in additional variable for this. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[IPV6]: Fix return type for snmp6_free_dev()Pavel Emelyanov1-2/+1
This call is essentially void. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[NET]: Fix the race between sk_filter_(de|at)tach and sk_clone()Pavel Emelyanov2-13/+22
The proposed fix is to delay the reference counter decrement until the quiescent state pass. This will give sk_clone() a chance to get the reference on the cloned filter. Regular sk_filter_uncharge can happen from the sk_free() only and there's no need in delaying the put - the socket is dead anyway and is to be release itself. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[NET]: Cleanup the error path in sk_attach_filterPavel Emelyanov1-12/+11
The sk_filter_uncharge is called for error handling and for releasing the former filter, but this will have to be done in a bit different manner, so cleanup the error path a bit. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[NET]: Move the filter releasing into a separate callPavel Emelyanov3-7/+11
This is done merely as a preparation for the fix. The sk_filter_uncharge() unaccounts the filter memory and calls the sk_filter_release(), which in turn decrements the refcount anf frees the filter. The latter function will be required separately. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[NET]: Introduce the sk_detach_filter() callPavel Emelyanov3-11/+18
Filter is attached in a separate function, so do the same for filter detaching. This also removes one variable sock_setsockopt(). Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[MAC80211]: only honor IW_SCAN_THIS_ESSID in STA, IBSS, and AP modesJohn W. Linville1-18/+19
The previous IW_SCAN_THIS_ESSID patch left a hole allowing scan requests on interfaces in inappropriate modes. Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[INET]: Consolidate frag queues freeingPavel Emelyanov4-14/+5
Since we now allocate the queues in inet_fragment.c, we can safely free it in the same place. The ->destructor callback thus becomes optional for inet_frags. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[INET]: Remove no longer needed ->equal callbackPavel Emelyanov6-35/+3
Since this callback is used to check for conflicts in hashtable when inserting a newly created frag queue, we can do the same by checking for matching the queue with the argument, used to create one. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[INET]: Consolidate xxx_find() in fragment managementPavel Emelyanov6-98/+73
Here we need another callback ->match to check whether the entry found in hash matches the key passed. The key used is the same as the creation argument for inet_frag_create. Yet again, this ->match is the same for netfilter and ipv6. Running a frew steps forward - this callback will later replace the ->equal one. Since the inet_frag_find() uses the already consolidated inet_frag_create() remove the xxx_frag_create from protocol codes. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[INET]: Consolidate xxx_frag_create()Pavel Emelyanov6-85/+88
This one uses the xxx_frag_intern() and xxx_frag_alloc() routines, which are already consolidated, so remove them from protocol code (as promised). The ->constructor callback is used to init the rest of the frag queue and it is the same for netfilter and ipv6. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[INET]: Consolidate xxx_frag_alloc()Pavel Emelyanov5-36/+41
Just perform the kzalloc() allocation and setup common fields in the inet_frag_queue(). Then return the result to the caller to initialize the rest. The inet_frag_alloc() may return NULL, so check the return value before doing the container_of(). This looks ugly, but the xxx_frag_alloc() will be removed soon. The xxx_expire() timer callbacks are patches, because the argument is now the inet_frag_queue, not the protocol specific queue. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[INET]: Consolidate xxx_frag_internPavel Emelyanov6-96/+82
This routine checks for the existence of a given entry in the hash table and inserts the new one if needed. The ->equal callback is used to compare two frag_queue-s together, but this one is temporary and will be removed later. The netfilter code and the ipv6 one use the same routine to compare frags. The inet_frag_intern() always returns non-NULL pointer, so convert the inet_frag_queue into protocol specific one (with the container_of) without any checks. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[INET]: Omit double hash calculations in xxx_frag_internPavel Emelyanov2-13/+9
Since the hash value is already calculated in xxx_find, we can simply use it later. This is already done in netfilter code, so make the same in ipv4 and ipv6. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[BR2684]: get rid of broken header code.Stephen Hemminger1-121/+0
Recent header_ops change would break the following dead code in br2684. Maintaining conditonal code in mainline is wrong. "Do, or do not. There is no 'try.'" Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[UMP]: header_ops conversion needed for non-ethernet driversJeff Dike2-6/+2
UML's two non-ethernet drivers need some header_ops conversion. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[IRDA]: IrCOMM discovery indication simplificationRyan Reading1-12/+3
From: Ryan Reading <ryanr23@gmail.com> Every IrCOMM socket is registered with the discovery subsystem, so we don't need to loop over all of them for every discovery event. We just need to do it for the registered IrCOMM socket. Signed-off-by: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[DCCP]: fix link error with !CONFIG_SYSCTLIngo Molnar2-3/+3
Do not define the sysctl_dccp_sync_ratelimit sysctl variable in the CONFIG_SYSCTL dependent sysctl.c module - move it to input.c instead. This fixes the following build bug: net/built-in.o: In function `dccp_check_seqno': input.c:(.text+0xbd859): undefined reference to `sysctl_dccp_sync_ratelimit' distcc[29953] ERROR: compile (null) on localhost failed make: *** [vmlinux] Error 1 Found via 'make randconfig' build testing. Signed-off-by: Ingo Molnar <mingo@elte.hu> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[IPV6]: Fix memory leak in cleanup_ipv6_mibs()Pavel Emelyanov1-0/+1
The icmpv6msg mib statistics is not freed. This is almost not critical for current kernel, since ipv6 module is unloadable, but this can happen on load error and will happen every time we stop the network namespace (when we have one, of course). Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: David L Stevens <dlstevens@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[BNX2]: Update version to 1.6.8.Michael Chan1-2/+2
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[BNX2]: Fix Serdes WoL bug.Michael Chan1-9/+19
The bug is in the code in bnx2_set_power_state() that assumes copper devices when setting up WoL. This is no longer true after adding WoL support for Serdes devices. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[BNX2]: Update 5709 firmware to 3.7.1.Michael Chan1-3904/+3929
This firmware update fixes a problem running with IPMI management firmware. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-17[IA64] fix non-numa buildAndrew Morton1-1/+3
arch/ia64/kernel/machine_kexec.c: In function `arch_crash_save_vmcoreinfo': arch/ia64/kernel/machine_kexec.c:131: error: `pgdat_list' undeclared (first use in this function) arch/ia64/kernel/machine_kexec.c:131: error: (Each undeclared identifier is reported only once arch/ia64/kernel/machine_kexec.c:131: error: for each function it appears in.) arch/ia64/kernel/machine_kexec.c:134: error: `node_memblk' undeclared (first use in this function) arch/ia64/kernel/machine_kexec.c:135: error: `NR_NODE_MEMBLKS' undeclared (first use in this function) arch/ia64/kernel/machine_kexec.c:136: error: invalid application of `sizeof' to incomplete type `node_memblk_s' arch/ia64/kernel/machine_kexec.c:137: error: dereferencing pointer to incomplete type arch/ia64/kernel/machine_kexec.c:138: error: dereferencing pointer to incomplete type make[1]: *** [arch/ia64/kernel/machine_kexec.o] Error 1 Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-10-17net: libertas sdio driverPierre Ossman6-0/+1140
Add driver for Marvell's Libertas 8385 and 8686 wifi chips. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Acked-by: Dan Williams <dcbw@redhat.com>
2007-10-17x86: delete vsyscall files during make cleanSam Ravnborg1-0/+4
make clean failed to delete a few files in x86/kernel. This is because kbuild does not see the correct/full kernel/Makefile. As a workaround until the Makefiles are merged specify the files to be deleted in the common Makefile. Reported by Mike Galbraith <efault@gmx.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Mike Galbraith <efault@gmx.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-17kbuild: fix typo SRCARCH in find_sourcesYinghai Lu1-4/+4
otherwise get the two copy file list in SRCARCH for cscope: C symbol: start_kernel File Function Line 0 proto.h <global> 11 extern void start_kernel(void ); 1 start_kernel.h <global> 10 extern asmlinkage void __init start_kernel(void ); 2 head32.c i386_start_kernel 37 start_kernel(); 3 head32.c i386_start_kernel 37 start_kernel(); 4 head64.c x86_64_start_kernel 85 start_kernel(); 5 head64.c x86_64_start_kernel 85 start_kernel(); 6 head_32.S options 199 cmpb $0,%cl #the first CPU calls start_kernel 7 head_32.S options 199 cmpb $0,%cl #the first CPU calls start_kernel 8 enlighten.c xen_start_kernel 1145 start_kernel(); 9 enlighten.c xen_start_kernel 1145 start_kernel(); a lguest.c lguest_init 1095 start_kernel(); b main.c start_kernel 513 asmlinkage void __init start_kernel(void ) after the patch: C symbol: start_kernel File Function Line 0 proto.h <global> 11 extern void start_kernel(void ); 1 start_kernel.h <global> 10 extern asmlinkage void __init start_kernel(void ); 2 head32.c i386_start_kernel 37 start_kernel(); 3 head64.c x86_64_start_kernel 85 start_kernel(); 4 head_32.S options 199 cmpb $0,%cl #the first CPU calls start_kernel 5 enlighten.c xen_start_kernel 1145 start_kernel(); 6 lguest.c lguest_init 1095 start_kernel(); 7 main.c start_kernel 513 asmlinkage void __init start_kernel(void ) Signed-off-by: Yinghai Lu <yinghai.lu@sun.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-179p: remove sysctlEric Van Hensbergen4-106/+0
A sysctl method was added to enable and disable debugging levels. After further review, it was decided that there are better approaches to doing this and the sysctl methodology isn't really desirable. This patch removes the sysctl code from 9p. Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2007-10-17mmc: at91_mci: cleanup: use MCI_ERRORSAndrew Victor1-3/+1
A small MMC driver cleanup. Use the defined AT91_MCI_ERRORS in at91_mci_completed_command() instead of specifying all the error bits individually. Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-10-17mmc: possible leak in mmc_read_ext_csdFlorin Malita1-1/+2
The exception path associated with an invalid ext_csd_struct returns without freeing ext_csd. Coverity CID 1909. Signed-off-by: Florin Malita Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-10-179p: fix bad kconfig cross-dependencyEric Van Hensbergen5-46/+67
This patch moves transport dynamic registration and matching to the net module to prevent a bad Kconfig dependency between the net and fs 9p modules. Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2007-10-179p: soften invalidation in loose_modeEric Van Hensbergen1-2/+4
Loose mode in 9p utilizes the page cache without respecting coherency with the server. Any writes previously invaldiated the entire mapping for a file. This patch softens the behavior to only invalidate the region of the actual write. Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2007-10-179p: attach-per-userLatchesar Ionkov9-72/+247
The 9P2000 protocol requires the authentication and permission checks to be done in the file server. For that reason every user that accesses the file server tree has to authenticate and attach to the server separately. Multiple users can share the same connection to the server. Currently v9fs does a single attach and executes all I/O operations as a single user. This makes using v9fs in multiuser environment unsafe as it depends on the client doing the permission checking. This patch improves the 9P2000 support by allowing every user to attach separately. The patch defines three modes of access (new mount option 'access'): - attach-per-user (access=user) (default mode for 9P2000.u) If a user tries to access a file served by v9fs for the first time, v9fs sends an attach command to the server (Tattach) specifying the user. If the attach succeeds, the user can access the v9fs tree. As there is no uname->uid (string->integer) mapping yet, this mode works only with the 9P2000.u dialect. - allow only one user to access the tree (access=<uid>) Only the user with uid can access the v9fs tree. Other users that attempt to access it will get EPERM error. - do all operations as a single user (access=any) (default for 9P2000) V9fs does a single attach and all operations are done as a single user. If this mode is selected, the v9fs behavior is identical with the current one. Signed-off-by: Latchesar Ionkov <lucho@ionkov.net> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2007-10-179p: rename uid and gid parametersLatchesar Ionkov4-14/+18
Change the names of 'uid' and 'gid' parameters to the more appropriate 'dfltuid' and 'dfltgid'. This also sets the default uid/gid to -2 (aka nfsnobody) Signed-off-by: Latchesar Ionkov <lucho@ionkov.net> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2007-10-179p: define session flagsLatchesar Ionkov3-17/+27
Create more general flags field in the v9fs_session_info struct and move the 'extended' flag as a bit in the flags. Signed-off-by: Latchesar Ionkov <lucho@ionkov.net> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2007-10-179p: Make transports dynamicEric Van Hensbergen12-285/+379
This patch abstracts out the interfaces to underlying transports so that new transports can be added as modules. This should also allow kernel configuration of transports without ifdef-hell. Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2007-10-17x86: fix kernel rebuild due to vsyscall falloutSam Ravnborg1-1/+1
Fix rebuild of kernel when there is no changes. This happened for i386. Using make V=2 hinted that the output files were not assigned to targets - fixed by this patch. Reported by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-17.gitignore update for x86 archDenis V. Lunev3-0/+3
This patch: - makes .gitignore files visible to git - makes arch/x86/kernel/vsyscall_32.lds and arch/i386/boot invisible Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-17x86: unify include/asm/debugreg_32/64.hThomas Gleixner4-142/+68
Almost identical except for the extra DR_LEN_8 and the different DR_CONTROL_RESERVED defines. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Conflicts: include/asm-x86/Kbuild
2007-10-17x86: unify include/asm/unwind_32/64.hThomas Gleixner3-30/+13
32bit has an extra UNW_FP define, which does not hurt. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2007-10-17x86: unify include/asm/types_32/64.hThomas Gleixner4-131/+67
Mostly the same. Make the few exceptions conditional. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Conflicts: include/asm-x86/types_32.h