1. 25 11月, 2008 4 次提交
  2. 24 11月, 2008 2 次提交
  3. 22 11月, 2008 4 次提交
    • C
      net: Fix memory leak in the proto_register function · 7e56b5d6
      Catalin Marinas 提交于
      If the slub allocator is used, kmem_cache_create() may merge two or more
      kmem_cache's into one but the cache name pointer is not updated and
      kmem_cache_name() is no longer guaranteed to return the pointer passed
      to the former function. This patch stores the kmalloc'ed pointers in the
      corresponding request_sock_ops and timewait_sock_ops structures.
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      Acked-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Reviewed-by: NChristoph Lameter <cl@linux-foundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7e56b5d6
    • P
      tcp: Do not use TSO/GSO when there is urgent data · 33cf71ce
      Petr Tesarik 提交于
      This patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=12014
      
      Since most (if not all) implementations of TSO and even the in-kernel
      software GSO do not update the urgent pointer when splitting a large
      segment, it is necessary to turn off TSO/GSO for all outgoing traffic
      with the URG pointer set.
      
      Looking at tcp_current_mss (and the preceding comment) I even think
      this was the original intention. However, this approach is insufficient,
      because TSO/GSO is turned off only for newly created frames, not for
      frames which were already pending at the arrival of a message with
      MSG_OOB set. These frames were created when TSO/GSO was enabled,
      so they may be large, and they will have the urgent pointer set
      in tcp_transmit_skb().
      
      With this patch, such large packets will be fragmented again before
      going to the transmit routine.
      
      As a side note, at least the following NICs are known to screw up
      the urgent pointer in the TCP header when doing TSO:
      
      	Intel 82566MM (PCI ID 8086:1049)
      	Intel 82566DC (PCI ID 8086:104b)
      	Intel 82541GI (PCI ID 8086:1076)
      	Broadcom NetXtreme II BCM5708 (PCI ID 14e4:164c)
      Signed-off-by: NPetr Tesarik <ptesarik@suse.cz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      33cf71ce
    • R
      net/hp-plus: fix link errors · 38ae07e4
      Randy Dunlap 提交于
      Fix hp-plus driver link errors.
      Builds as loadable module and kernel image driver.
      All drivers that use 8390.o or 8390p.o that will build on
      i386 with MCA/PCI/EISA/ISA were built successfully both
      =m and =y.
      
      drivers/built-in.o: In function `hpp_open':
      hp-plus.c:(.text+0xac06c): undefined reference to `eip_interrupt'
      hp-plus.c:(.text+0xac0d7): undefined reference to `eip_open'
      drivers/built-in.o: In function `hpp_close':
      hp-plus.c:(.text+0xac1bb): undefined reference to `eip_close'
      drivers/built-in.o: In function `hpp_probe1':
      hp-plus.c:(.init.text+0xa98a): undefined reference to `NS8390p_init'
      drivers/built-in.o: In function `hp_plus_probe':
      (.init.text+0xa9fe): undefined reference to `__alloc_eip_netdev'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      38ae07e4
    • C
      axnet_cs / pcnet_cs: moving PCMCIA_DEVICE_PROD_ID for Netgear FA411 · 208fbec5
      Cord Walter 提交于
      Hi,
      
      after noticing that my Netgear FA411 (PCMCIA-NIC) [1] stopped working with
      the release of the 2.6.25 kernel (sidux-version), I checked the
      respective driver sources and noticed that the pcnet_cs driver bailed
      out with "use axnet_cs instead" for the Netgear FA411, but axnet_cs
      doesn't claim this ID.
      
      I compiled a kernel with the PCMCIA-ID for the netgear card moved to
      axnet_cs from pcnet_cs which worked. I then contacted sidux-kernel
      maintainer Stefan Lippers-Hollmann who turned the info into this patch
      and integrated it into the kernel:
      
      <http://svn.berlios.de/svnroot/repos/fullstory/linux-sidux-2.6/trunk/debian/patches/features/2.6.27.4_PCMCIA_move-PCMCIA-ID-for-Netgear-FA411-from-pcnet_cs-to-axnet_cs.patch>
      
      This works for me and AFAIK there were no reports of any breakage for
      other devices on sidux-support.
      
      This looks like a trivial patch, but since I have very limited
      experience with kernel modifications  I might be woefully wrong there.
      But if there are no side effects of this patch, is it possible to get it
      into the official kernel?
      
      I can provide more detailed information on the affected hardware if
      necessary.
      
      -cord
      
      [1]
      Socket 1 Device 0:      [axnet_cs]              (bus ID: 1.0)
              Configuration:  state: on
              Product Name:   NETGEAR FA411 Fast Ethernet
              Identification: manf_id: 0x0149 card_id: 0x0411
                              function: 6 (network)
                              prod_id(1): "NETGEAR" (0x9aa79dc3)
                              prod_id(2): "FA411" (0x40fad875)
                              prod_id(3): "Fast Ethernet" (0xb4be14e3)
                              prod_id(4): --- (---)
      
      From: Stefan Lippers-Hollmann <s.l-h@gmx.de>
      Date: Sat, 1 Nov 2008 23:53:04 +0000
      Subject: PCMCIA: move PCMCIA ID for Netgear FA411 from pcnet_cs to axnet_cs:
      
      Since kernel 2.6.25, commit 61da96be
      (pcnet_cs: if AX88190-based card, printk "use axnet_cs instead" message.),
      pcnet_cs bails out with "use axnet_cs instead" for the Netgear FA411, but
      axnet_cs doesn't claim this ID.
      
      Socket 1 Device 0:      [axnet_cs]              (bus ID: 1.0)
              Configuration:  state: on
              Product Name:   NETGEAR FA411 Fast Ethernet
              Identification: manf_id: 0x0149 card_id: 0x0411
                              function: 6 (network)
                              prod_id(1): "NETGEAR" (0x9aa79dc3)
                              prod_id(2): "FA411" (0x40fad875)
                              prod_id(3): "Fast Ethernet" (0xb4be14e3)
                              prod_id(4): --- (---)
      
      Cc: stable <stable@kernel.org> [2.6.25, 2.6.26, 2.6.27]
      Signed-off-by: NStefan Lippers-Hollmann <s.l-h@gmx.de>
      Signed-off-by: NCord Walter <qord@cwalter.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      208fbec5
  4. 21 11月, 2008 26 次提交
  5. 20 11月, 2008 4 次提交
    • A
      net: fix tiny output corruption of /proc/net/snmp6 · 5ece6c2d
      Alexey Dobriyan 提交于
      Because "name" is static, it can be occasionally be filled with
      somewhat garbage if two processes read /proc/net/snmp6.
      
      Also, remove useless casts and "-1" -- snprintf() correctly terminates it's
      output.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5ece6c2d
    • A
      atl2: don't request irq on resume if netif running · a849854f
      Alan Jenkins 提交于
      If the device is suspended with the cable disconnected, then
      resumed with the cable connected, dev->open is called before
      resume. During resume, we request an IRQ, but the IRQ was
      already assigned during dev->open, resulting in the warning
      shown below.
      
      Don't request an IRQ if the device is running.
      
      Call Trace:
       [<c011b89a>] warn_on_slowpath+0x40/0x59
       [<c023df15>] raw_pci_read+0x4d/0x55
       [<c023dff3>] pci_read+0x1c/0x21
       [<c01bcd81>] __pci_find_next_cap_ttl+0x44/0x70
       [<c01bce86>] __pci_find_next_cap+0x1a/0x1f
       [<c01bcef9>] pci_find_capability+0x28/0x2c
       [<c01c4144>] pci_msi_check_device+0x53/0x62
       [<c01c49c2>] pci_enable_msi+0x3a/0x1cd
       [<e019f17b>] atl2_write_phy_reg+0x40/0x5f [atl2]
       [<c01061b1>] dma_generic_alloc_coherent+0x0/0xd7
       [<e019f107>] atl2_request_irq+0x15/0x49 [atl2]
       [<e01a1481>] atl2_open+0x20b/0x297 [atl2]
       [<c024a35c>] dev_open+0x62/0x91
       [<c0248b9a>] dev_change_flags+0x93/0x141
       [<c024f308>] do_setlink+0x238/0x2d5
       [<c02501b2>] rtnl_setlink+0xa9/0xbf
       [<c0297f0c>] mutex_lock+0xb/0x19
       [<c024ffa7>] rtnl_dump_ifinfo+0x0/0x69
       [<c0250109>] rtnl_setlink+0x0/0xbf
       [<c024fe42>] rtnetlink_rcv_msg+0x185/0x19f
       [<c0240fd1>] sock_rmalloc+0x23/0x57
       [<c024fcbd>] rtnetlink_rcv_msg+0x0/0x19f
       [<c0259457>] netlink_rcv_skb+0x2d/0x71
       [<c024fcb7>] rtnetlink_rcv+0x14/0x1a
       [<c025929e>] netlink_unicast+0x184/0x1e4
       [<c025992a>] netlink_sendmsg+0x233/0x240
       [<c023f405>] sock_sendmsg+0xb7/0xd0
       [<c0129131>] autoremove_wake_function+0x0/0x2b
       [<c0129131>] autoremove_wake_function+0x0/0x2b
       [<c0147796>] mempool_alloc+0x2d/0x9e
       [<c020c923>] scsi_pool_alloc_command+0x35/0x4f
       [<c0297f0c>] mutex_lock+0xb/0x19
       [<c028e867>] unix_stream_recvmsg+0x357/0x3e2
       [<c01b81c9>] copy_from_user+0x23/0x4f
       [<c02452ea>] verify_iovec+0x3e/0x6c
       [<c023f5ab>] sys_sendmsg+0x18d/0x1f0
       [<c023ffa8>] sys_recvmsg+0x146/0x1c8
       [<c0240016>] sys_recvmsg+0x1b4/0x1c8
       [<c0118f48>] __wake_up+0xf/0x15
       [<c02586cd>] netlink_table_ungrab+0x17/0x19
       [<c01b83ba>] copy_to_user+0x25/0x3b
       [<c023fe4a>] move_addr_to_user+0x50/0x68
       [<c0240266>] sys_getsockname+0x6f/0x9a
       [<c0240280>] sys_getsockname+0x89/0x9a
       [<c015046a>] do_wp_page+0x3ae/0x41a
       [<c0151525>] handle_mm_fault+0x4c5/0x540
       [<c02405d0>] sys_socketcall+0x176/0x1b0
       [<c010376d>] sysenter_do_call+0x12/0x21
      Signed-off-by: NAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Signed-off-by: NJay Cliburn <jcliburn@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a849854f
    • B
      ipv6: use seq_release_private for ip6mr.c /proc entries · eedd726e
      Benjamin Thery 提交于
      In ip6mr.c, /proc entries /proc/net/ip6_mr_cache and /proc/net/ip6_mr_vif
      are opened with seq_open_private(), thus seq_release_private() should be 
      used to release them.
      Should fix a small memory leak.
      Signed-off-by: NBenjamin Thery <benjamin.thery@bull.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      eedd726e
    • P
      pkt_sched: fix missing check for packet overrun in qdisc_dump_stab() · 3aa4614d
      Patrick McHardy 提交于
      nla_nest_start() might return NULL, causing a NULL pointer dereference.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3aa4614d