aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* [IPV4/IPV6]: Fail registration if inet device construction failsHerbert Xu2007-07-31
| | | | | | | | | | Now that netdev notifications can fail, we can use this to signal errors during registration for IPv4/IPv6. In particular, if we fail to allocate memory for the inet device, we can fail the netdev registration. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Allow netdev REGISTER/CHANGENAME events to failHerbert Xu2007-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds code to allow errors to be passed up from event handlers of NETDEV_REGISTER and NETDEV_CHANGENAME. It also adds the notifier_from_errno/notifier_to_errnor helpers to pass the errno value up to the notifier caller. If an error is detected when a device is registered, it causes that operation to fail. A NETDEV_UNREGISTER will be sent to all event handlers. Similarly if NETDEV_CHANGENAME fails the original name is restored and a new NETDEV_CHANGENAME event is sent. As such all event handlers must be idempotent with respect to these events. When an event handler is registered NETDEV_REGISTER events are sent for all devices currently registered. Should any of them fail, we will send NETDEV_GOING_DOWN/NETDEV_DOWN/NETDEV_UNREGISTER events to that handler for the devices which have already been registered with it. The handler registration itself will fail. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET] loopback: Panic if registration failsHerbert Xu2007-07-31
| | | | | | | | | Because IPv4 and IPv6 both depend on the presence of the loopback device to function, failure in registration the loopback device should be fatal. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Take dev_base_lock when moving device name hash list entryHerbert Xu2007-07-31
| | | | | | | | | | | | | | When we added name-based hashing the dev_base_lock was designated as the lock to take when changing the name hash list. Unfortunately, because it was a preexisting lock that just happened to be taken in the right spots we neglected to take it in dev_change_name. The race can affect calles of __dev_get_by_name that do so without taking the RTNL. They may end up walking down the wrong hash chain and end up missing the device that they're looking for. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Call uninit if necessary in register_netdeviceHerbert Xu2007-07-31
| | | | | | | | | | This patch makes register_netdevice call dev->uninit if the regsitration fails after dev->init has completed successfully. Very few drivers use the init/uninit calls but at least one (drivers/net/wan/sealevel.c) may leak without this change. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [IPVS]: Use skb_forward_csumHerbert Xu2007-07-31
| | | | | | | | | As a path that forwards packets, IPVS should be using skb_forward_csum instead of directly setting ip_summed to CHECKSUM_NONE. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* [PKTGEN]: Add missing KERN_* tags to printk()s.David S. Miller2007-07-31
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* [BLUETOOTH] l2cap: don't mangle cmd.lenAl Viro2007-07-31
| | | | | | | | | Since nobody uses it after we convert it to host-endian, no need to do that at all. At that point l2cap is endian-clean. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BLUETOOTH]: pass (host-endian) cmd length as explicit argument to ↵Al Viro2007-07-31
| | | | | | | | l2cap_conf_req() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BLUETOOTH] l2cap: endianness annotationsAl Viro2007-07-31
| | | | | | | | no code changes, just documenting existing types Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [BLUETOOTH]: Fix endianness bug in l2cap_sock_listen()Al Viro2007-07-31
| | | | | | | | | | | | | | | | | | | | | | We loop through psm values, calling __l2cap_get_sock_by_addr(psm, ...) until we get NULL; then we set ->psm of our socket to htobs(psm). IOW, we find unused psm value and put it into our socket. So far, so good, but... __l2cap_get_sock_by_addr() compares its argument with ->psm of sockets. IOW, the entire thing works correctly only on little-endian. On big-endian we'll get "no socket with such psm" on the first iteration, since we won't find a socket with ->psm == 0x1001. We will happily conclude that 0x1001 is unused and slap htobs(0x1001) (i.e. 0x110) into ->psm of our socket. Of course, the next time around the same thing will repeat and we'll just get a fsckload of sockets with the same ->psm assigned. Fix: pass htobs(psm) to __l2cap_get_sock_by_addr() there. All other callers are already passing little-endian values and all places that store something in ->psm are storing little-endian. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [IRDA]: Fix rfcomm use-after-freeMarcel Holtmann2007-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adrian Bunk wrote: > Commit 8de0a15483b357d0f0b821330ec84d1660cadc4e added the following > use-after-free in net/bluetooth/rfcomm/tty.c: > > <-- snip --> > > ... > static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc) > { > ... > if (IS_ERR(dev->tty_dev)) { > list_del(&dev->list); > kfree(dev); > return PTR_ERR(dev->tty_dev); > } > ... > > <-- snip --> > > Spotted by the Coverity checker. really good catch. I fully overlooked that one. The attached patch should fix it. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [IPV6]: Don't update ADVMSS on routes where the MTU is not also updatedSimon Arlott2007-07-31
| | | | | | | | | The ADVMSS value was incorrectly updated for ALL routes when the MTU is updated because it's outside the effect of the if statement's condition. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET_DMA]: remove unused dma_memcpy_to_kernel_iovecShannon Nelson2007-07-31
| | | | | | | | | Al Viro pointed out that dma_memcpy_to_kernel_iovec() really was unreachable and thus unused. The code originally was there to support in-kernel dma needs, but since it remains unused, we'll pull it out. Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [TIPC]: fix tipc_link_create error handlingFlorian Westphal2007-07-31
| | | | | | | | | | | | if printbuf allocation or tipc_node_attach_link() fails, invalid references to the link are left in the associated node and bearer structures. Fix by allocating printbuf early and moving timer initialization and the addition of the new link to the b_ptr->links list after tipc_node_attach_link() succeeded. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: kernel-doc fixesRandy Dunlap2007-07-31
| | | | | | | | | | | | Fix kernel-doc omissions in net/: Warning(linux-2.6.23-rc1//net/core/dev.c:2728): No description found for parameter 'addr' Warning(linux-2.6.23-rc1//net/core/dev.c:2752): No description found for parameter 'addr' Warning(linux-2.6.23-rc1//net/core/dev.c:3839): No description found for parameter 'net_dma' Warning(linux-2.6.23-rc1//net/core/dev.c:3877): No description found for parameter 'state' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [TCP]: htcp - use measured rttStephen Hemminger2007-07-31
| | | | | | | | | | Change HTCP to use measured RTT rather than smooth RTT. Srtt is computed using the TCP receive timestamp options, so it is vulnerable to hostile receivers. To avoid any problems this might cause use the measured RTT instead. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [TCP]: cubic - eliminate use of receive time stampStephen Hemminger2007-07-31
| | | | | | | | | | | | | | Remove use of received timestamp option value from RTT calculation in Cubic. A hostile receiver may be returning a larger timestamp option than the original value. This would cause the sender to believe the malevolent receiver had a larger RTT and because Cubic tries to provide some RTT friendliness, the sender would then favor the liar. Instead, use the jiffie resolutionRTT value already computed and passed back after ack. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [TCP]: congestion control API pass RTT in microsecondsStephen Hemminger2007-07-31
| | | | | | | | | | | | | | | | | This patch changes the API for the callback that is done after an ACK is received. It solves a couple of issues: * Some congestion controls want higher resolution value of RTT (controlled by TCP_CONG_RTT_SAMPLE flag). These don't really want a ktime, but all compute a RTT in microseconds. * Other congestion control could use RTT at jiffies resolution. To keep API consistent the units should be the same for both cases, just the resolution should change. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6.23Linus Torvalds2007-07-31
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6.23: sh: Fix fs.h removal from mm.h regressions. sh: fix get_wchan() for SH kernels without framepointers sh: arch/sh/boot - fix shell usage rtc: rtc-sh: Correct sh_rtc_set_time() for some SH-3 parts. sh: remove support for sh7300 and solution engine 7300 sh: Add sh to the CC_OPTIMIZE_FOR_SIZE dependencies. sh: Kill off virt_to_bus()/bus_to_virt(). sh: sh-sci - fix SH7708 support sh: Restrict DSP support to specific CPUs. sh: Silence sq compile warning on sh4 nommu. sh: Kill the rest of the SE73180 cruft. sh: remove support for sh73180 and solution engine 73180 sh: remove old broken pint code sh: Reclaim beginning of P3 space for vmalloc area. sh: Fix Dreamcast DMA issues. sh: Add kmap_coherent()/kunmap_coherent() interface for SH-4.
| * sh: Fix fs.h removal from mm.h regressions.Paul Mundt2007-07-31
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: fix get_wchan() for SH kernels without framepointersDavid McCullough2007-07-26
| | | | | | | | | | | | | | | | Do not follow the frame pointers (/proc/X/task/1/stat) unless we were compiled with them. Signed-off-by: David McCullough <david_mccullough@au.securecomputing.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: arch/sh/boot - fix shell usageDavid McCullough2007-07-26
| | | | | | | | | | | | | | | | Fix the shell call to explicitly use bash, since they are bash specific and not all systems have bash as the default. Signed-off-by: David McCullough <david_mccullough@au.securecomputing.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * rtc: rtc-sh: Correct sh_rtc_set_time() for some SH-3 parts.Markus Brunner2007-07-26
| | | | | | | | | | | | | | | | | | | | | | Some SH-3 parts (SH7720 and SH7705 at least) need to have the start bit explicitly cleared, as the reset is not enough. This is safe across all parts, so simply clear the start bit in the sh_rtc_set_time() path. Signed-off-by: Markus Brunner <super.firetwister@gmail.com> Signed-off by: Mark Jonas <toertel@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: remove support for sh7300 and solution engine 7300Magnus Damm2007-07-26
| | | | | | | | | | | | | | | | | | This patch removes old dead code: - kill off sh7300 cpu support - get rid of broken solution engine 7300 board support Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Add sh to the CC_OPTIMIZE_FOR_SIZE dependencies.Paul Mundt2007-07-26
| | | | | | | | | | | | | | Presently we only use this with CONFIG_EXPERIMENTAL, but it is something that can be supported commonly. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Kill off virt_to_bus()/bus_to_virt().Paul Mundt2007-07-26
| | | | | | | | | | | | | | | | Wire up ARCH_NO_VIRT_TO_BUS, and kill off the remaining users. The dma-mapping code really wanted virt_to_phys()/phys_to_virt() anyways, there are no inherently special bus addresses. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: sh-sci - fix SH7708 supportMagnus Damm2007-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes sure the sci serial port driver compiles for sh7708. The approach taken is to treat the sh7708 as a subset of sh7706, sh7707, sh7709. sh7708 is very similar to sh7706, sh7707, sh7709, but only equipped with a single sci port. The platform data in setup-sh770x.c already limits the number of serial ports for sh7708 to a single one, so the non-existing scif ports pointed out in sh-sci.h will remain unused in case of sh7708. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Restrict DSP support to specific CPUs.Paul Mundt2007-07-26
| | | | | | | | | | | | | | | | | | Not all CPUs support the DSP, and this leads to problems when mixing and matching CPU types and DSP opcodes. Fix this up by only allowing CONFIG_SH_DSP to be enabled for the CPUs that explicitly have such a block. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Silence sq compile warning on sh4 nommu.Paul Mundt2007-07-26
| | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Kill the rest of the SE73180 cruft.Paul Mundt2007-07-26
| | | | | | | | | | | | | | There was a stray header, and the mach-type removal was also missed. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: remove support for sh73180 and solution engine 73180Magnus Damm2007-07-24
| | | | | | | | | | | | | | | | | | This patch removes old dead code: - kill off sh73180 cpu support - get rid of broken solution engine 73180 board support Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: remove old broken pint codeMagnus Damm2007-07-24
| | | | | | | | | | | | | | | | | | The code in arch/sh/kernel/cpu/irq/pint.c doesn't compile, so let's get rid of it to make space for a future pint implementation on top of intc. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Reclaim beginning of P3 space for vmalloc area.Paul Mundt2007-07-24
| | | | | | | | | | | | | | | | The first 1MB of P3 space was reserved and used for page colouring, as we've reworked that to use fixmaps, we can reclaim the space and hand it back to VMALLOC_START. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Fix Dreamcast DMA issues.Adrian McMenamin2007-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | | The current SH DMA API is somewhat broken, not correctly matching virtual channel to the correct SH DMAC. This wasn't noticeable when using g2 DMA for the sound driver - one channel 0 is as good as any other! - but caused the pvr2 driver to fail. This patch fixes the pvr2 problem and consequently fixes the sound driver to ensure it continues to function. Signed-off by: Adrian McMenamin <adrian@mcmen.demon.co.uk> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * sh: Add kmap_coherent()/kunmap_coherent() interface for SH-4.Paul Mundt2007-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | | This wires up kmap_coherent() and kunmap_coherent() on SH-4, and moves away from the p3map_mutex and reserved P3 space, opting to use fixmaps for colouring instead. The copy_user_page()/clear_user_page() implementations are moved to this, which fixes the nasty blowups with spinlock debugging as a result of having some of these calls nested under the page table lock. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh64-2.6Linus Torvalds2007-07-31
|\ \ | | | | | | | | | | | | | | | | | | * master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh64-2.6: sh64: Kill off virt_to_bus()/bus_to_virt(). sh64: Fix irq_intc build failure. sh64: Fix fs.h removal from mm.h regressions.
| * | sh64: Kill off virt_to_bus()/bus_to_virt().Paul Mundt2007-07-31
| | | | | | | | | | | | | | | | | | Follows the SH change. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh64: Fix irq_intc build failure.Paul Mundt2007-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Needs interrupt.h: CC arch/sh64/kernel/irq_intc.o arch/sh64/kernel/irq_intc.c: In function 'make_intc_irq': arch/sh64/kernel/irq_intc.c:179: error: implicit declaration of function 'disable_irq_nosync' make[1]: *** [arch/sh64/kernel/irq_intc.o] Error 1 Signed-off-by: Paul Mundt <lethal@linux-sh.org>
| * | sh64: Fix fs.h removal from mm.h regressions.Paul Mundt2007-07-31
| | | | | | | | | | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* | | Merge branch 'upstream-linus' of ↵Linus Torvalds2007-07-30
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 * 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: Fix a potential NULL pointer dereference in mace_interrupt() in drivers/net/pcmcia/nmclan_cs.c PATCH kernel 2.6.22] PCMCIA-NETDEV : modify smc91c92_cs.c to become SMP safe S2io: Increment received packet count correctly S2io: Fix crash when resetting adapter S2io: Mask spurious interrupts S2IO: Implementing review comments from old patches S2IO: Checking for the return value of pci map function S2IO: Removing MSI support from driver S2IO: Removing 3 buffer mode support from the driver netxen: drop redudant spinlock netxen: Fix interrupt handling for multiport adapters netxen: re-init station address after h/w init tulip: Remove tulip maintainer forcedeth: mac address correct gfar: Fix modpost warning lib8390: comment on locking by Alan Cox Fix a potential NULL pointer dereference in write_bulk_callback() in drivers/net/usb/pegasus.c
| * | | Fix a potential NULL pointer dereference in mace_interrupt() in ↵Micah Gruber2007-07-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drivers/net/pcmcia/nmclan_cs.c This patch fixes a potential null dereference bug where we dereference DEV before a null check. This patch simply moves the dereferencing after the null check. Signed-off-by: Micah Gruber <micah.gruber@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | PATCH kernel 2.6.22] PCMCIA-NETDEV : modify smc91c92_cs.c to become SMP safeKomuro2007-07-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | protect smc_start_xmit, smc_interrupt and media_check by spin_lock. Signed-off-by: Komuro <komurojun-mbn@nifty.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | S2io: Increment received packet count correctlyRamkrishna Vepa2007-07-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix to increment the received packet count correctly. (Resending; Removed HTML sections in the patch) Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | S2io: Fix crash when resetting adapterRamkrishna Vepa2007-07-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removed the call to pci_set_power_state to reset the adapter as it was resulting in system crash on some platforms. (Resending; Removed HTML sections in the patch) Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | S2io: Mask spurious interruptsRamkrishna Vepa2007-07-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Mask single and double bit ETQ ecc errors to inhibit spurious interrupts. (Resending; Removed HTML sections in the patch) Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | S2IO: Implementing review comments from old patchesVeena Parat2007-07-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Incorporated Jeff Garzik's comments on coding standards Signed-off-by: Veena Parat <veena.parat@neterion.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | S2IO: Checking for the return value of pci map functionVeena Parat2007-07-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Checking for the return value of pci map function - Implemented Francois Romieu's comments on eliminating code duplication using goto - Implemented Francois Romieu's comments on using a temporary variable for accessing statistics structure Signed-off-by: Veena Parat <veena.parat@neterion.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | S2IO: Removing MSI support from driverVeena Parat2007-07-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removed MSI support from driver - unused feature - Replaced request_mem_region with pci_request_regions Signed-off-by: Veena Parat <veena.parat@neterion.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | S2IO: Removing 3 buffer mode support from the driverVeena Parat2007-07-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removed 3 buffer mode support from driver - unused feature - Incorporated Jeff Garzik's comments on elimination of inline typecasting - Code cleanup : Removed a few extra spaces Signed-off-by: Veena Parat <veena.parat@neterion.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>