30 Jan, 2009

15 commits

  • As reported by Toralf Förster and Randy Dunlap.

    - http://linuxwimax.org/pipermail/wimax/2009-January/000460.html

    - http://lkml.org/lkml/2009/1/29/279

    The definitions needed for the wimax stack and i2400m driver debug
    infrastructure was, by mistake, compiled depending on CONFIG_DEBUG_FS
    (by them being placed in the debugfs.c files); thus the build broke in
    2.6.29-rc3 when debugging was enabled (CONFIG_WIMAX_DEBUG) and
    DEBUG_FS was disabled.

    These definitions are always needed if debug is enabled at compile
    time (independently of DEBUG_FS being or not enabled), so moving them
    to a file that is always compiled fixes the issue.

    Signed-off-by: Inaky Perez-Gonzalez
    Signed-off-by: David S. Miller

    Inaky Perez-Gonzalez
     
  • For kernel bugzilla #12537:
    http://bugzilla.kernel.org/show_bug.cgi?id=12537

    Free memory.

    Signed-off-by: Daniel Marjamäki
    Signed-off-by: David S. Miller

    Daniel Marjamäki
     
  • Based upon a report from Michael Tokarev :

    Just saw in dmesg:

    ioctl32(kvm:4408): Unknown cmd fd(9) cmd(800454cf){t:'T';sz:4} arg(ffc668e4) on /dev/net/tun

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Signed-off-by: Benjamin Zores
    Signed-off-by: David S. Miller

    Benjamin Zores
     
  • This documentation is old. Add a short note to describe why aliases
    are no long necessary, and remove the old contact/edit info.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     
  • It oopsd for me in skb_seq_read. addr2line said it was
    linux-2.6/net/core/skbuff.c:2228, which is this line:

    while (st->frag_idx < skb_shinfo(st->cur_skb)->nr_frags) {

    I added some printks in there and it looks like we hit this:

    } else if (st->root_skb == st->cur_skb &&
    skb_shinfo(st->root_skb)->frag_list) {
    st->cur_skb = skb_shinfo(st->root_skb)->frag_list;
    st->frag_idx = 0;
    goto next_skb;
    }

    Actually I did some testing and added a few printks and found that the
    st->cur_skb->data was 0 and hence the ptr used by iscsi_tcp was null.
    This caused the kernel panic.

    if (abs_offset < block_limit) {
    - *data = st->cur_skb->data + abs_offset;
    + *data = st->cur_skb->data + (abs_offset - st->stepped_offset);

    I enabled the debug_tcp and with a few printks found that the code did
    not go to the next_skb label and could find that the sequence being
    followed was this -

    It hit this if condition -

    if (st->cur_skb->next) {
    st->cur_skb = st->cur_skb->next;
    st->frag_idx = 0;
    goto next_skb;

    And so, now the st pointer is shifted to the next skb whereas actually
    it should have hit the second else if first since the data is in the
    frag_list.

    else if (st->root_skb == st->cur_skb &&
    skb_shinfo(st->root_skb)->frag_list) {
    st->cur_skb = skb_shinfo(st->root_skb)->frag_list;
    goto next_skb;
    }

    Reversing the two conditions the attached patch fixes the issue for me
    on top of Herbert's patches.

    Signed-off-by: Shyam Iyer
    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Shyam Iyer
     
  • The frag_list handling was broken in skb_seq_read:

    1) We didn't add the stepped offset when looking at the head
    are of fragments other than the first.

    2) We didn't take the stepped offset away when setting the data
    pointer in the head area.

    3) The frag index wasn't reset.

    This patch fixes both issues.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • Reducing jumbo ring size below 1024 reduces throughput for old
    firmwares (3.4.216 and older) running on older (NX2031) chip,
    so restore it back to 1024.

    This was reduced in commit 32ec803348b4d5f1353e1d7feae30880b8b3e342
    ("netxen: reduce memory footprint").

    Raising jumbo ring size from 512 to 1024, adds ~4MB per port, but
    there's still big saving because of original patch (~20MB per port).

    Signed-off-by: Dhananjay Phadke
    Signed-off-by: David S. Miller

    Dhananjay Phadke
     
  • David S. Miller
     
  • ath5k_config updates the software context without taking sc->lock.

    Changes-licensed-under: 3-Clause-BSD

    Signed-off-by: Bob Copeland
    Acked-by: Nick Kossifidis
    Signed-off-by: John W. Linville

    Bob Copeland
     
  • When CONFIG_CFG80211_REG_DEBUG is enabled and an intersection
    occurs we are printing the regulatory domain passed by CRDA
    and indicating its the intersected regulatory domain. Lets fix
    this and print the intersection as originally intended.

    Signed-off-by: Luis R. Rodriguez
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Luis R. Rodriguez
     
  • This fixes two issues with the sanity check loop when processing
    the country IE:

    1. Do not use frequency for the current subband channel check,
    this was a big fat typo.
    2. Apply the 5 GHz 4-channel steps when considering max channel
    on each subband as was done with a recent patch.

    Signed-off-by: Luis R. Rodriguez
    Signed-off-by: John W. Linville

    Luis R. Rodriguez
     
  • The patch fixes memcpy to NULL address when the ucode DMA allocation failure.

    This is a fix to bug
    http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1861

    Signed-off-by: Zhu Yi
    Signed-off-by: Reinette Chatre
    Signed-off-by: John W. Linville

    Zhu, Yi
     
  • After reports of poor performance, a review of the latest vendor driver
    (rtl8187_linux_26.1025.0328.2007) for RTL8187L devices was undertaken.

    A difference was found in the code used to index the OFDM power tables. When
    the Linux driver was changed, my unit works at a much greater range than
    before. I think this fixes Bugzilla #12380 and has been tested by at least
    two other users.

    Signed-off-by: Larry Finger
    Tested-by: Martín Ernesto Barreyro
    Cc: Stable
    Signed-off-by: John W. Linville

    Larry Finger
     
  • His email address keeps bouncing, and he's not interested in mac80211
    patches etc. anyway.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

