21 Oct, 2005

4 commits

  • It is legitimate to call tcp_fragment with len == skb->len since
    that is done for FIN packets and the FIN flag counts as one byte.
    So we should only check for the len > skb->len case.

    Signed-off-by: Herbert Xu
    Signed-off-by: Arnaldo Carvalho de Melo

    Herbert Xu
     
  • Turns out the problem has nothing to do with use-after-free or double-free.
    It's just that we're not clearing the CB area and DCCP unlike TCP uses a CB
    format that's incompatible with IP.

    Signed-off-by: Herbert Xu
    Signed-off-by: Ian McDonald
    Signed-off-by: Arnaldo Carvalho de Melo

    Herbert Xu
     
  • icmp_send doesn't use skb->sk at all so even if skb->sk has already
    been freed it can't cause crash there (it would've crashed somewhere
    else first, e.g., ip_queue_xmit).

    I found a double-free on an skb that could explain this though.
    dccp_sendmsg and dccp_write_xmit are a little confused as to what
    should free the packet when something goes wrong. Sometimes they
    both go for the ball and end up in each other's way.

    This patch makes dccp_write_xmit always free the packet no matter
    what. This makes sense since dccp_transmit_skb which in turn comes
    from the fact that ip_queue_xmit always frees the packet.

    Signed-off-by: Herbert Xu
    Signed-off-by: Arnaldo Carvalho de Melo

    Herbert Xu
     
  • David S. Miller wrote:
    > One thing you can probably do for this bug is to mark data packets
    > explicitly somehow, perhaps in the SKB control block DCCP already
    > uses for other data. Put some boolean in there, set it true for
    > data packets. Then change the test in dccp_transmit_skb() as
    > appropriate to test the boolean flag instead of "skb_cloned(skb)".

    I agree. In fact we already have that flag, it's called skb->sk.
    So here is patch to test that instead of skb_cloned().

    Signed-off-by: Herbert Xu
    Acked-by: Ian McDonald
    Signed-off-by: Arnaldo Carvalho de Melo

    Herbert Xu
     

16 Oct, 2005

1 commit


14 Oct, 2005

3 commits


13 Oct, 2005

2 commits

  • This is the second report of this bug. Unfortunately the first
    reporter hasn't been able to reproduce it since to provide more
    debugging info.

    So let's apply this patch for 2.6.14 to

    1) Make this non-fatal.
    2) Provide the info we need to track it down.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • This fixes the RCU race on bridge delete interface. Basically,
    the network device has to be detached from the bridge in the first
    step (pre-RCU), rather than later. At that point, no more bridge traffic
    will come in, and the other code will not think that network device
    is part of a bridge.

    This should also fix the XEN test problems.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     

11 Oct, 2005

14 commits


09 Oct, 2005

1 commit

  • - added typedef unsigned int __nocast gfp_t;

    - replaced __nocast uses for gfp flags with gfp_t - it gives exactly
    the same warnings as far as sparse is concerned, doesn't change
    generated code (from gcc point of view we replaced unsigned int with
    typedef) and documents what's going on far better.

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     

08 Oct, 2005

1 commit


07 Oct, 2005

2 commits


06 Oct, 2005

5 commits


05 Oct, 2005

7 commits

  • Fix implicit nocast warnings in xfrm code:
    net/xfrm/xfrm_policy.c:232:47: warning: implicit cast to nocast type

    Signed-off-by: Randy Dunlap
    Signed-off-by: David S. Miller

    Randy Dunlap
     
  • Fix nocast sparse warnings:
    net/rxrpc/call.c:2013:25: warning: implicit cast to nocast type
    net/rxrpc/connection.c:538:46: warning: implicit cast to nocast type
    net/sunrpc/sched.c:730:36: warning: implicit cast to nocast type
    net/sunrpc/sched.c:734:56: warning: implicit cast to nocast type

    Signed-off-by: Randy Dunlap
    Signed-off-by: David S. Miller

    Randy Dunlap
     
  • Fix implicit nocast warnings in net/key code:
    net/key/af_key.c:195:27: warning: implicit cast to nocast type
    net/key/af_key.c:1439:28: warning: implicit cast to nocast type

    Signed-off-by: Randy Dunlap
    Signed-off-by: David S. Miller

    Randy Dunlap
     
  • Fix implicit nocast warnings in nfnetlink code:
    net/netfilter/nfnetlink.c:204:43: warning: implicit cast to nocast type

    Signed-off-by: Randy Dunlap
    Signed-off-by: David S. Miller

    Randy Dunlap
     
  • From: Randy Dunlap

    Fix implicit nocast warnings in ip_vs code:
    net/ipv4/ipvs/ip_vs_app.c:631:54: warning: implicit cast to nocast type

    Signed-off-by: Randy Dunlap
    Signed-off-by: David S. Miller

    Randy Dunlap
     
  • Fix implicit nocast warnings in decnet code:
    net/decnet/af_decnet.c:458:40: warning: implicit cast to nocast type
    net/decnet/dn_nsp_out.c:125:35: warning: implicit cast to nocast type
    net/decnet/dn_nsp_out.c:219:29: warning: implicit cast to nocast type

    Signed-off-by: Randy Dunlap
    Signed-off-by: David S. Miller

    Randy Dunlap
     
  • Fix implicit nocast warnings in atm code:
    net/atm/atm_misc.c:35:44: warning: implicit cast to nocast type
    drivers/atm/fore200e.c:183:33: warning: implicit cast to nocast type

    Also use kzalloc() instead of kmalloc().

    Signed-off-by: Randy Dunlap
    Signed-off-by: David S. Miller

    Randy Dunlap