1. 06 Jul, 2009 9 commits
    • Wei Yongjun's avatar
      sctp: fix warning at inet_sock_destruct() while release sctp socket · 1bc4ee40
      Wei Yongjun authored
      Commit 'net: Move rx skb_orphan call to where needed' broken sctp protocol
      with warning at inet_sock_destruct(). Actually, sctp can do this right with
      sctp_sock_rfree_frag() and sctp_skb_set_owner_r_frag() pair.
      
          sctp_sock_rfree_frag(skb);
          sctp_skb_set_owner_r_frag(skb, newsk);
      
      This patch not revert the commit d55d87fd,
      instead remove the sctp_sock_rfree_frag() function.
      
      ------------[ cut here ]------------
      WARNING: at net/ipv4/af_inet.c:151 inet_sock_destruct+0xe0/0x142()
      Modules linked in: sctp ipv6 dm_mirror dm_region_hash dm_log dm_multipath
      scsi_mod ext3 jbd uhci_hcd ohci_hcd ehci_hcd [last unloaded: scsi_wait_scan]
      Pid: 1808, comm: sctp_test Not tainted 2.6.31-rc2 #40
      Call Trace:
       [<c042dd06>] warn_slowpath_common+0x6a/0x81
       [<c064a39a>] ? inet_sock_destruct+0xe0/0x142
       [<c042dd2f>] warn_slowpath_null+0x12/0x15
       [<c064a39a>] inet_sock_destruct+0xe0/0x142
       [<c05fde44>] __sk_free+0x19/0xcc
       [<c05fdf50>] sk_free+0x18/0x1a
       [<ca0d14ad>] sctp_close+0x192/0x1a1 [sctp]
       [<c0649f7f>] inet_release+0x47/0x4d
       [<c05fba4d>] sock_release+0x19/0x5e
       [<c05fbab3>] sock_close+0x21/0x25
       [<c049c31b>] __fput+0xde/0x189
       [<c049c3de>] fput+0x18/0x1a
       [<c049988f>] filp_close+0x56/0x60
       [<c042f422>] put_files_struct+0x5d/0xa1
       [<c042f49f>] exit_files+0x39/0x3d
       [<c043086a>] do_exit+0x1a5/0x5dd
       [<c04a86c2>] ? d_kill+0x35/0x3b
       [<c0438fa4>] ? dequeue_signal+0xa6/0x115
       [<c0430d05>] do_group_exit+0x63/0x8a
       [<c0439504>] get_signal_to_deliver+0x2e1/0x2f9
       [<c0401d9e>] do_notify_resume+0x7c/0x6b5
       [<c043f601>] ? autoremove_wake_function+0x0/0x34
       [<c04a864e>] ? __d_free+0x3d/0x40
       [<c04a867b>] ? d_free+0x2a/0x3c
       [<c049ba7e>] ? vfs_write+0x103/0x117
       [<c05fc8fa>] ? sys_socketcall+0x178/0x182
       [<c0402a56>] work_notifysig+0x13/0x19
      ---[ end trace 9db92c463e789fba ]---
      Signed-off-by: default avatarWei Yongjun <yjwei@cn.fujitsu.com>
      Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Acked-by: default avatarVlad Yasevich <vladislav.yasevich@hp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1bc4ee40
    • Mariusz Kozlowski's avatar
      tun/tap: Fix crashes if open() /dev/net/tun and then poll() it. · 3c8a9c63
      Mariusz Kozlowski authored
      Fix NULL pointer dereference in tun_chr_pool() introduced by commit
      33dccbb0 ("tun: Limit amount of queued
      packets per device") and triggered by this code:
      
      	int fd;
      	struct pollfd pfd;
      	fd = open("/dev/net/tun", O_RDWR);
      	pfd.fd = fd;
      	pfd.events = POLLIN | POLLOUT;
      	poll(&pfd, 1, 0);
      Reported-by: default avatarEugene Kapun <abacabadabacaba@gmail.com>
      Signed-off-by: default avatarMariusz Kozlowski <m.kozlowski@tuxland.pl>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3c8a9c63
    • Stephane Contri's avatar
      dsa: fix 88e6xxx statistics counter snapshotting · 1ded3f59
      Stephane Contri authored
      The bit that tells us whether a statistics counter snapshot operation
      has completed is located in the GLOBAL register block, not in the
      GLOBAL2 register block, so fix up mv88e6xxx_stats_wait() to poll the
      right register address.
      Signed-off-by: default avatarStephane Contri <Stephane.Contri@grassvalley.com>
      Signed-off-by: default avatarLennert Buytenhek <buytenh@marvell.com>
      Cc: stable@kernel.org
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1ded3f59
    • Eric Dumazet's avatar
      forcedeth: Fix NAPI race. · 78c29bd9
      Eric Dumazet authored
      Eric Dumazet a écrit :
      > Ingo Molnar a écrit :
      >>> The following changes since commit 52989765:
      >>>   Linus Torvalds (1):
      >>>         Merge git://git.kernel.org/.../davem/net-2.6
      
      > >>> are available in the git repository at:
      
      >>>   master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6.git master
      >> Hm, something in this lot quickly wrecked networking here - see the
      >> tx timeout dump below. It starts with:
      >>
      >> [  351.004596] WARNING: at net/sched/sch_generic.c:246 dev_watchdog+0x10b/0x19c()
      >> [  351.011815] Hardware name: System Product Name
      >> [  351.016220] NETDEV WATCHDOG: eth0 (forcedeth): transmit queue 0 timed out
      >>
      >> Config attached. Unfortunately i've got no time to do bisection
      >> today.
      >
      >
      >
      > forcedeth might have a problem, in its netif_wake_queue() logic, but
      > I could not see why a recent patch could make this problem visible now.
      >
      > CPU0/1: AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ stepping 02
      > is not a new cpu either :)
      >
      > forcedeth uses an internal tx_stop without appropriate barrier.
      >
      > Could you try following patch ?
      >
      > (random guess as I dont have much time right now)
      
      We might have a race in napi_schedule(), leaving interrupts disabled forever.
      I cannot test this patch, I dont have the hardware...
      Tested-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      78c29bd9
    • Julia Lawall's avatar
      drivers/net/smsc911x.c: Fix resource size off by 1 error · 39424539
      Julia Lawall authored
      The call resource_size(res) returns res->end - res->start + 1 and thus the
      second change is semantics-preserving.  res_size is then used as the second
      argument of a call to request_mem_region, and the memory allocated by this
      call appears to be the same as what is released in the two calls to
      release_mem_region.  So the size argument for those calls should be
      resource_size(size) as well.  Alternatively, in the second call to
      release_mem_region, the second argument could be res_size, as that variable
      has already been initialized at the point of this call.
      
      The problem was found using the following semantic patch:
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      @@
      struct resource *res;
      @@
      
      - (res->end - res->start) + 1
      + resource_size(res)
      
      @@
      struct resource *res;
      @@
      
      - res->end - res->start
      + BAD(resource_size(res))
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      39424539
    • Ken Kawasaki's avatar
      pcnet_cs: add new id · 4c3dd308
      Ken Kawasaki authored
      add new id (RIOS System PC CARD3 ETHERNET).
      Signed-off-by: default avatarKen Kawasaki <ken_kawasaki@spring.nifty.jp>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4c3dd308
    • Eilon Greenstein's avatar
      bnx2x: Fix the maximal values of coalescing timeouts. · 1e9d9987
      Eilon Greenstein authored
      This patch properly defines the maximum values for rx/tx coalescing timeouts.
      Signed-off-by: default avatarVlad Zolotarov <vladz@broadcom.com>
      Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1e9d9987
    • Eilon Greenstein's avatar
      bnx2x: Disable HC coalescing when setting timeout to zero. · 3799cf47
      Eilon Greenstein authored
      Problem reported by Flavio Leitner <fleitner@redhat.com>:
      When setting rx/tx coalescing timeout to the values less than 12 traffic was
      stopped.
      
      The FW supports coalescing in 12us granularity, and so value of less then 12
      should be interpreted as disabling coalescing
      Signed-off-by: default avatarVlad Zolotarov <vladz@broadcom.com>
      Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3799cf47
    • Herbert Xu's avatar
      tun: Fix device unregister race · d23e4365
      Herbert Xu authored
      It is currently possible for an asynchronous device unregister
      to cause the same tun device to be unregistered twice.  This
      is because the unregister in tun_chr_close only checks whether
      __tun_get(tfile) != NULL.  This however has nothing to do with
      whether the device has already been unregistered.  All it tells
      you is whether __tun_detach has been called.
      
      This patch fixes this by using the most obvious thing to test
      whether the device has been unregistered.
      
      It also moves __tun_detach outside of rtnl_unlock since nothing
      that it does requires that lock.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d23e4365
  2. 04 Jul, 2009 22 commits
  3. 02 Jul, 2009 7 commits
  4. 01 Jul, 2009 2 commits