1. 18 Jun, 2008 19 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · d83b14c0
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (43 commits)
        netlink: genl: fix circular locking
        Revert "mac80211: Use skb_header_cloned() on TX path."
        af_unix: fix 'poll for write'/ connected DGRAM sockets
        tun: Proper handling of IPv6 header in tun driver when TUN_NO_PI is set
        atl1: relax eeprom mac address error check
        net/enc28j60: low power mode
        net/enc28j60: section fix
        sky2: 88E8040T pci device id
        netxen: download firmware in pci probe
        netxen: cleanup debug messages
        netxen: remove global physical_port array
        netxen: fix portnum for hp mezz cards
        ibm_newemac: select CRC32 in Kconfig
        xfrm: fix fragmentation for ipv4 xfrm tunnel
        netfilter: nf_conntrack_h323: fix module unload crash
        netfilter: nf_conntrack_h323: fix memory leak in module initialization error path
        netfilter: nf_nat: fix RCU races
        atm: [he] send idle cells instead of unassigned when in SDH mode
        atm: [he] limit queries to the device's register space
        atm: [br2864] fix routed vcmux support
        ...
      d83b14c0
    • Patrick McHardy's avatar
      netlink: genl: fix circular locking · 6d1a3fb5
      Patrick McHardy authored
      genetlink has a circular locking dependency when dumping the registered
      families:
      
      - dump start:
      genl_rcv()            : take genl_mutex
      genl_rcv_msg()        : call netlink_dump_start() while holding genl_mutex
      netlink_dump_start(),
      netlink_dump()        : take nlk->cb_mutex
      ctrl_dumpfamily()     : try to detect this case and not take genl_mutex a
                              second time
      
      - dump continuance:
      netlink_rcv()         : call netlink_dump
      netlink_dump          : take nlk->cb_mutex
      ctrl_dumpfamily()     : take genl_mutex
      
      Register genl_lock as callback mutex with netlink to fix this. This slightly
      widens an already existing module unload race, the genl ops used during the
      dump might go away when the module is unloaded. Thomas Graf is working on a
      seperate fix for this.
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6d1a3fb5
    • David S. Miller's avatar
      Revert "mac80211: Use skb_header_cloned() on TX path." · 3a5be7d4
      David S. Miller authored
      This reverts commit 608961a5.
      
      The problem is that the mac80211 stack not only needs to be able to
      muck with the link-level headers, it also might need to mangle all of
      the packet data if doing sw wireless encryption.
      
      This fixes kernel bugzilla #10903.  Thanks to Didier Raboud (for the
      bugzilla report), Andrew Prince (for bisecting), Johannes Berg (for
      bringing this bisection analysis to my attention), and Ilpo (for
      trying to analyze this purely from the TCP side).
      
      In 2.6.27 we can take another stab at this, by using something like
      skb_cow_data() when the TX path of mac80211 ends up with a non-NULL
      tx->key.  The ESP protocol code in the IPSEC stack can be used as a
      model for implementation.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3a5be7d4
    • Rainer Weikusat's avatar
      af_unix: fix 'poll for write'/ connected DGRAM sockets · 3c73419c
      Rainer Weikusat authored
      The unix_dgram_sendmsg routine implements a (somewhat crude)
      form of receiver-imposed flow control by comparing the length of the
      receive queue of the 'peer socket' with the max_ack_backlog value
      stored in the corresponding sock structure, either blocking
      the thread which caused the send-routine to be called or returning
      EAGAIN. This routine is used by both SOCK_DGRAM and SOCK_SEQPACKET
      sockets. The poll-implementation for these socket types is
      datagram_poll from core/datagram.c. A socket is deemed to be writeable
      by this routine when the memory presently consumed by datagrams
      owned by it is less than the configured socket send buffer size. This
      is always wrong for connected PF_UNIX non-stream sockets when the
      abovementioned receive queue is currently considered to be full.
      'poll' will then return, indicating that the socket is writeable, but
      a subsequent write result in EAGAIN, effectively causing an
      (usual) application to 'poll for writeability by repeated send request
      with O_NONBLOCK set' until it has consumed its time quantum.
      
      The change below uses a suitably modified variant of the datagram_poll
      routines for both type of PF_UNIX sockets, which tests if the
      recv-queue of the peer a socket is connected to is presently
      considered to be 'full' as part of the 'is this socket
      writeable'-checking code. The socket being polled is additionally
      put onto the peer_wait wait queue associated with its peer, because the
      unix_dgram_sendmsg routine does a wake up on this queue after a
      datagram was received and the 'other wakeup call' is done implicitly
      as part of skb destruction, meaning, a process blocked in poll
      because of a full peer receive queue could otherwise sleep forever
      if no datagram owned by its socket was already sitting on this queue.
      Among this change is a small (inline) helper routine named
      'unix_recvq_full', which consolidates the actual testing code (in three
      different places) into a single location.
      Signed-off-by: default avatarRainer Weikusat <rweikusat@mssgmbh.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3c73419c
    • David S. Miller's avatar
    • Ang Way Chuang's avatar
      tun: Proper handling of IPv6 header in tun driver when TUN_NO_PI is set · f09f7ee2
      Ang Way Chuang authored
      By default, tun.c running in TUN_TUN_DEV mode will set the protocol of
      packet to IPv4 if TUN_NO_PI is set. My program failed to work when I
      assumed that the driver will check the first nibble of packet,
      determine IP version and set the appropriate protocol.
      Signed-off-by: default avatarAng Way Chuang <wcang@nav6.org>
      Acked-by: default avatarMax Krasnyansky <maxk@qualcomm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f09f7ee2
    • Radu Cristescu's avatar
      atl1: relax eeprom mac address error check · 58c7821c
      Radu Cristescu authored
      The atl1 driver tries to determine the MAC address thusly:
      
      	- If an EEPROM exists, read the MAC address from EEPROM and
      	  validate it.
      	- If an EEPROM doesn't exist, try to read a MAC address from
      	  SPI flash.
      	- If that fails, try to read a MAC address directly from the
      	  MAC Station Address register.
      	- If that fails, assign a random MAC address provided by the
      	  kernel.
      
      We now have a report of a system fitted with an EEPROM containing all
      zeros where we expect the MAC address to be, and we currently handle
      this as an error condition.  Turns out, on this system the BIOS writes
      a valid MAC address to the NIC's MAC Station Address register, but we
      never try to read it because we return an error when we find the all-
      zeros address in EEPROM.
      
      This patch relaxes the error check and continues looking for a MAC
      address even if it finds an illegal one in EEPROM.
      Signed-off-by: default avatarRadu Cristescu <advantis@gmx.net>
      Signed-off-by: default avatarJay Cliburn <jacliburn@bellsouth.net>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      58c7821c
    • David Brownell's avatar
      net/enc28j60: low power mode · 7dac6f8d
      David Brownell authored
      Keep enc28j60 chips in low-power mode when they're not in use.
      At typically 120 mA, these chips run hot even when idle; this
      low power mode cuts that power usage by a factor of around 100.
      
      This version provides a generic routine to poll a register until
      its masked value equals some value ... e.g. bit set or cleared.
      It's basically what the previous wait_phy_ready() did, but this
      version is generalized to support the handshaking needed to
      enter and exit low power mode.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: default avatarClaudio Lanconelli <lanconelli.claudio@eptar.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      7dac6f8d
    • David Brownell's avatar
      net/enc28j60: section fix · 6fd65882
      David Brownell authored
      Minor bugfixes to the enc28j60 driver ... wrong section marking,
      indentation, and bogus use of spi_bus_type.
      Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Acked-by: default avatarClaudio Lanconelli <lanconelli.claudio@eptar.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      6fd65882
    • Stephen Hemminger's avatar
      sky2: 88E8040T pci device id · a3b4fced
      Stephen Hemminger authored
      Missed one pci id for 88E8040T.
      Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      a3b4fced
    • Dhananjay Phadke's avatar
      netxen: download firmware in pci probe · 439b454e
      Dhananjay Phadke authored
      Downloading firmware in pci probe allows recovery in case of
      firmware failure by reloading the driver.
      
      Also reduced delays in firmware load.
      Signed-off-by: default avatarDhananjay Phadke <dhananjay@netxen.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      439b454e
    • Dhananjay Phadke's avatar
      netxen: cleanup debug messages · dcd56fdb
      Dhananjay Phadke authored
      o Remove unnecessary debug prints and functions.
      o Explicitly specify pci class (0x020000) to avoid enabling
        management function.
      Signed-off-by: default avatarDhananjay Phadke <dhananjay@netxen.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      dcd56fdb
    • Dhananjay Phadke's avatar
      netxen: remove global physical_port array · 3276fbad
      Dhananjay Phadke authored
      Store physical port number in netxen_adapter structure.
      Signed-off-by: default avatarDhananjay Phadke <dhananjay@netxen.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      3276fbad
    • Dhananjay Phadke's avatar
      netxen: fix portnum for hp mezz cards · dc515f2e
      Dhananjay Phadke authored
      This fixes a the issue where logical port number is set incorrectly
      for HP blade mezz cards.
      Signed-off-by: default avatarDhananjay Phadke <dhananjay@netxen.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      dc515f2e
    • Josh Boyer's avatar
      ibm_newemac: select CRC32 in Kconfig · 8b8091fb
      Josh Boyer authored
      The ibm_newemac driver requires ether_crc to be defined.  Apparently it is
      possible to generate a .config without CONFIG_CRC32 set which causes the
      following link errors if IBM_NEW_EMAC is selected:
      
        LD      .tmp_vmlinux1
      drivers/built-in.o: In function `emac_hash_mc':
      core.c:(.text+0x2f524): undefined reference to `crc32_le'
      core.c:(.text+0x2f528): undefined reference to `bitrev32'
      make: *** [.tmp_vmlinux1] Error 1
      
      This patch has IBM_NEW_EMAC select CRC32 so we don't hit this error.
      Signed-off-by: default avatarJosh Boyer <jwboyer@linux.vnet.ibm.com>
      Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
      8b8091fb
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 952f4a0a
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: appletouch - implement reset-resume logic
        Input: i8042 - retry failed CTR writes when resuming
        Input: i8042 - add Fujitsu-Siemens Amilo Pro V2030 to nomux table
        Input: pcspkr - remove negative dependency on snd-pcsp
      
      Manually fixed up trivial conflict in drivers/usb/core/quirks.c
      952f4a0a
    • Miklos Szeredi's avatar
      fuse: fix thinko in max I/O size calucation · f948d564
      Miklos Szeredi authored
      Use max not min to enforce a lower limit on the max I/O size.
      
      This bug was introduced by "fuse: fix max i/o size calculation" (commit
      e5d9a0df).
      
      Thanks to Brian Wang for noticing.
      Reported-by: default avatarBrian Wang <ywang221@hotmail.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      Acked-by: default avatarSzabolcs Szakacsits <szaka@ntfs-3g.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f948d564
    • Eduard - Gabriel Munteanu's avatar
      Unignore vmlinux.lds.h from Git. · cd50e892
      Eduard - Gabriel Munteanu authored
      Added !vmlinux.lds.h to .gitignore because it would otherwise be ignored.
      Signed-off-by: default avatarEduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
      Acked-by: default avatarMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cd50e892
    • Linus Torvalds's avatar
      x86-64: Fix "bytes left to copy" return value for copy_from_user() · 42a886af
      Linus Torvalds authored
      Most users by far do not care about the exact return value (they only
      really care about whether the copy succeeded in its entirety or not),
      but a few special core routines actually care deeply about exactly how
      many bytes were copied from user space.
      
      And the unrolled versions of the x86-64 user copy routines would
      sometimes report that it had copied more bytes than it actually had.
      
      Very few uses actually have partial copies to begin with, but to make
      this bug even harder to trigger, most x86 CPU's use the "rep string"
      instructions for normal user copies, and that version didn't have this
      issue.
      
      To make it even harder to hit, the one user of this that really cared
      about the return value (and used the uncached version of the copy that
      doesn't use the "rep string" instructions) was the generic write
      routine, which pre-populated its source, once more hiding the problem by
      avoiding the exception case that triggers the bug.
      
      In other words, very special thanks to Bron Gondwana who not only
      triggered this, but created a test-program to show it, and bisected the
      behavior down to commit 08291429 ("mm:
      fix pagecache write deadlocks") which changed the access pattern just
      enough that you can now trigger it with 'writev()' with multiple
      iovec's.
      
      That commit itself was not the cause of the bug, it just allowed all the
      stars to align just right that you could trigger the problem.
      
      [ Side note: this is just the minimal fix to make the copy routines
        (with __copy_from_user_inatomic_nocache as the particular version that
        was involved in showing this) have the right return values.
      
        We really should improve on the exceptional case further - to make the
        copy do a byte-accurate copy up to the exact page limit that causes it
        to fail.  As it is, the callers have to do extra work to handle the
        limit case gracefully. ]
      Reported-by: default avatarBron Gondwana <brong@fastmail.fm>
      Cc: Nick Piggin <npiggin@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      
       (which didn't have this problem), and since
      most users that do the carethis was very hard to trigger, but
      42a886af
  2. 17 Jun, 2008 17 commits
  3. 16 Jun, 2008 4 commits