1. 09 Oct, 2012 2 commits
  2. 08 Oct, 2012 16 commits
  3. 07 Oct, 2012 22 commits
    • Wei Yongjun's avatar
      ptp: use list_move instead of list_del/list_add · 9545f4e2
      Wei Yongjun authored
      Using list_move() instead of list_del() + list_add().
      
      dpatch engine is used to auto generate this patch.
      (https://github.com/weiyj/dpatch)
      Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9545f4e2
    • Wei Yongjun's avatar
      vxlan: remove unused including <linux/version.h> · d717f14e
      Wei Yongjun authored
      Remove including <linux/version.h> that don't need it.
      
      dpatch engine is used to auto generate this patch.
      (https://github.com/weiyj/dpatch)
      Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d717f14e
    • Eric Dumazet's avatar
      net: gro: fix a potential crash in skb_gro_reset_offset · ca07e43e
      Eric Dumazet authored
      Before accessing skb first fragment, better make sure there
      is one.
      
      This is probably not needed for old kernels, since an ethernet frame
      cannot contain only an ethernet header, but the recent GRO addition
      to tunnels makes this patch needed.
      
      Also skb_gro_reset_offset() can be static, it actually allows
      compiler to inline it.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ca07e43e
    • Eric Dumazet's avatar
      ipv6: GRO should be ECN friendly · 51ec0403
      Eric Dumazet authored
      IPv4 side of the problem was addressed in commit a9e050f4
      (net: tcp: GRO should be ECN friendly)
      
      This patch does the same, but for IPv6 : A Traffic Class mismatch
      doesnt mean flows are different, but instead should force a flush
      of previous packets.
      
      This patch removes artificial packet reordering problem.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      51ec0403
    • ramesh.nagappa@gmail.com's avatar
      net: Fix skb_under_panic oops in neigh_resolve_output · e1f16503
      ramesh.nagappa@gmail.com authored
      The retry loop in neigh_resolve_output() and neigh_connected_output()
      call dev_hard_header() with out reseting the skb to network_header.
      This causes the retry to fail with skb_under_panic. The fix is to
      reset the network_header within the retry loop.
      Signed-off-by: default avatarRamesh Nagappa <ramesh.nagappa@ericsson.com>
      Reviewed-by: default avatarShawn Lu <shawn.lu@ericsson.com>
      Reviewed-by: default avatarRobert Coulson <robert.coulson@ericsson.com>
      Reviewed-by: default avatarBillie Alsup <billie.alsup@ericsson.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e1f16503
    • Peter Senna Tschudin's avatar
      drivers/net/ethernet/marvell/sky2.c: fix error return code · 0bd8ba18
      Peter Senna Tschudin authored
      The function sky2_probe() return 0 for success and negative value
      for most of its internal tests failures. There are two exceptions
      that are error cases going to err_out*:. For this two cases, the
      function abort its success execution path, but returns non negative
      value, making it dificult for a caller function to notice the error.
      
      This patch fixes the error cases that do not return negative values.
      
      This was found by Coccinelle, but the code change was made by hand.
      This patch is not robot generated.
      
      A simplified version of the semantic match that finds this problem is
      as follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      (
      if@p1 (\(ret < 0\|ret != 0\))
       { ... return ret; }
      |
      ret@p1 = 0
      )
      ... when != ret = e1
          when != &ret
      *if(...)
      {
        ... when != ret = e2
            when forall
       return ret;
      }
      // </smpl>
      Signed-off-by: default avatarPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0bd8ba18
    • Peter Senna Tschudin's avatar
      drivers/net/ethernet/marvell/skge.c: fix error return code · bbcf61fb
      Peter Senna Tschudin authored
      The function skge_probe() return 0 for success and negative value
      for most of its internal tests failures. There is one exception
      that is error case going to err_out_led_off:. For this error case, the
      function abort its success execution path, but returns non negative
      value, making it difficult for a caller function to notice the error.
      
      This patch fixes the error case that do not return negative value.
      
      This was found by Coccinelle, but the code change was made by hand.
      This patch is not robot generated.
      
      A simplified version of the semantic match that finds this problem is
      as follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      (
      if@p1 (\(ret < 0\|ret != 0\))
       { ... return ret; }
      |
      ret@p1 = 0
      )
      ... when != ret = e1
          when != &ret
      *if(...)
      {
        ... when != ret = e2
            when forall
       return ret;
      }
      // </smpl>
      Signed-off-by: default avatarPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bbcf61fb
    • Peter Senna Tschudin's avatar
      drivers/net/ethernet/sun/sungem.c: fix error return code · 4df12834
      Peter Senna Tschudin authored
      The function gem_init_one() return 0 for success and negative value
      for most of its internal tests failures. There is one exception
      that is error case going to err_out_free_consistent:. For this error
      case, the function abort its success execution path, but returns non
      negative value, making it difficult for a caller function to notice
      the error.
      
      This patch fixes the error case that do not return negative value.
      
      This was found by Coccinelle, but the code change was made by hand.
      This patch is not robot generated.
      
      A simplified version of the semantic match that finds this problem is
      as follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      (
      if@p1 (\(ret < 0\|ret != 0\))
       { ... return ret; }
      |
      ret@p1 = 0
      )
      ... when != ret = e1
          when != &ret
      *if(...)
      {
        ... when != ret = e2
            when forall
       return ret;
      }
      // </smpl>
      Signed-off-by: default avatarPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4df12834
    • Peter Senna Tschudin's avatar
      drivers/net/ethernet/sun/niu.c: fix error return code · 8c65ef4b
      Peter Senna Tschudin authored
      The function niu_pci_init_one() return 0 for success and negative value
      for most of its internal tests failures. There is one exception
      that is error case going to err_out_free_res:. For this error case, the
      function abort its success execution path, but returns non negative
      value, making it difficult for a caller function to notice the error.
      
      This patch fixes the error case that do not return negative value.
      
      This was found by Coccinelle, but the code change was made by hand.
      This patch is not robot generated.
      
      A simplified version of the semantic match that finds this problem is
      as follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      (
      if@p1 (\(ret < 0\|ret != 0\))
       { ... return ret; }
      |
      ret@p1 = 0
      )
      ... when != ret = e1
          when != &ret
      *if(...)
      {
        ... when != ret = e2
            when forall
       return ret;
      }
      // </smpl>
      Signed-off-by: default avatarPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8c65ef4b
    • Peter Senna Tschudin's avatar
      drivers/net/ethernet/renesas/sh_eth.c: fix error return code · 043c4789
      Peter Senna Tschudin authored
      The function sh_eth_drv_probe() return 0 for success and negative value
      for most of its internal tests failures. There is one exception
      that is error case going to out_release:. For this error case, the
      function abort its success execution path, but returns non negative
      value, making it difficult for a caller function to notice the error.
      
      This patch fixes the error case that do not return negative value.
      
      This was found by Coccinelle, but the code change was made by hand.
      This patch is not robot generated.
      
      A simplified version of the semantic match that finds this problem is
      as follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      (
      if@p1 (\(ret < 0\|ret != 0\))
       { ... return ret; }
      |
      ret@p1 = 0
      )
      ... when != ret = e1
          when != &ret
      *if(...)
      {
        ... when != ret = e2
            when forall
       return ret;
      }
      // </smpl>
      Signed-off-by: default avatarPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      043c4789
    • Peter Senna Tschudin's avatar
      drivers/net/ethernet/natsemi/xtsonic.c: fix error return code · 97db4b9d
      Peter Senna Tschudin authored
      The function sonic_probe1() return 0 for success and negative value
      for most of its internal tests failures. There is one exception
      that is error case going to out:. For this error case, the
      function abort its success execution path, but returns non negative
      value, making it difficult for a caller function to notice the error.
      
      This patch fixes the error case that do not return negative value.
      
      This was found by Coccinelle, but the code change was made by hand.
      This patch is not robot generated.
      
      A simplified version of the semantic match that finds this problem is
      as follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      (
      if@p1 (\(ret < 0\|ret != 0\))
       { ... return ret; }
      |
      ret@p1 = 0
      )
      ... when != ret = e1
          when != &ret
      *if(...)
      {
        ... when != ret = e2
            when forall
       return ret;
      }
      // </smpl>
      Signed-off-by: default avatarPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      97db4b9d
    • Peter Senna Tschudin's avatar
      drivers/net/ethernet/amd/au1000_eth.c: fix error return code · 69129920
      Peter Senna Tschudin authored
      The function au1000_probe() return 0 for success and negative value
      for most of its internal tests failures. There are exceptions
      that are error cases going to err_out:. For this cases, the
      function abort its success execution path, but returns non negative
      value, making it dificult for a caller function to notice the error.
      
      This patch fixes the error cases that do not return negative values.
      
      This was found by Coccinelle, but the code change was made by hand.
      This patch is not robot generated.
      
      A simplified version of the semantic match that finds this problem is
      as follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      (
      if@p1 (\(ret < 0\|ret != 0\))
       { ... return ret; }
      |
      ret@p1 = 0
      )
      ... when != ret = e1
          when != &ret
      *if(...)
      {
        ... when != ret = e2
            when forall
       return ret;
      }
      // </smpl>
      Signed-off-by: default avatarPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      69129920
    • Peter Senna Tschudin's avatar
      drivers/net/ethernet/amd/amd8111e.c: fix error return code · 86e506e3
      Peter Senna Tschudin authored
      The function amd8111e_probe_one() return 0 for success and negative
      value for most of its internal tests failures. There are two exceptions
      that are error cases going to err_free_reg:. For this two cases, the
      function abort its success execution path, but returns non negative
      value, making it dificult for a caller function to notice the error.
      
      This patch fixes the error cases that do not return negative values.
      
      This was found by Coccinelle, but the code change was made by hand.
      This patch is not robot generated.
      
      A simplified version of the semantic match that finds this problem is
      as follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      (
      if@p1 (\(ret < 0\|ret != 0\))
       { ... return ret; }
      |
      ret@p1 = 0
      )
      ... when != ret = e1
          when != &ret
      *if(...)
      {
        ... when != ret = e2
            when forall
       return ret;
      }
      // </smpl>
      Signed-off-by: default avatarPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      86e506e3
    • Peter Senna Tschudin's avatar
      drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c: fix error return code · 2dfc9671
      Peter Senna Tschudin authored
      The function qlcnic_probe() return 0 for success and negative value
      for most of its internal tests failures. There is one exception
      that is error case going to err_out_free_netdev:. For this error case,
      the function abort its success execution path, but returns non negative
      value, making it difficult for a caller function to notice the error.
      
      This patch fixes the error case that do not return negative value.
      
      This was found by Coccinelle, but the code change was made by hand.
      This patch is not robot generated.
      
      A simplified version of the semantic match that finds this problem is
      as follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      (
      if@p1 (\(ret < 0\|ret != 0\))
       { ... return ret; }
      |
      ret@p1 = 0
      )
      ... when != ret = e1
          when != &ret
      *if(...)
      {
        ... when != ret = e2
            when forall
       return ret;
      }
      // </smpl>
      Signed-off-by: default avatarPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2dfc9671
    • Peter Senna Tschudin's avatar
      drivers/net/irda/sh_sir.c: fix error return code · 14834540
      Peter Senna Tschudin authored
      The function sh_sir_probe() return 0 for success and negative value
      for most of its internal tests failures. There are two exceptions
      that are error cases going to err_mem_*:. For this two cases, the
      function abort its success execution path, but returns non negative
      value, making it dificult for a caller function to notice the error.
      
      This patch fixes the error cases that do not return negative values.
      
      This was found by Coccinelle, but the code change was made by hand.
      This patch is not robot generated.
      
      A simplified version of the semantic match that finds this problem is
      as follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      (
      if@p1 (\(ret < 0\|ret != 0\))
       { ... return ret; }
      |
      ret@p1 = 0
      )
      ... when != ret = e1
          when != &ret
      *if(...)
      {
        ... when != ret = e2
            when forall
       return ret;
      }
      // </smpl>
      Signed-off-by: default avatarPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      14834540
    • Peter Senna Tschudin's avatar
      drivers/net/irda/sh_irda.c: fix error return code · 812b074b
      Peter Senna Tschudin authored
      The function sh_irda_probe() return 0 for success and negative value
      for most of its internal tests failures. There is one exception
      that is error case going to err_mem_4:. For this error case, the
      function abort its success execution path, but returns non negative
      value, making it difficult for a caller function to notice the error.
      
      This patch fixes the error case that do not return negative value.
      
      This was found by Coccinelle, but the code change was made by hand.
      This patch is not robot generated.
      
      A simplified version of the semantic match that finds this problem is
      as follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      (
      if@p1 (\(ret < 0\|ret != 0\))
       { ... return ret; }
      |
      ret@p1 = 0
      )
      ... when != ret = e1
          when != &ret
      *if(...)
      {
        ... when != ret = e2
            when forall
       return ret;
      }
      // </smpl>
      Signed-off-by: default avatarPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      812b074b
    • Peter Senna Tschudin's avatar
      drivers/net/irda/sa1100_ir.c: fix error return code · cd9d1160
      Peter Senna Tschudin authored
      The function sa1100_irda_probe() return 0 for success and negative
      value for most of its internal tests failures. There is one exception
      that is error case going to err_mem_4:. For this error case, the
      function abort its success execution path, but returns non negative
      value, making it difficult for a caller function to notice the error.
      
      This patch fixes the error case that do not return negative value.
      
      This was found by Coccinelle, but the code change was made by hand.
      This patch is not robot generated.
      
      A simplified version of the semantic match that finds this problem is
      as follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      (
      if@p1 (\(ret < 0\|ret != 0\))
       { ... return ret; }
      |
      ret@p1 = 0
      )
      ... when != ret = e1
          when != &ret
      *if(...)
      {
        ... when != ret = e2
            when forall
       return ret;
      }
      // </smpl>
      Signed-off-by: default avatarPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cd9d1160
    • Peter Senna Tschudin's avatar
      drivers/net/irda/pxaficp_ir.c: fix error return code · cbd841ca
      Peter Senna Tschudin authored
      The function pxa_irda_probe() return 0 for success and negative value
      for most of its internal tests failures. There is one exception
      that is error case going to err_mem_3:. For this error case, the
      function abort its success execution path, but returns non negative
      value, making it difficult for a caller function to notice the error.
      
      This patch fixes the error case that do not return negative value.
      
      This was found by Coccinelle, but the code change was made by hand.
      This patch is not robot generated.
      
      A simplified version of the semantic match that finds this problem is
      as follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      (
      if@p1 (\(ret < 0\|ret != 0\))
       { ... return ret; }
      |
      ret@p1 = 0
      )
      ... when != ret = e1
          when != &ret
      *if(...)
      {
        ... when != ret = e2
            when forall
       return ret;
      }
      // </smpl>
      Signed-off-by: default avatarPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cbd841ca
    • Peter Senna Tschudin's avatar
      drivers/net/irda/mcs7780.c: fix error return code · 6734011f
      Peter Senna Tschudin authored
      The function mcs_probe() return 0 for success and negative value
      for most of its internal tests failures. There is one exception
      that is error case going to error2:. For this error case, the
      function abort its success execution path, but returns non negative
      value, making it difficult for a caller function to notice the error.
      
      This patch fixes the error case that do not return negative value.
      
      A simplified version of the semantic match that finds this problem is
      as follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      (
      if@p1 (\(ret < 0\|ret != 0\))
       { ... return ret; }
      |
      ret@p1 = 0
      )
      ... when != ret = e1
          when != &ret
      *if(...)
      {
        ... when != ret = e2
            when forall
       return ret;
      }
      // </smpl>
      Signed-off-by: default avatarPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6734011f
    • Peter Senna Tschudin's avatar
      drivers/net/irda/irtty-sir.c: fix error return code · 87286477
      Peter Senna Tschudin authored
      The function irtty_open() return 0 for success and negative value
      for most of its internal tests failures. There is one exception
      that is error case going to out_put:. For this error case, the
      function abort its success execution path, but returns non negative
      value, making it difficult for a caller function to notice the error.
      
      This patch fixes the error case that do not return negative value.
      
      This was found by Coccinelle, but the code change was made by hand.
      This patch is not robot generated.
      
      A simplified version of the semantic match that finds this problem is
      as follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      (
      if@p1 (\(ret < 0\|ret != 0\))
       { ... return ret; }
      |
      ret@p1 = 0
      )
      ... when != ret = e1
          when != &ret
      *if(...)
      {
        ... when != ret = e2
            when forall
       return ret;
      }
      // </smpl>
      Signed-off-by: default avatarPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      87286477
    • Peter Senna Tschudin's avatar
      drivers/net/ethernet/sis/sis900.c: fix error return code · 0968a9d1
      Peter Senna Tschudin authored
      The function sis900_probe() return 0 for success and negative value
      for most of its internal tests failures. There is one exception
      that is error case going to err_out_cleardev:. Fore this error case,
      the function abort its success execution path, but returns non negative
      value, making it difficult for a caller function to notice the error.
      
      This patch fixes the error case that do not return negative value.
      
      This was found by Coccinelle, but the code change was made by hand.
      This patch is not robot generated.
      
      A simplified version of the semantic match that finds this problem is
      as follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      (
      if@p1 (\(ret < 0\|ret != 0\))
       { ... return ret; }
      |
      ret@p1 = 0
      )
      ... when != ret = e1
          when != &ret
      *if(...)
      {
        ... when != ret = e2
            when forall
       return ret;
      }
      // </smpl>
      Signed-off-by: default avatarPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0968a9d1
    • Peter Senna Tschudin's avatar
      drivers/net/ethernet/natsemi/natsemi.c: fix error return code · 52428d91
      Peter Senna Tschudin authored
      The function natsemi_probe1() return 0 for success and negative value
      for most of its internal tests failures. There is one exception
      that is error case going to err_create_file:. Fore this error case the
      function abort its success execution path, but returns non negative value,
      making it difficult for a caller function to notice the error.
      
      This patch fixes the error case that do not return negative value.
      
      This was found by Coccinelle, but the code change was made by hand.
      This patch is not robot generated.
      
      A simplified version of the semantic match that finds this problem is
      as follows: (http://coccinelle.lip6.fr/)
      
      // <smpl>
      (
      if@p1 (\(ret < 0\|ret != 0\))
       { ... return ret; }
      |
      ret@p1 = 0
      )
      ... when != ret = e1
          when != &ret
      *if(...)
      {
        ... when != ret = e2
            when forall
       return ret;
      }
      // </smpl>
      Signed-off-by: default avatarPeter Senna Tschudin <peter.senna@gmail.com>
      Acked-by: default avatarFrancois Romieu <romieu@fr.zoreil.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      52428d91