1. 04 Jan, 2008 2 commits
    • Eric Dumazet's avatar
      [XFRM]: Do not define km_migrate() if !CONFIG_XFRM_MIGRATE · 2d60abc2
      Eric Dumazet authored
      In include/net/xfrm.h we find :
      
      #ifdef CONFIG_XFRM_MIGRATE
      extern int km_migrate(struct xfrm_selector *sel, u8 dir, u8 type,
                            struct xfrm_migrate *m, int num_bundles);
      ...
      #endif
      
      We can also guard the function body itself in net/xfrm/xfrm_state.c
      with same condition.
      
      (Problem spoted by sparse checker)
      make C=2 net/xfrm/xfrm_state.o
      ...
      net/xfrm/xfrm_state.c:1765:5: warning: symbol 'km_migrate' was not declared. Should it be static?
      ...
      Signed-off-by: default avatarEric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2d60abc2
    • Julia Lawall's avatar
      [X25]: Add missing x25_neigh_put · 76975f8a
      Julia Lawall authored
      The function x25_get_neigh increments a reference count.  At the point of
      the second goto out, the result of calling x25_get_neigh is only stored in
      a local variable, and thus no one outside the function will be able to
      decrease the reference count.  Thus, x25_neigh_put should be called before
      the return in this case.
      
      The problem was found using the following semantic match.
      (http://www.emn.fr/x-info/coccinelle/)
      
      // <smpl>
      
      @@
      type T,T1,T2;
      identifier E;
      statement S;
      expression x1,x2,x3;
      int ret;
      @@
      
        T E;
        ...
      * if ((E = x25_get_neigh(...)) == NULL)
        S
        ... when != x25_neigh_put(...,(T1)E,...)
            when != if (E != NULL) { ... x25_neigh_put(...,(T1)E,...); ...}
            when != x1 = (T1)E
            when != E = x3;
            when any
        if (...) {
          ... when != x25_neigh_put(...,(T2)E,...)
              when != if (E != NULL) { ... x25_neigh_put(...,(T2)E,...); ...}
              when != x2 = (T2)E
      (
      *   return;
      |
      *   return ret;
      )
        }
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      76975f8a
  2. 03 Jan, 2008 13 commits
  3. 02 Jan, 2008 8 commits
  4. 01 Jan, 2008 6 commits
  5. 31 Dec, 2007 2 commits
  6. 30 Dec, 2007 4 commits
    • Ingo Molnar's avatar
      sched: fix gcc warnings · 90b2628f
      Ingo Molnar authored
      Meelis Roos reported these warnings on sparc64:
      
        CC      kernel/sched.o
        In file included from kernel/sched.c:879:
        kernel/sched_debug.c: In function 'nsec_high':
        kernel/sched_debug.c:38: warning: comparison of distinct pointer types lacks a cast
      
      the debug check in do_div() is over-eager here, because the long long
      is always positive in these places. Mark this by casting them to
      unsigned long long.
      
      no change in code output:
      
         text    data     bss     dec     hex filename
        51471    6582     376   58429    e43d sched.o.before
        51471    6582     376   58429    e43d sched.o.after
      
        md5:
         7f7729c111f185bf3ccea4d542abc049  sched.o.before.asm
         7f7729c111f185bf3ccea4d542abc049  sched.o.after.asm
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      90b2628f
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 · e697789d
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
        [SERIAL]: Fix section mismatches in Sun serial console drivers.
      e697789d
    • Dave Young's avatar
      [BLUETOOTH]: put_device before device_del fix · 38b7da09
      Dave Young authored
      Because of workqueue delay, the put_device could be called before
      device_del, so move it to del_conn.
      
      Signed-off-by: Dave Young <hidave.darkstar@gmail.com> 
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      38b7da09
    • Gavin McCullagh's avatar
      [TCP]: use non-delayed ACK for congestion control RTT · 2072c228
      Gavin McCullagh authored
      When a delayed ACK representing two packets arrives, there are two RTT
      samples available, one for each packet.  The first (in order of seq
      number) will be artificially long due to the delay waiting for the
      second packet, the second will trigger the ACK and so will not itself
      be delayed.
      
      According to rfc1323, the SRTT used for RTO calculation should use the
      first rtt, so receivers echo the timestamp from the first packet in
      the delayed ack.  For congestion control however, it seems measuring
      delayed ack delay is not desirable as it varies independently of
      congestion.
      
      The patch below causes seq_rtt and last_ackt to be updated with any
      available later packet rtts which should have less (and hopefully
      zero) delack delay.  The rtt value then gets passed to
      ca_ops->pkts_acked().
      
      Where TCP_CONG_RTT_STAMP was set, effort was made to supress RTTs from
      within a TSO chunk (!fully_acked), using only the final ACK (which
      includes any TSO delay) to generate RTTs.  This patch removes these
      checks so RTTs are passed for each ACK to ca_ops->pkts_acked().
      
      For non-delay based congestion control (cubic, h-tcp), rtt is
      sometimes used for rtt-scaling.  In shortening the RTT, this may make
      them a little less aggressive.  Delay-based schemes (eg vegas, veno,
      illinois) should get a cleaner, more accurate congestion signal,
      particularly for small cwnds.  The congestion control module can
      potentially also filter out bad RTTs due to the delayed ack alarm by
      looking at the associated cnt which (where delayed acking is in use)
      should probably be 1 if the alarm went off or greater if the ACK was
      triggered by a packet.
      Signed-off-by: default avatarGavin McCullagh <gavin.mccullagh@nuim.ie>
      Acked-by: default avatarIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2072c228
  7. 29 Dec, 2007 1 commit
    • David S. Miller's avatar
      [SERIAL]: Fix section mismatches in Sun serial console drivers. · fb445ee5
      David S. Miller authored
      We're exporting an __init function, oops :-)
      
      The core issue here is that add_preferred_console() is marked
      as __init, this makes it impossible to invoke this thing from
      a driver probe routine which is what the Sparc serial drivers
      need to do.
      
      There is no harm in dropping the __init marker.  This code will
      actually work properly when invoked from a modular driver,
      except that init will probably not pick up the console change
      without some other support code.
      
      Then we can drop the __init from sunserial_console_match()
      and we're no longer exporting an __init function to modules.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fb445ee5
  8. 28 Dec, 2007 4 commits