1. 03 12月, 2006 17 次提交
  2. 25 10月, 2006 1 次提交
  3. 22 10月, 2006 1 次提交
    • G
      [DCCP]: Fix Oops in DCCPv6 · 82709531
      Gerrit Renker 提交于
      I think I got the cause for the Oops observed in
      http://www.mail-archive.com/dccp@vger.kernel.org/msg00578.html
      
      The problem is always with applications listening on PF_INET6 sockets. Apart
      from the mentioned oops, I observed another one one, triggered at irregular
      intervals via timer interrupt:
      
          run_timer_softirq -> dccp_keepalive_timer
                            -> inet_csk_reqsk_queue_prune
                            -> reqsk_free
                            -> dccp_v6_reqsk_destructor
      
      The latter function is the problem and is also the last function to be called
      in said kernel panic.
      
      In any case, there is a real problem with allocating the right request_sock
      which is what this patch tackles.
      
      It fixes the following problem:
       - application listens on PF_INET6
       - DCCPv4 packet comes in, is handed over to dccp_v4_do_rcv, from there
         to dccp_v4_conn_request
      
      Now: socket is PF_INET6, packet is IPv4. The following code then furnishes the
      connection with IPv6 - request_sock operations:
      
         req = reqsk_alloc(sk->sk_prot->rsk_prot);
      
      The first problem is that all further incoming packets will get a Reset since
      the connection can not be looked up.
      
      The second problem is worse:
       --> reqsk_alloc is called instead of inet6_reqsk_alloc
       --> consequently inet6_rsk_offset is never set (dangling pointer)
       --> the request_sock_ops are nevertheless still dccp6_request_ops
       --> destructor is called via reqsk_free
       --> dccp_v6_reqsk_destructor tries to free random memory location (inet6_rsk_offset not set)
       --> panic
      
      I have tested this for a while, DCCP sockets are now handled correctly in all
      three scenarios (v4/v6 only/v4-mapped).
      
      Commiter note: I've added the dccp_request_sock_ops forward declaration to keep
                     the tree building and to reduce the size of the patch for 2.6.19,
                     later I'll move the functions to the top of the affected source
                     code to match what we have in the TCP counterpart, where this
                     problem hasn't existed in the first place, dumb me not to have
                     done the same thing on DCCP land 8)
      Signed-off-by: NGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      82709531
  4. 12 10月, 2006 1 次提交
  5. 29 9月, 2006 1 次提交
  6. 25 9月, 2006 1 次提交
  7. 23 9月, 2006 3 次提交
  8. 25 7月, 2006 1 次提交
    • I
      [DCCP]: Fix default sequence window size · 4b79f0af
      Ian McDonald 提交于
      When using the default sequence window size (100) I got the following in
      my logs:
      
      Jun 22 14:24:09 localhost kernel: [ 1492.114775] DCCP: Step 6 failed for
      DATA packet, (LSWL(6279674225) <= P.seqno(6279674749) <=
      S.SWH(6279674324)) and (P.ackno doesn't exist or LAWL(18798206530) <=
      P.ackno(1125899906842620) <= S.AWH(18798206548), sending SYNC...
      Jun 22 14:24:09 localhost kernel: [ 1492.115147] DCCP: Step 6 failed for
      DATA packet, (LSWL(6279674225) <= P.seqno(6279674750) <=
      S.SWH(6279674324)) and (P.ackno doesn't exist or LAWL(18798206530) <=
      P.ackno(1125899906842620) <= S.AWH(18798206549), sending SYNC...
      
      I went to alter the default sysctl and it didn't take for new sockets.
      Below patch fixes this.
      
      I think the default is too low but it is what the DCCP spec specifies.
      
      As a side effect of this my rx speed using iperf goes from about 2.8 Mbits/sec
      to 3.5. This is still far too slow but it is a step in the right direction.
      
      Compile tested only for IPv6 but not particularly complex change.
      
      Signed off by: Ian McDonald <ian.mcdonald@jandi.co.nz>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4b79f0af
  9. 01 7月, 2006 1 次提交
  10. 12 4月, 2006 1 次提交
  11. 21 3月, 2006 12 次提交