1. 09 10月, 2012 11 次提交
  2. 08 10月, 2012 24 次提交
    • D
      cxgb4: allocate enough data in t4_memory_rw() · 594f88e9
      Dan Carpenter 提交于
      MEMWIN0_APERTURE is the size in bytes.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      594f88e9
    • W
      ptp: use list_move instead of list_del/list_add · 9545f4e2
      Wei Yongjun 提交于
      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: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9545f4e2
    • W
      vxlan: remove unused including <linux/version.h> · d717f14e
      Wei Yongjun 提交于
      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: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d717f14e
    • E
      net: gro: fix a potential crash in skb_gro_reset_offset · ca07e43e
      Eric Dumazet 提交于
      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: NEric Dumazet <edumazet@google.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ca07e43e
    • E
      ipv6: GRO should be ECN friendly · 51ec0403
      Eric Dumazet 提交于
      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: NEric Dumazet <edumazet@google.com>
      Cc: Herbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      51ec0403
    • R
      net: Fix skb_under_panic oops in neigh_resolve_output · e1f16503
      ramesh.nagappa@gmail.com 提交于
      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: NRamesh Nagappa <ramesh.nagappa@ericsson.com>
      Reviewed-by: NShawn Lu <shawn.lu@ericsson.com>
      Reviewed-by: NRobert Coulson <robert.coulson@ericsson.com>
      Reviewed-by: NBillie Alsup <billie.alsup@ericsson.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e1f16503
    • P
      drivers/net/ethernet/marvell/sky2.c: fix error return code · 0bd8ba18
      Peter Senna Tschudin 提交于
      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: NPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0bd8ba18
    • P
      drivers/net/ethernet/marvell/skge.c: fix error return code · bbcf61fb
      Peter Senna Tschudin 提交于
      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: NPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bbcf61fb
    • P
      drivers/net/ethernet/sun/sungem.c: fix error return code · 4df12834
      Peter Senna Tschudin 提交于
      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: NPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4df12834
    • P
      drivers/net/ethernet/sun/niu.c: fix error return code · 8c65ef4b
      Peter Senna Tschudin 提交于
      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: NPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8c65ef4b
    • P
      drivers/net/ethernet/renesas/sh_eth.c: fix error return code · 043c4789
      Peter Senna Tschudin 提交于
      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: NPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      043c4789
    • P
      drivers/net/ethernet/natsemi/xtsonic.c: fix error return code · 97db4b9d
      Peter Senna Tschudin 提交于
      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: NPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      97db4b9d
    • P
      drivers/net/ethernet/amd/au1000_eth.c: fix error return code · 69129920
      Peter Senna Tschudin 提交于
      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: NPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      69129920
    • P
      drivers/net/ethernet/amd/amd8111e.c: fix error return code · 86e506e3
      Peter Senna Tschudin 提交于
      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: NPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      86e506e3
    • P
      drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c: fix error return code · 2dfc9671
      Peter Senna Tschudin 提交于
      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: NPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2dfc9671
    • P
      drivers/net/irda/sh_sir.c: fix error return code · 14834540
      Peter Senna Tschudin 提交于
      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: NPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      14834540
    • P
      drivers/net/irda/sh_irda.c: fix error return code · 812b074b
      Peter Senna Tschudin 提交于
      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: NPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      812b074b
    • P
      drivers/net/irda/sa1100_ir.c: fix error return code · cd9d1160
      Peter Senna Tschudin 提交于
      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: NPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cd9d1160
    • P
      drivers/net/irda/pxaficp_ir.c: fix error return code · cbd841ca
      Peter Senna Tschudin 提交于
      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: NPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cbd841ca
    • P
      drivers/net/irda/mcs7780.c: fix error return code · 6734011f
      Peter Senna Tschudin 提交于
      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: NPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6734011f
    • P
      drivers/net/irda/irtty-sir.c: fix error return code · 87286477
      Peter Senna Tschudin 提交于
      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: NPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      87286477
    • P
      drivers/net/ethernet/sis/sis900.c: fix error return code · 0968a9d1
      Peter Senna Tschudin 提交于
      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: NPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0968a9d1
    • P
      drivers/net/ethernet/natsemi/natsemi.c: fix error return code · 52428d91
      Peter Senna Tschudin 提交于
      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: NPeter Senna Tschudin <peter.senna@gmail.com>
      Acked-by: NFrancois Romieu <romieu@fr.zoreil.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      52428d91
    • P
      drivers/net/ethernet/dec/tulip/dmfe.c: fix error return code · 5b896029
      Peter Senna Tschudin 提交于
      The function dmfe_init_one() return 0 for success and negative value
      for most of its internal tests failures. There are three exceptions
      that are error cases going to err_out_*:. Fore this three 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: NPeter Senna Tschudin <peter.senna@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5b896029
  3. 07 10月, 2012 5 次提交
    • E
      net: remove skb recycling · acb600de
      Eric Dumazet 提交于
      Over time, skb recycling infrastructure got litle interest and
      many bugs. Generic rx path skb allocation is now using page
      fragments for efficient GRO / TCP coalescing, and recyling
      a tx skb for rx path is not worth the pain.
      
      Last identified bug is that fat skbs can be recycled
      and it can endup using high order pages after few iterations.
      
      With help from Maxime Bizon, who pointed out that commit
      87151b86 (net: allow pskb_expand_head() to get maximum tailroom)
      introduced this regression for recycled skbs.
      
      Instead of fixing this bug, lets remove skb recycling.
      
      Drivers wanting really hot skbs should use build_skb() anyway,
      to allocate/populate sk_buff right before netif_receive_skb()
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Maxime Bizon <mbizon@freebox.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      acb600de
    • G
      infiniband: pass rdma_cm module to netlink_dump_start · 809d5fc9
      Gao feng 提交于
      set netlink_dump_control.module to avoid panic.
      Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
      Cc: Roland Dreier <roland@kernel.org>
      Cc: Sean Hefty <sean.hefty@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      809d5fc9
    • G
      netlink: add reference of module in netlink_dump_start · 6dc878a8
      Gao feng 提交于
      I get a panic when I use ss -a and rmmod inet_diag at the
      same time.
      
      It's because netlink_dump uses inet_diag_dump which belongs to module
      inet_diag.
      
      I search the codes and find many modules have the same problem.  We
      need to add a reference to the module which the cb->dump belongs to.
      
      Thanks for all help from Stephen,Jan,Eric,Steffen and Pablo.
      
      Change From v3:
      change netlink_dump_start to inline,suggestion from Pablo and
      Eric.
      
      Change From v2:
      delete netlink_dump_done,and call module_put in netlink_dump
      and netlink_sock_destruct.
      Signed-off-by: NGao feng <gaofeng@cn.fujitsu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6dc878a8
    • L
      Merge branch 'uapi-prep' of git://git.infradead.org/users/dhowells/linux-headers · ed5062dd
      Linus Torvalds 提交于
      Pull UAPI disintegration fixes from David Howells:
       "There are three main parts:
      
       (1) I found I needed some more fixups in the wake of testing Arm64
           (some asm/unistd.h files had weird guards that caused problems -
           mostly in arches for which I don't have a compiler) and some
           __KERNEL__ splitting needed to take place in Arm64.
      
       (2) I found that c6x was missing some __KERNEL__ guards in its
           asm/signal.h.  Mark Salter pointed me at a tree with a patch to
           remove that file entirely and use the asm-generic variant instead.
      
       (3) Lastly, m68k turned out to have a header installation problem due
           to it lacking a kvm_para.h file.
      
           The conditional installation bits for linux/kvm_para.h, linux/kvm.h
           and linux/a.out.h weren't very well specified - and didn't work if
           an arch didn't have the asm/ version of that file, but there *was*
           an asm-generic/ version.
      
           It seems the "ifneq $((wildcard ...),)" for each of those three
           headers in include/kernel/Kbuild is invoked twice during header
           installation, and the second time it matches on the just installed
           asm-generic/kvm_para.h file and thus incorrectly installs
           linux/kvm_para.h as well.
      
           Most arches actually have an asm/kvm_para.h, so this wasn't
           detectable in those."
      
      * 'uapi-prep' of git://git.infradead.org/users/dhowells/linux-headers:
        UAPI: Fix conditional header installation handling (notably kvm_para.h on m68k)
        c6x: remove c6x signal.h
        UAPI: Split compound conditionals containing __KERNEL__ in Arm64
        UAPI: Fix the guards on various asm/unistd.h files
        c6x: make dsk6455 the default config
      ed5062dd
    • L
      Merge branch 'slab/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux · 125b79d7
      Linus Torvalds 提交于
      Pull SLAB changes from Pekka Enberg:
       "New and noteworthy:
      
        * More SLAB allocator unification patches from Christoph Lameter and
          others.  This paves the way for slab memcg patches that hopefully
          will land in v3.8.
      
        * SLAB tracing improvements from Ezequiel Garcia.
      
        * Kernel tainting upon SLAB corruption from Dave Jones.
      
        * Miscellanous SLAB allocator bug fixes and improvements from various
          people."
      
      * 'slab/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/linux: (43 commits)
        slab: Fix build failure in __kmem_cache_create()
        slub: init_kmem_cache_cpus() and put_cpu_partial() can be static
        mm/slab: Fix kmem_cache_alloc_node_trace() declaration
        Revert "mm/slab: Fix kmem_cache_alloc_node_trace() declaration"
        mm, slob: fix build breakage in __kmalloc_node_track_caller
        mm/slab: Fix kmem_cache_alloc_node_trace() declaration
        mm/slab: Fix typo _RET_IP -> _RET_IP_
        mm, slub: Rename slab_alloc() -> slab_alloc_node() to match SLAB
        mm, slab: Rename __cache_alloc() -> slab_alloc()
        mm, slab: Match SLAB and SLUB kmem_cache_alloc_xxx_trace() prototype
        mm, slab: Replace 'caller' type, void* -> unsigned long
        mm, slob: Add support for kmalloc_track_caller()
        mm, slab: Remove silly function slab_buffer_size()
        mm, slob: Use NUMA_NO_NODE instead of -1
        mm, sl[au]b: Taint kernel when we detect a corrupted slab
        slab: Only define slab_error for DEBUG
        slab: fix the DEADLOCK issue on l3 alien lock
        slub: Zero initial memory segment for kmem_cache and kmem_cache_node
        Revert "mm/sl[aou]b: Move sysfs_slab_add to common"
        mm/sl[aou]b: Move kmem_cache refcounting to common code
        ...
      125b79d7