09 Oct, 2012

10 commits

  • After the change "Adjust semantics of rt->rt_gateway"
    (commit f8126f1d51) rt_gateway can be 0 but ip_forward() compares
    it directly with nexthop. What we want here is to check if traffic
    is to directly connected nexthop and to fail if using gateway.

    Signed-off-by: Julian Anastasov
    Signed-off-by: David S. Miller

    Julian Anastasov
     
  • After "Cache input routes in fib_info nexthops" (commit
    d2d68ba9fe) and "Elide fib_validate_source() completely when possible"
    (commit 7a9bc9b81a) we can not send ICMP redirects. It seems we
    should not cache the RTCF_DOREDIRECT flag in nh_rth_input because
    the same fib_info can be used for traffic that is not redirected,
    eg. from other input devices or from sources that are not in same subnet.

    As result, we have to disable the caching of RTCF_DOREDIRECT
    flag and to force source validation for the case when forwarding
    traffic to the input device. If traffic comes from directly connected
    source we allow redirection as it was done before both changes.

    Avoid setting RTCF_DOREDIRECT if IN_DEV_TX_REDIRECTS
    is disabled, this can avoid source address validation and to
    help caching the routes.

    After the change "Adjust semantics of rt->rt_gateway"
    (commit f8126f1d51) we should make sure our ICMP_REDIR_HOST messages
    contain daddr instead of 0.0.0.0 when target is directly connected.

    Signed-off-by: Julian Anastasov
    Signed-off-by: David S. Miller

    Julian Anastasov
     
  • It seems IPV6_GRO_CB(skb)->proto can be destroyed in skb_gro_receive()
    if a new skb is allocated (to serve as an anchor for frag_list)

    We copy NAPI_GRO_CB() only (not the IPV6 specific part) in :

    *NAPI_GRO_CB(nskb) = *NAPI_GRO_CB(p);

    So we leave IPV6_GRO_CB(nskb)->proto to 0 (fresh skb allocation) instead
    of IPPROTO_TCP (6)

    ipv6_gro_complete() isnt able to call ops->gro_complete()
    [ tcp6_gro_complete() ]

    Fix this by moving proto in NAPI_GRO_CB() and getting rid of
    IPV6_GRO_CB

    Signed-off-by: Eric Dumazet
    Cc: Herbert Xu
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • 6a32e4f9dd9219261f8856f817e6655114cfec2f made the vlan code skip marking
    vlan-tagged frames for not locally configured vlans as PACKET_OTHERHOST if
    there was an rx_handler, as the rx_handler could cause the frame to be received
    on a different (virtual) vlan-capable interface where that vlan might be
    configured.

    As rx_handlers do not necessarily return RX_HANDLER_ANOTHER, this could cause
    frames for unknown vlans to be delivered to the protocol stack as if they had
    been received untagged.

    For example, if an ipv6 router advertisement that's tagged for a locally not
    configured vlan is received on an interface with macvlan interfaces attached,
    macvlan's rx_handler returns RX_HANDLER_PASS after delivering the frame to the
    macvlan interfaces, which caused it to be passed to the protocol stack, leading
    to ipv6 addresses for the announced prefix being configured even though those
    are completely unusable on the underlying interface.

    The fix moves marking as PACKET_OTHERHOST after the rx_handler so the
    rx_handler, if there is one, sees the frame unchanged, but afterwards,
    before the frame is delivered to the protocol stack, it gets marked whether
    there is an rx_handler or not.

    Signed-off-by: Florian Zumbiehl
    Signed-off-by: David S. Miller

    Florian Zumbiehl
     
  • Current GRO can hold packets in gro_list for almost unlimited
    time, in case napi->poll() handler consumes its budget over and over.

    In this case, napi_complete()/napi_gro_flush() are not called.

    Another problem is that gro_list is flushed in non friendly way :
    We scan the list and complete packets in the reverse order.
    (youngest packets first, oldest packets last)
    This defeats priorities that sender could have cooked.

    Since GRO currently only store TCP packets, we dont really notice the
    bug because of retransmits, but this behavior can add unexpected
    latencies, particularly on mice flows clamped by elephant flows.

    This patch makes sure no packet can stay more than 1 ms in queue, and
    only in stress situations.

    It also complete packets in the right order to minimize latencies.

    Signed-off-by: Eric Dumazet
    Cc: Herbert Xu
    Cc: Jesse Gross
    Cc: Tom Herbert
    Cc: Yuchung Cheng
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Marvell 88E8001 on an ASUS P5NSLI motherboard is unable to send/receive
    packets on a system with >4gb ram unless a 32bit DMA mask is used.

    This issue has been around for years and a fix was sent 3.5 years ago, but
    there was some debate as to whether it should instead be fixed as a PCI quirk.
    http://www.spinics.net/lists/netdev/msg88670.html

    However, 18 months later a similar workaround was introduced for another
    chipset exhibiting the same problem.
    http://www.spinics.net/lists/netdev/msg142287.html

    Signed-off-by: Graham Gower
    Signed-off-by: Jan Ceuleers
    Acked-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Graham Gower
     
  • This patch fixes type assignment issues, function definition and symbol
    shadowing which triggered sparse warnings.

    Signed-off-by: Jay Hernandez
    Signed-off-by: Vipul Pandya
    Signed-off-by: David S. Miller

    Vipul Pandya
     
  • We report cached pmtu values even if they are already expired.
    Change this to not report these values after they are expired
    and fix a race in the expire time calculation, as suggested by
    Eric Dumazet.

    Signed-off-by: Steffen Klassert
    Signed-off-by: David S. Miller

    Steffen Klassert
     
  • When a local tool like tracepath tries to send packets bigger than
    the device mtu, we create a nh exeption and set the pmtu to device
    mtu. The device mtu does not expire, so check if the device mtu is
    smaller than the reported pmtu and don't crerate a nh exeption in
    that case.

    Signed-off-by: Steffen Klassert
    Signed-off-by: David S. Miller

    Steffen Klassert
     
  • Some protocols, like IPsec still cache routes. So we need to invalidate
    the old route on pmtu events to avoid the reuse of stale routes.
    We also need to update the mtu and expire time of the route if we already
    use a nh exception route, otherwise we ignore newly learned pmtu values
    after the first expiration.

    With this patch we always invalidate or update the route on pmtu events.

    Signed-off-by: Steffen Klassert
    Signed-off-by: David S. Miller

    Steffen Klassert
     