28 Jan, 2009

5 commits

  • The kernel manages this value internally, as necessary, as
    VIFs are added/removed and as multicast routers are registered
    and deregistered.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • This patch addresses the IPv6 multicast routing issues described
    below. It was tested with XORP 1.4/1.5 as the IPv6 PIM-SM routing
    daemon against FreeBSD peers.

    net/ipv6/ip6_input.c:

    - Don't try to forward link-local multicast packets.

    - Don't reset skb2->dev before calling ip6_mr_input() so packets can
    be identified as coming from the PIM register vif properly.

    net/ipv6/ip6mr.c:

    - Fix incoming PIM register messages processing:

    * The IPv6 pseudo-header should be included when checksumming PIM
    messages (RFC 4601 section 4.9; RFC 3973 section 4.7.1).

    * Packets decapsulated from PIM register messages should have
    skb->protocol ETH_P_IPV6.

    - Enable/disable IPv6 multicast forwarding on the corresponding
    interface when a routing daemon adds/removes a multicast virtual
    interface.

    - Remove incorrect skb_pull() to fix userspace signaling.

    - Enable/disable global IPv6 multicast forwarding when an IPv6
    multicast routing socket is opened/closed.

    net/ipv6/route.c:

    - Don't use strict routing logic for packets decapsulated from PIM
    register messages (similar to disabling rp_filter for the IPv4
    case).

    Signed-off-by: Thomas Goff
    Reviewed-by: Fred Templin
    Signed-off-by: David S. Miller

    Thomas Goff
     
  • This patch fixes the xfrm reverse flow lookup for icmp6 so that icmp6 packets
    don't get lost over ipsec tunnels. Similar patch is in RHEL5 kernel for a quite
    long time and I do not see why it isn't in mainline.

    Signed-off-by: Jiri Pirko
    Acked-by: Herbert Xu
    Signed-off-by: David S. Miller

    Jiri Pirko
     
  • In commit 9db66bdcc83749affe61c61eb8ff3cf08f42afec (net: convert
    TCP/DCCP ehash rwlocks to spinlocks), I forgot to change one
    occurrence of rwlock_t to spinlock_t

    I believe sizeof(raw_spinlock_t) might be > 0 on !CONFIG_SMP if
    CONFIG_DEBUG_SPINLOCK while sizeof(raw_rwlock_t) should be 0 in this
    case.

    Fortunatly, CONFIG_DEBUG_SPINLOCK adds fields to both spinlock_t and
    rwlock_t, but at this might change in the future (being able to debug
    spinlocks but not rwlocks for example), better to be safe.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • A nasty bug was found where an MTU change (or anything else that caused a
    reset) could race with the interrupt code. The interrupt code was entered
    by a shared interrupt during the MTU change.

    This change prevents the interrupt code from running while the driver is in
    the middle of its reset path.

    Signed-off-by: Jesse Brandeburg
    Signed-off-by: David S. Miller

    Jesse Brandeburg
     

27 Jan, 2009

