1. 28 Dec, 2010 1 commit
    • Dan Williams's avatar
      ueagle-atm: fix PHY signal initialization race · 12f188f2
      Dan Williams authored
      A race exists when initializing ueagle-atm devices where the generic atm
      device may not yet be created before the driver attempts to initialize
      it's PHY signal state, which checks whether the atm device has been
      created or not.  This often causes the sysfs 'carrier' attribute to be
      '1' even though no signal has actually been found.
      
      uea_probe
         usbatm_usb_probe
            driver->bind (uea_bind)
               uea_boot
                  kthread_run(uea_kthread)     uea_kthread
            usbatm_atm_init                       uea_start_reset
               atm_dev_register                      UPDATE_ATM_SIGNAL
      
      UPDATE_ATM_SIGNAL checks whether the ATM device has been created and if
      not, will not update the PHY signal state.  Because of the race that
      does not always happen in time, and the PHY signal state remains
      ATM_PHY_SIG_FOUND even though no signal exists.
      
      To fix the race, just create the kthread during initialization, and only
      after initialization is complete, start the thread that reboots the
      device and initializes PHY state.
      
      [ 3030.490931] uea_probe: calling usbatm_usb_probe
      [ 3030.490946] ueagle-atm 8-2:1.0: usbatm_usb_probe: trying driver ueagle-atm with vendor=1110, product=9031, ifnum  0
      [ 3030.493691] uea_bind: setting usbatm
      [ 3030.496932] usb 8-2: [ueagle-atm] using iso mode
      [ 3030.497283] ueagle-atm 8-2:1.0: usbatm_usb_probe: using 3021 byte buffer for rx channel 0xffff880125953508
         <kthread already started before usbatm_usb_probe() has returned>
      [ 3030.497292] usb 8-2: [ueagle-atm] (re)booting started
         <UPDATE_ATM_SIGNAL checks whether ATM device has been created yet before setting PHY state>
      [ 3030.497298] uea_start_reset: atm dev (null)
         <and since it hasn't been created yet PHY state is not set>
      [ 3030.497306] ueagle-atm 8-2:1.0: usbatm_usb_probe: using 3392 byte buffer for tx channel 0xffff8801259535b8
      [ 3030.497374] usbatm_usb_probe: about to init
      [ 3030.497379] usbatm_usb_probe: calling usbatm_atm_init
         <atm device finally gets created>
      [ 3030.497384] usbatm_atm_init: creating atm device!
      Signed-off-by: default avatarDan Williams <dcbw@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      12f188f2
  2. 26 Dec, 2010 4 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · d7c1255a
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (42 commits)
        ipv4: dont create routes on down devices
        epic100: hamachi: yellowfin: Fix skb allocation size
        sundance: Fix oopses with corrupted skb_shared_info
        Revert "ipv4: Allow configuring subnets as local addresses"
        USB: mcs7830: return negative if auto negotiate fails
        irda: prevent integer underflow in IRLMP_ENUMDEVICES
        tcp: fix listening_get_next()
        atl1c: Do not use legacy PCI power management
        mac80211: fix mesh forwarding
        MAINTAINERS: email address change
        net: Fix range checks in tcf_valid_offset().
        net_sched: sch_sfq: fix allot handling
        hostap: remove netif_stop_queue from init
        mac80211/rt2x00: add ieee80211_tx_status_ni()
        typhoon: memory corruption in typhoon_get_drvinfo()
        net: Add USB PID for new MOSCHIP USB ethernet controller MCS7832 variant
        net_sched: always clone skbs
        ipv6: Fragment locally generated tunnel-mode IPSec6 packets as needed.
        netlink: fix gcc -Wconversion compilation warning
        asix: add USB ID for Logitec LAN-GTJ U2A
        ...
      d7c1255a
    • Eric Dumazet's avatar
      ipv4: dont create routes on down devices · fc75fc83
      Eric Dumazet authored
      In ip_route_output_slow(), instead of allowing a route to be created on
      a not UPed device, report -ENETUNREACH immediately.
      
      # ip tunnel add mode ipip remote 10.16.0.164 local
      10.16.0.72 dev eth0
      # (Note : tunl1 is down)
      # ping -I tunl1 10.1.2.3
      PING 10.1.2.3 (10.1.2.3) from 192.168.18.5 tunl1: 56(84) bytes of data.
      (nothing)
      # ./a.out tunl1
      # ip tunnel del tunl1
      Message from syslogd@shelby at Dec 22 10:12:08 ...
        kernel: unregister_netdevice: waiting for tunl1 to become free.
      Usage count = 3
      
      After patch:
      # ping -I tunl1 10.1.2.3
      connect: Network is unreachable
      Reported-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Reviewed-by: default avatarOctavian Purdila <opurdila@ixiacom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fc75fc83
    • Jarek Poplawski's avatar
      epic100: hamachi: yellowfin: Fix skb allocation size · 7a36df8a
      Jarek Poplawski authored
      Joel Soete reported oopses during pppoe over sundance NIC, caused by
      a bug in skb allocation and dma mapping code, where skb_reserve()
      bytes weren't taken into account. As a followup to the patch:
      "sundance: Fix oopses with corrupted skb_shared_info" very similar
      code is fixed here for three other drivers.
      Signed-off-by: default avatarJarek Poplawski <jarkao2@gmail.com>
      Cc: Joel Soete <soete.joel@scarlet.be>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7a36df8a
    • Jarek Poplawski's avatar
      sundance: Fix oopses with corrupted skb_shared_info · 78a36f25
      Jarek Poplawski authored
      Joel Soete reported oopses at the beginning of pppoe connections since
      v2.6.35. After debugging the bug was found in sundance skb allocation
      and dma mapping code, where skb_reserve() bytes aren't taken into
      account. This is an old bug, only uncovered by some change in 2.6.35.
      
      Initial debugging patch by: Eric Dumazet <eric.dumazet@gmail.com>
      Reported-by: default avatarJoel Soete <soete.joel@scarlet.be>
      Tested-by: default avatarJoel Soete <soete.joel@scarlet.be>
      Signed-off-by: default avatarJarek Poplawski <jarkao2@gmail.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      78a36f25
  3. 24 Dec, 2010 16 commits
  4. 23 Dec, 2010 19 commits