08 Oct, 2012

24 commits

  • MEMWIN0_APERTURE is the size in bytes.

    Signed-off-by: Dan Carpenter
    Signed-off-by: David S. Miller

    Dan Carpenter
     
  • 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: Wei Yongjun
    Signed-off-by: David S. Miller

    Wei Yongjun
     
  • Remove including that don't need it.

    dpatch engine is used to auto generate this patch.
    (https://github.com/weiyj/dpatch)

    Signed-off-by: Wei Yongjun
    Signed-off-by: David S. Miller

    Wei Yongjun
     
  • 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: Eric Dumazet
    Cc: Herbert Xu
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • IPv4 side of the problem was addressed in commit a9e050f4e7f9d
    (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: Eric Dumazet
    Cc: Herbert Xu
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • 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: Ramesh Nagappa
    Reviewed-by: Shawn Lu
    Reviewed-by: Robert Coulson
    Reviewed-by: Billie Alsup
    Signed-off-by: David S. Miller

    ramesh.nagappa@gmail.com
     
  • 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/)

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: David S. Miller

    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/)

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: David S. Miller

    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/)

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: David S. Miller

    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/)

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: David S. Miller

    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/)

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: David S. Miller

    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/)

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: David S. Miller

    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/)

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: David S. Miller

    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/)

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: David S. Miller

    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/)

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: David S. Miller

    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/)

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: David S. Miller

    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/)

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: David S. Miller

    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/)

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: David S. Miller

    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/)

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: David S. Miller

    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/)

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: David S. Miller

    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/)

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: David S. Miller

    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/)

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: David S. Miller

    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/)

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Peter Senna Tschudin
    Acked-by: Francois Romieu
    Signed-off-by: David S. Miller

    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/)

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }
    //

    Signed-off-by: Peter Senna Tschudin
    Signed-off-by: David S. Miller

    Peter Senna Tschudin
     

07 Oct, 2012

6 commits

  • 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
    87151b8689d (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: Eric Dumazet
    Cc: Maxime Bizon
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • set netlink_dump_control.module to avoid panic.

    Signed-off-by: Gao feng
    Cc: Roland Dreier
    Cc: Sean Hefty
    Signed-off-by: David S. Miller

    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: Gao feng
    Signed-off-by: David S. Miller

    Gao feng
     
  • 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

    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
    ...

    Linus Torvalds
     
  • Pull ADM Xen support from Konrad Rzeszutek Wilk:

    Features:
    * Allow a Linux guest to boot as initial domain and as normal guests
    on Xen on ARM (specifically ARMv7 with virtualized extensions). PV
    console, block and network frontend/backends are working.
    Bug-fixes:
    * Fix compile linux-next fallout.
    * Fix PVHVM bootup crashing.

    The Xen-unstable hypervisor (so will be 4.3 in a ~6 months), supports
    ARMv7 platforms.

    The goal in implementing this architecture is to exploit the hardware
    as much as possible. That means use as little as possible of PV
    operations (so no PV MMU) - and use existing PV drivers for I/Os
    (network, block, console, etc). This is similar to how PVHVM guests
    operate in X86 platform nowadays - except that on ARM there is no need
    for QEMU. The end result is that we share a lot of the generic Xen
    drivers and infrastructure.

    Details on how to compile/boot/etc are available at this Wiki:

    http://wiki.xen.org/wiki/Xen_ARMv7_with_Virtualization_Extensions

    and this blog has links to a technical discussion/presentations on the
    overall architecture:

    http://blog.xen.org/index.php/2012/09/21/xensummit-sessions-new-pvh-virtualisation-mode-for-arm-cortex-a15arm-servers-and-x86/

    * tag 'stable/for-linus-3.7-arm-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: (21 commits)
    xen/xen_initial_domain: check that xen_start_info is initialized
    xen: mark xen_init_IRQ __init
    xen/Makefile: fix dom-y build
    arm: introduce a DTS for Xen unprivileged virtual machines
    MAINTAINERS: add myself as Xen ARM maintainer
    xen/arm: compile netback
    xen/arm: compile blkfront and blkback
    xen/arm: implement alloc/free_xenballooned_pages with alloc_pages/kfree
    xen/arm: receive Xen events on ARM
    xen/arm: initialize grant_table on ARM
    xen/arm: get privilege status
    xen/arm: introduce CONFIG_XEN on ARM
    xen: do not compile manage, balloon, pci, acpi, pcpu and cpu_hotplug on ARM
    xen/arm: Introduce xen_ulong_t for unsigned long
    xen/arm: Xen detection and shared_info page mapping
    docs: Xen ARM DT bindings
    xen/arm: empty implementation of grant_table arch specific functions
    xen/arm: sync_bitops
    xen/arm: page.h definitions
    xen/arm: hypercalls
    ...

    Linus Torvalds