20 commits

  • tcp_splice_data_recv has two lengths to consider: the len parameter it
    gets from tcp_read_sock, which specifies the amount of data in the skb,
    and rd_desc->count, which is the amount of data the splice caller still
    wants. Currently it passes just the latter to skb_splice_bits, which then
    splices min(rd_desc->count, skb->len - offset) bytes.

    Most of the time this is fine, except when the skb contains urgent data.
    In that case len goes only up to the urgent byte and is less than
    skb->len - offset. By ignoring len tcp_splice_data_recv may a) splice
    data tcp_read_sock told it not to, b) return to tcp_read_sock a value > len.

    Now, tcp_read_sock doesn't handle used > len and leaves the socket in a
    bad state (both sk_receive_queue and copied_seq are bad at that point)
    resulting in duplicated data and corruption.

    Fix by passing min(rd_desc->count, len) to skb_splice_bits.

    Signed-off-by: Dimitris Michailidis
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Dimitris Michailidis
     
  • drivers/net/r6040.c:441: warning: unused variable 'pdev'

    Signed-off-by: Manish Katiyar
    Signed-off-by: David S. Miller

    Manish Katiyar
     
  • commit 9088c5609584684149f3fb5b065aa7f18dcb03ff
    (udp: Improve port randomization) introduced a regression for UDP bind() syscall
    to null port (getting a random port) in case lot of ports are already in use.

    This is because we do about 28000 scans of very long chains (220 sockets per chain),
    with many spin_lock_bh()/spin_unlock_bh() calls.

    Fix this using a bitmap (64 bytes for current value of UDP_HTABLE_SIZE)
    so that we scan chains at most once.

    Instead of 250 ms per bind() call, we get after patch a time of 2.9 ms

    Based on a report from Vitaly Mayatskikh

    Reported-by: Vitaly Mayatskikh
    Signed-off-by: Eric Dumazet
    Tested-by: Vitaly Mayatskikh
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Without this fix, virtio_net makes incorrect usage of scatterlists. It sets
    the end of the scatterlist chain after the first element, despite the fact
    that more entries come after it.

    If you try to run dma_map_sg() on one of the scatterlists given to you by
    add_buf(), you will get a null pointer oops.

    Signed-off-by: Ira W. Snyder
    Signed-off-by: Rusty Russell
    Signed-off-by: David S. Miller

    Ira W. Snyder
     
  • * master.kernel.org:/home/rmk/linux-2.6-arm: (22 commits)
    [ARM] fix section-based ioremap
    [NET] am79c961a: fix spin_lock usage
    [ARM] omap: usb: thou shalt not provide empty release functions
    [ARM] omap: watchdog: allow OMAP watchdog driver on OMAP34xx platforms
    [ARM] 5369/1: omap mmc: Add new omap hsmmc controller for 2430 and 34xx, v3
    [ARM] clkdev: fix clock matching
    [ARM] 5370/1: at91: fix rm9200 watchdog
    [ARM] 5368/1: arch/arm/mach-davinci/usb.c buildfix
    [ARM] 5365/1: s3cmci: Use new include path of dma.h
    [ARM] fix StrongARM-11x0 page copy implementation
    [ARM] omap: ensure OMAP drivers pass a struct device to clk_get()
    ARM: OMAP: Fix compile for h3 MMC
    ARM: OMAP: Remove unused platform devices, v3
    ARM: OMAP: Fix ASoC by enabling writes to XCCR and RCCR McBSP registers, v3
    ARM: OMAP: Fix OSK ASoC by registering I2C board info for tlvaic23
    ARM: OMAP: remove duplicated #include's
    ARM: OMAP: Fix DMA CCR programming for request line > 63, v3
    ARM: OMAP: Fix gpio.c compile on 15xx with CONFIG_DEBUGFS
    ARM: OMAP: Fix compile for beagle
    ARM: OMAP: Fix gpio by switching to generic gpio calls, v2
    ...

    Linus Torvalds
     
  • * 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
    i2c: Warn on deprecated binding model use
    eeprom: More consistent symbol names
    eeprom: Move 93cx6 eeprom driver to /drivers/misc/eeprom
    spi: Move at25 (for SPI eeproms) to /drivers/misc/eeprom
    i2c: Move old eeprom driver to /drivers/misc/eeprom
    i2c: Move at24 to drivers/misc/eeprom
    i2c: Quilt tree has moved
    i2c: Delete many unused adapter IDs
    i2c: Delete 10 unused driver IDs

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
    kbuild: fix kbuild.txt typos
    kbuild: print usage with no arguments in scripts/config
    Revert "kbuild: strip generated symbols from *.ko"

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (92 commits)
    gianfar: Revive VLAN support
    vlan: Export symbols as non GPL symbols.
    bnx2x: tx_has_work should not wait for FW
    netxen: reduce memory footprint
    netxen: fix vlan tso/checksum offload
    net: Fix linux/if_frad.h's suitability for userspace.
    net: Move config NET_NS to from net/Kconfig to init/Kconfig
    isdn: Fix missing ifdef in isdn_ppp
    networking: document "nc" in addition to "netcat" in netconsole.txt
    e1000e: workaround hw errata
    af_key: initialize xfrm encap_oa
    virtio_net: Fix MAX_PACKET_LEN to support 802.1Q VLANs
    lcs: fix compilation for !CONFIG_IP_MULTICAST
    rtl8187: Add termination packet to prevent stall
    iwlwifi: fix rs_get_rate WARN_ON()
    p54usb: fix packet loss with first generation devices
    sctp: Fix another socket race during accept/peeloff
    sctp: Properly timestamp outgoing data chunks for rtx purposes
    sctp: Correctly start rtx timer on new packet transmissions.
    sctp: Fix crc32c calculations on big-endian arhes.
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
    sparc64: Fix DAX handling via userspace access from kernel.
    sparc64: Annotate sparc64 specific syscalls with SYSCALL_DEFINEx()
    [CVE-2009-0029] sparc: Enable syscall wrappers for 64-bit
    sparc64: Initialize FHC/CLOCK LED platform_device 'id' field correctly.
    sparc64: fix modpost failure
    sparc64: fix readout of cpu/fpu type

    Linus Torvalds
     
  • commit 77ecaf2d5a8bfd548eed3f05c1c2e6573d5de4ba ("gianfar: Fix VLAN
    HW feature related frame/buffer size calculation") wrongly removed
    priv->vlgrp assignment, and now priv->vlgrp is always NULL.

    This patch fixes the issue, plus fixes following sparse warning
    introduced by the same commit:
    gianfar.c:1406:13: warning: context imbalance in 'gfar_vlan_rx_register' - wrong count at exit

    gfar_vlan_rx_register() checks for "if (old_grp == grp)" and tries
    to return w/o dropping the lock.

    According to net/8021q/vlan.c VLAN core issues rx_register() callback:
    1. In register_vlan_dev() only on a newly created group;
    2. In unregister_vlan_dev() only if the group becomes empty.

    Thus the check in the gianfar driver isn't needed.

    Signed-off-by: Anton Vorontsov
    Acked-by: Andy Fleming
    Signed-off-by: David S. Miller

    Anton Vorontsov
     
  • In previous kernels, any kernel module could get access to the
    'real-device' and the VLAN-ID for a particular VLAN. In more recent
    kernels, the code was restructured such that this is hard to do
    without accessing private .h files for any module that cannot use
    GPL-only symbols.

    Attached is a patch to once again allow non-GPL modules the ability to
    access the real-device and VLAN id for VLANs.

    Signed-off-by: Ben Greear
    Acked-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Ben Greear
     
  • The current tx_has_work waited until all packets sent by the driver
    are marked as completed by the FW. This is too greedy and it causes
    the bnx2x_poll to spin in vain. The driver should only check that all
    packets FW already completed are freed - only in unload flow the
    driver should make sure that transmit queue is empty

    Signed-off-by: Vladislav Zolotarov
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Vladislav Zolotarov
     
  • o reduce rx ring size from 8192 to 4096.
    o cut down old huge lro buffers.

    Signed-off-by: Dhananjay Phadke
    Signed-off-by: David S. Miller

    Dhananjay Phadke
     
  • o set netdev->vlan_features appropriately.
    o fix tso descriptor initialization for vlan case.

    Signed-off-by: Dhananjay Phadke
    Signed-off-by: David S. Miller

    Dhananjay Phadke
     
  • The userspace interfaces are protected by CONFIG_* ifdefs
    and that of course can't work.

    Reported by Jaswinder Singh Rajput.

    Signed-off-by: Krzysztof Hałasa
    Signed-off-by: David S. Miller

    Krzysztof Hałasa
     
  • Make NET_NS available underneath the generic Namespaces config option
    since all of the other namespace options are there.

    Signed-off-by: Matt Helsley
    Acked-by: Serge Hallyn
    Signed-off-by: David S. Miller

    Matt Helsley
     
  • The following patch fixes a warning caused by a missing ifdef in
    isdn_ppp.c. A function was defined, but never used if CONFIG_IPPP_FILTER
    was not defined.

    The warning was: 'get_filter' defined but not used
    Patch is against 2.6.28.1

    Signed-off-by: Daniele Venzano
    Acked-by: Karsten Keil
    Signed-off-by: David S. Miller

    Daniele Venzano
     
  • Let the kernel developers know that i2c_attach_client() and
    i2c_detach_client() are deprecated and should no longer be used.
    Drivers using these should be converted to the standard device
    driver binding model (probe and remove methods.)

    Signed-off-by: Jean Delvare
    Acked-by: Ben Dooks

    Jean Delvare
     
  • Now that all EEPROM drivers live in the same place, let's harmonize
    their symbol names.

    Also fix eeprom's dependencies, it definitely needs sysfs, and is no
    longer experimental after many years in the kernel tree.

    Signed-off-by: Jean Delvare
    Acked-by: Wolfram Sang
    Cc: David Brownell

    Jean Delvare
     
  • Signed-off-by: Wolfram Sang
    Signed-off-by: Jean Delvare

    Wolfram Sang