1. 11 Nov, 2006 4 commits
    • Adrian Bunk's avatar
      Linux 2.6.16.32-rc1 · ae92a0d0
      Adrian Bunk authored
      ae92a0d0
    • Christoph Lameter's avatar
      Fix longstanding load balancing bug in the scheduler · ef147950
      Christoph Lameter authored
      The scheduler will stop load balancing if the most busy processor contains
      processes pinned via processor affinity.
      
      The scheduler currently only does one search for busiest cpu.  If it cannot
      pull any tasks away from the busiest cpu because they were pinned then the
      scheduler goes into a corner and sulks leaving the idle processors idle.
      
      F.e.  If you have processor 0 busy running four tasks pinned via taskset,
      there are none on processor 1 and one just started two processes on
      processor 2 then the scheduler will not move one of the two processes away
      from processor 2.
      
      This patch fixes that issue by forcing the scheduler to come out of its
      corner and retrying the load balancing by considering other processors for
      load balancing.
      
      This patch was originally developed by John Hawkes and discussed at
      
          http://marc.theaimsgroup.com/?l=linux-kernel&m=113901368523205&w=2.
      
      I have removed extraneous material and gone back to equipping struct rq
      with the cpu the queue is associated with since this makes the patch much
      easier and it is likely that others in the future will have the same
      difficulty of figuring out which processor owns which runqueue.
      
      The overhead added through these patches is a single word on the stack if
      the kernel is configured to support 32 cpus or less (32 bit).  For 32 bit
      environments the maximum number of cpus that can be configued is 255 which
      would result in the use of 32 bytes additional on the stack.  On IA64 up to
      1k cpus can be configured which will result in the use of 128 additional
      bytes on the stack.  The maximum additional cache footprint is one
      cacheline.  Typically memory use will be much less than a cacheline and the
      additional cpumask will be placed on the stack in a cacheline that already
      contains other local variable.
      Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      ef147950
    • Tejun Heo's avatar
      sata_sil24: add a new PCI ID for SiI 3124 · f9a198cc
      Tejun Heo authored
      Add a new PCI ID for SiI 3124.  Reported by Silicon Image.
      Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      f9a198cc
    • Kirill Korotaev's avatar
      ia64/sparc: fix local DoS with corrupted ELFs (CVE-2006-4538) · 05c19c43
      Kirill Korotaev authored
      This patch prevents cross-region mappings
      on IA64 and SPARC which could lead to system crash.
      
      Adrian Bunk:
      Adapted to 2.6.16.
      Signed-Off-By: default avatarKirill Korotaev <dev@openvz.org>
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      05c19c43
  2. 10 Nov, 2006 5 commits
  3. 09 Nov, 2006 8 commits
  4. 08 Nov, 2006 7 commits
  5. 07 Nov, 2006 10 commits
  6. 05 Nov, 2006 6 commits
    • Adrian Bunk's avatar
      Linux 2.6.16.31-rc1 · afaa018c
      Adrian Bunk authored
      afaa018c
    • Patrick McHardy's avatar
      [NETFILTER]: Fix ip6_tables extension header bypass bug (CVE-2006-4572) · 0ddfcc96
      Patrick McHardy authored
      As reported by Mark Dowd <Mark_Dowd@McAfee.com>, ip6_tables is susceptible
      to a fragmentation attack causing false negatives on extension header
      matches.
      
      When extension headers occur in the non-first fragment after the fragment
      header (possibly with an incorrect nexthdr value in the fragment header)
      a rule looking for this extension header will never match.
      
      Drop fragments that are at offset 0 and don't contain the final protocol
      header regardless of the ruleset, since this should not happen normally.
      Since all extension headers are before the protocol header this makes sure
      an extension header is either not present or in the first fragment, where
      we can properly parse it.
      
      With help from Yasuyuki KOZAKAI <yasuyuki.kozakai@toshiba.co.jp>.
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      0ddfcc96
    • Patrick McHardy's avatar
      [NETFILTER]: Fix ip6_tables protocol bypass bug (CVE-2006-4572) · 6ac62be8
      Patrick McHardy authored
      As reported by Mark Dowd <Mark_Dowd@McAfee.com>, ip6_tables is susceptible
      to a fragmentation attack causing false negatives on protocol matches.
      
      When the protocol header doesn't follow the fragment header immediately,
      the fragment header contains the protocol number of the next extension
      header. When the extension header and the protocol header are sent in
      a second fragment a rule like "ip6tables .. -p udp -j DROP" will never
      match.
      
      Drop fragments that are at offset 0 and don't contain the final protocol
      header regardless of the ruleset, since this should not happen normally.
      
      With help from Yasuyuki KOZAKAI <yasuyuki.kozakai@toshiba.co.jp>.
      Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      6ac62be8
    • Neil Brown's avatar
      knfsd: Fix race that can disable NFS server. · 0ac0a208
      Neil Brown authored
      This is a long standing bug that seems to have only recently become
      apparent, presumably due to increasing use of NFS over TCP - many
      distros seem to be making it the default.
      
      The SK_CONN bit gets set when a listening socket may be ready
      for an accept, just as SK_DATA is set when data may be available.
      
      It is entirely possible for svc_tcp_accept to be called with neither
      of these set.  It doesn't happen often but there is a small race in
      svc_sock_enqueue as SK_CONN and SK_DATA are tested outside the
      spin_lock.  They could be cleared immediately after the test and
      before the lock is gained.
      
      This normally shouldn't be a problem.  The sockets are non-blocking so
      trying to read() or accept() when ther is nothing to do is not a problem.
      
      However: svc_tcp_recvfrom makes the decision "Should I accept() or
      should I read()" based on whether SK_CONN is set or not.  This usually
      works but is not safe.  The decision should be based on whether it is
      a TCP_LISTEN socket or a TCP_CONNECTED socket.
      Signed-off-by: default avatarNeil Brown <neilb@suse.de>
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      0ac0a208
    • Thomas Gleixner's avatar
      posix-cpu-timers: prevent signal delivery starvation · fe8187b8
      Thomas Gleixner authored
      The integer divisions in the timer accounting code can round the result
      down to 0.  Adding 0 is without effect and the signal delivery stops.
      
      Clamp the division result to minimum 1 to avoid this.
      
      Problem was reported by Seongbae Park <spark@google.com>, who provided
      also an inital patch.
      
      Roland sayeth:
      
        I have had some more time to think about the problem, and to reproduce it
        using Toyo's test case.  For the record, if my understanding of the problem
        is correct, this happens only in one very particular case.  First, the
        expiry time has to be so soon that in cputime_t units (usually 1s/HZ ticks)
        it's < nthreads so the division yields zero.  Second, it only affects each
        thread that is so new that its CPU time accumulation is zero so now+0 is
        still zero and ->it_*_expires winds up staying zero.  For the VIRT and PROF
        clocks when cputime_t is tick granularity (or the SCHED clock on
        configurations where sched_clock's value only advances on clock ticks), this
        is not hard to arrange with new threads starting up and blocking before they
        accumulate a whole tick of CPU time.  That's what happens in Toyo's test
        case.
      
        Note that in general it is fine for that division to round down to zero,
        and set each thread's expiry time to its "now" time.  The problem only
        arises with thread's whose "now" value is still zero, so that now+0 winds up
        0 and is interpreted as "not set" instead of ">= now".  So it would be a
        sufficient and more precise fix to just use max(ticks, 1) inside the loop
        when setting each it_*_expires value.
      
        But, it does no harm to round the division up to one and always advance
        every thread's expiry time.  If the thread didn't already fire timers for
        the expiry time of "now", there is no expectation that it will do so before
        the next tick anyway.  So I followed Thomas's patch in lifting the max out
        of the loops.
      
        This patch also covers the reload cases, which are harder to write a test
        for (and I didn't try).  I've tested it with Toyo's case and it fixes that.
      
      [toyoa@mvista.com: fix: min_t -> max_t]
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      fe8187b8
    • James Morris's avatar
      [IPV6]: fix lockup via /proc/net/ip6_flowlabel (CVE-2006-5619) · d1ce361a
      James Morris authored
      There's a bug in the seqfile handling for /proc/net/ip6_flowlabel, where,
      after finding a flowlabel, the code will loop forever not finding any
      further flowlabels, first traversing the rest of the hash bucket then just
      looping.
      
      This patch fixes the problem by breaking after the hash bucket has been
      traversed.
      
      Note that this bug can cause lockups and oopses, and is trivially invoked
      by an unpriveleged user.
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
      d1ce361a