1. 09 4月, 2011 1 次提交
  2. 08 4月, 2011 3 次提交
  3. 05 4月, 2011 12 次提交
  4. 04 4月, 2011 1 次提交
  5. 02 4月, 2011 7 次提交
    • I
      tcp: len check is unnecessarily devastating, change to WARN_ON · 2fceec13
      Ilpo Järvinen 提交于
      All callers are prepared for alloc failures anyway, so this error
      can safely be boomeranged to the callers domain without super
      bad consequences. ...At worst the connection might go into a state
      where each RTO tries to (unsuccessfully) re-fragment with such
      a mis-sized value and eventually dies.
      Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2fceec13
    • W
      sctp: malloc enough room for asconf-ack chunk · 2cab86be
      Wei Yongjun 提交于
      Sometime the ASCONF_ACK parameters can equal to the fourfold of
      ASCONF parameters, this only happend in some special case:
      
        ASCONF parameter is :
          Unrecognized Parameter (4 bytes)
        ASCONF_ACK parameter should be:
          Error Cause Indication parameter (8 bytes header)
           + Error Cause (4 bytes header)
             + Unrecognized Parameter (4bytes)
      
      Four 4bytes Unrecognized Parameters in ASCONF chunk will cause panic.
      
      Pid: 0, comm: swapper Not tainted 2.6.38-next+ #22 Bochs Bochs
      EIP: 0060:[<c0717eae>] EFLAGS: 00010246 CPU: 0
      EIP is at skb_put+0x60/0x70
      EAX: 00000077 EBX: c09060e2 ECX: dec1dc30 EDX: c09469c0
      ESI: 00000000 EDI: de3c8d40 EBP: dec1dc58 ESP: dec1dc2c
       DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
      Process swapper (pid: 0, ti=dec1c000 task=c09aef20 task.ti=c0980000)
      Stack:
       c09469c0 e1894fa4 00000044 00000004 de3c8d00 de3c8d00 de3c8d44 de3c8d40
       c09060e2 de25dd80 de3c8d40 dec1dc7c e1894fa4 dec1dcb0 00000040 00000004
       00000000 00000800 00000004 00000004 dec1dce0 e1895a2b dec1dcb4 de25d960
      Call Trace:
       [<e1894fa4>] ? sctp_addto_chunk+0x4e/0x89 [sctp]
       [<e1894fa4>] sctp_addto_chunk+0x4e/0x89 [sctp]
       [<e1895a2b>] sctp_process_asconf+0x32f/0x3d1 [sctp]
       [<e188d554>] sctp_sf_do_asconf+0xf8/0x173 [sctp]
       [<e1890b02>] sctp_do_sm+0xb8/0x159 [sctp]
       [<e18a2248>] ? sctp_cname+0x0/0x52 [sctp]
       [<e189392d>] sctp_assoc_bh_rcv+0xac/0xe3 [sctp]
       [<e1897d76>] sctp_inq_push+0x2d/0x30 [sctp]
       [<e18a21b2>] sctp_rcv+0x7a7/0x83d [sctp]
       [<c077a95c>] ? ipv4_confirm+0x118/0x125
       [<c073a970>] ? nf_iterate+0x34/0x62
       [<c074789d>] ? ip_local_deliver_finish+0x0/0x194
       [<c074789d>] ? ip_local_deliver_finish+0x0/0x194
       [<c0747992>] ip_local_deliver_finish+0xf5/0x194
       [<c074789d>] ? ip_local_deliver_finish+0x0/0x194
       [<c0747a6e>] NF_HOOK.clone.1+0x3d/0x44
       [<c0747ab3>] ip_local_deliver+0x3e/0x44
       [<c074789d>] ? ip_local_deliver_finish+0x0/0x194
       [<c074775c>] ip_rcv_finish+0x29f/0x2c7
       [<c07474bd>] ? ip_rcv_finish+0x0/0x2c7
       [<c0747a6e>] NF_HOOK.clone.1+0x3d/0x44
       [<c0747cae>] ip_rcv+0x1f5/0x233
       [<c07474bd>] ? ip_rcv_finish+0x0/0x2c7
       [<c071dce3>] __netif_receive_skb+0x310/0x336
       [<c07221f3>] netif_receive_skb+0x4b/0x51
       [<e0a4ed3d>] cp_rx_poll+0x1e7/0x29c [8139cp]
       [<c072275e>] net_rx_action+0x65/0x13a
       [<c0445a54>] __do_softirq+0xa1/0x149
       [<c04459b3>] ? __do_softirq+0x0/0x149
       <IRQ>
       [<c0445891>] ? irq_exit+0x37/0x72
       [<c040a7e9>] ? do_IRQ+0x81/0x95
       [<c07b3670>] ? common_interrupt+0x30/0x38
       [<c0428058>] ? native_safe_halt+0xa/0xc
       [<c040f5d7>] ? default_idle+0x58/0x92
       [<c0408fb0>] ? cpu_idle+0x96/0xb2
       [<c0797989>] ? rest_init+0x5d/0x5f
       [<c09fd90c>] ? start_kernel+0x34b/0x350
       [<c09fd0cb>] ? i386_start_kernel+0xba/0xc1
      Signed-off-by: NWei Yongjun <yjwei@cn.fujitsu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2cab86be
    • W
      sctp: fix auth_hmacs field's length of struct sctp_cookie · 028dba0a
      Wei Yongjun 提交于
      auth_hmacs field of struct sctp_cookie is used for store
      Requested HMAC Algorithm Parameter, and each HMAC Identifier
      is 2 bytes, so the length should be:
        SCTP_AUTH_NUM_HMACS * sizeof(__u16) + 2
      Signed-off-by: NWei Yongjun <yjwei@cn.fujitsu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      028dba0a
    • M
      net: Fix dev dev_ethtool_get_rx_csum() for forced NETIF_F_RXCSUM · 4dd5ffe4
      Michał Mirosław 提交于
      dev_ethtool_get_rx_csum() won't report rx checksumming when it's not
      changeable and driver is converted to hw_features and friends. Fix this.
      
      (dev->hw_features & NETIF_F_RXCSUM) check is dropped - if the
      ethtool_ops->get_rx_csum is set, then driver is not coverted, yet.
      Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4dd5ffe4
    • A
      usbnet: use eth%d name for known ethernet devices · c261344d
      Arnd Bergmann 提交于
      The documentation for the USB ethernet devices suggests that
      only some devices are supposed to use usb0 as the network interface
      name instead of eth0. The logic used there, and documented in
      Kconfig for CDC is that eth0 will be used when the mac address
      is a globally assigned one, but usb0 is used for the locally
      managed range that is typically used on point-to-point links.
      
      Unfortunately, this has caused a lot of pain on the smsc95xx
      device that is used on the popular pandaboard without an
      EEPROM to store the MAC address, which causes the driver to
      call random_ether_address().
      
      Obviously, there should be a proper MAC addressed assigned to
      the device, and discussions are ongoing about how to solve
      this, but this patch at least makes sure that the default
      interface naming gets a little saner and matches what the
      user can expect based on the documentation, including for
      new devices.
      
      The approach taken here is to flag whether a device might be a
      point-to-point link with the new FLAG_POINTTOPOINT setting in
      the usbnet driver_info. A driver can set both FLAG_POINTTOPOINT
      and FLAG_ETHER if it is not sure (e.g. cdc_ether), or just one
      of the two.  The usbnet framework only looks at the MAC address
      for device naming if both flags are set, otherwise it trusts the
      flag.
      Signed-off-by: NArnd Bergmann <arnd.bergmann@linaro.org>
      Tested-by: NAndy Green <andy.green@linaro.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c261344d
    • F
      starfire: clean up dma_addr_t size test · 1591cb60
      FUJITA Tomonori 提交于
      Now we have CONFIG_ARCH_DMA_ADDR_T_64BIT. We can fix the hacky
      dma_addr_t size test cleanly.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1591cb60
    • D
  6. 01 4月, 2011 1 次提交
  7. 31 3月, 2011 9 次提交
  8. 30 3月, 2011 6 次提交
    • J
      Atheros, atl2: Fix mem leaks in error paths of atl2_set_eeprom · ad19031b
      Jesper Juhl 提交于
      We leak in some error paths of drivers/net/atlx/atl2.c:atl2_set_eeprom().
      The memory allocated to 'eeprom_buff' is not freed when we return -EIO.
      This patch fixes that up and also removes a pointless explicit cast.
      Signed-off-by: NJesper Juhl <jj@chaosbits.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ad19031b
    • D
      netdev: fix mtu check when TSO is enabled · 79b569f0
      Daniel Lezcano 提交于
      In case the device where is coming from the packet has TSO enabled,
      we should not check the mtu size value as this one could be bigger
      than the expected value.
      
      This is the case for the macvlan driver when the lower device has
      TSO enabled. The macvlan inherit this feature and forward the packets
      without fragmenting them. Then the packets go through dev_forward_skb
      and are dropped. This patch fix this by checking TSO is not enabled
      when we want to check the mtu size.
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@free.fr>
      Acked-by: N"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      79b569f0
    • A
      net/usb: Ethernet quirks for the LG-VL600 4G modem · 7a635ea9
      Andrzej Zaborowski 提交于
      This adds a driver for the CDC Ethernet part of this modem.  The
      device's ID is blacklisted in cdc_ether.c and is white-listed in
      this new driver because of the quirks needed to make it useful.
      The modem's firmware exposes a CDC ACM port for modem control and a
      CDC Ethernet port for network data.  The descriptors look fine but
      both ports actually are some sort of multiplexers requiring non-
      standard headers added/removed from every packet or they get
      ignored.  All information is based on a usb traffic log from a
      Windows machine.
      
      On the Verizon 4G network I've seen speeds up to 1.1MB/s so far with
      this driver, a speed-o-meter site reports 16.2Mbps/10.5Mbps.
      Userspace scripts are required to talk to the CDC ACM port.
      Signed-off-by: NAndrzej Zaborowski <balrogg@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7a635ea9
    • M
      phylib: phy_attach_direct: phy_init_hw can fail, add cleanup · d005a09e
      Marc Kleine-Budde 提交于
      The function phy_attach_direct attaches the phy and calls phy_init_hw.
      phy_init_hw can fail, but the phy is still marked as attached. Successive
      calls to phy_attach_direct will fail because the phy is busy.
      
      [    1.020000] eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=1:00, irq=-1)
      [    1.030000] eth1: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=1:01, irq=-1)
      [    2.050000] Sending DHCP requests .
      [    3.020000] PHY: 1:00 - Link is Up - 100/Full
      [    5.110000] ..... timed out!
      [   87.660000] IP-Config: Reopening network devices...
      [   88.190000] FEC: MDIO read timeout
      [   88.190000] eth0: could not attach to PHY
      [   88.190000] IP-Config: Failed to open eth0
      [   88.210000] FEC: MDIO read timeout
      [   88.210000] eth1: could not attach to PHY
      [   88.210000] IP-Config: Failed to open eth1
      [   88.220000] IP-Config: No network devices available.
      [   88.220000] Freeing init memory: 6968K
      
      [...]
      
      starting network interfaces...
      ip: RTNETLINK answers: File exists
      [   94.000000] net eth0: PHY already attached
      [   94.010000] eth0: could not attach to PHY
      ip: SIOCSIFFLAGS: Device or resource busy
      
      This patch adds phy_detach to clean up if phy_init_hw fails.
      Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d005a09e
    • L
      bridge: mcast snooping, fix length check of snooped MLDv1/2 · ff9a57a6
      Linus Lüssing 提交于
      "len = ntohs(ip6h->payload_len)" does not include the length of the ipv6
      header itself, which the rest of this function assumes, though.
      
      This leads to a length check less restrictive as it should be in the
      following line for one thing. For another, it very likely leads to an
      integer underrun when substracting the offset and therefore to a very
      high new value of 'len' due to its unsignedness. This will ultimately
      lead to the pskb_trim_rcsum() practically never being called, even in
      the cases where it should.
      Signed-off-by: NLinus Lüssing <linus.luessing@web.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ff9a57a6
    • B
      via-ircc: Pass PCI device pointer to dma_{alloc, free}_coherent() · fd1d9188
      Ben Hutchings 提交于
      via-ircc has been passing a NULL pointer to DMA allocation functions,
      which is completely invalid and results in a BUG on PowerPC.  Now
      that we always have the device pointer available, pass it in.
      
      Reference: http://bugs.debian.org/619450Reported-by: NAndrew Buckeridge <andrewb@bgc.com.au>
      Signed-off-by: NBen Hutchings <ben@decadent.org.uk>
      Tested-by: Andrew Buckeridge <andrewb@bgc.com.au> [against 2.6.32]
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fd1d9188