1. 17 Oct, 2006 11 commits
    • Andrew Morton's avatar
      [PATCH] PROC_NUMBUF is wrong · 0187f879
      Andrew Morton authored
      Actually, the decimal representation of a 32-bit signed number can take 12
      bytes, including the \0.
      
      And then some code adds a \n as well, so let's give it 13 bytes.
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      0187f879
    • Thomas Gleixner's avatar
      [PATCH] posix-cpu-timers: prevent signal delivery starvation · ac08c264
      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>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
      Cc: Daniel Walker <dwalker@mvista.com>
      Cc: Toyo Abe <toyoa@mvista.com>
      Cc: john stultz <johnstul@us.ibm.com>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Seongbae Park <spark@google.com>
      Cc: Peter Mattis <pmattis@google.com>
      Cc: Rohit Seth <rohitseth@google.com>
      Cc: Martin Bligh <mbligh@google.com>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      ac08c264
    • Akinobu Mita's avatar
      [PATCH] md: fix /proc/mdstat refcounting · e24650c2
      Akinobu Mita authored
      I have seen mdadm oops after successfully unloading md module.
      
      This patch privents from unloading md module while
      mdadm is polling /proc/mdstat.
      
      Cc: Neil Brown <neilb@suse.de>
      Signed-off-by: default avatarAkinbou Mita <akinobu.mita@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      e24650c2
    • Andrew Morton's avatar
      [PATCH] invalidate: remove_mapping() fix · a649fd92
      Andrew Morton authored
      If remove_mapping() failed to remove the page from its mapping, don't go and
      mark it not uptodate!  Makes kernel go dead.
      
      (Actually, I don't think the ClearPageUptodate is needed there at all).
      
      Says Nick Piggin:
      
         "Right, it isn't needed because at this point the page is guaranteed
          by remove_mapping to have no references (except us) and cannot pick
          up any new ones because it is removed from pagecache.
      
          We can delete it."
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Acked-by: default avatarNick Piggin <nickpiggin@yahoo.com.au>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      a649fd92
    • Dave Kleikamp's avatar
      [PATCH] null dereference in fs/jbd2/journal.c · 5eb30790
      Dave Kleikamp authored
      This is Eric Sesterhenn's jbd patch applied to jbd2.
      Commit: 41716c7c
      
      His words:
      
      Since commit d1807793 we dereference a NULL
      pointer.  Coverity id #1432.  We set journal to NULL, and use it directly
      afterwards.
      Signed-off-by: default avatarDave Kleikamp <shaggy@austin.ibm.com>
      Cc: Eric Sesterhenn <snakebyte@gmx.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      5eb30790
    • john stultz's avatar
      [PATCH] i386 Time: Avoid PIT SMP lockups · 3f4a0b91
      john stultz authored
      Avoid possible PIT livelock issues seen on SMP systems (and reported by
      Andi), by not allowing it as a clocksource on SMP boxes.
      
      However, since the PIT may no longer be present, we have to properly handle
      the cases where SMP systems have TSC skew and fall back from the TSC.
      Since the PIT isn't there, it would "fall back" to the TSC again.  So this
      changes the jiffies rating to 1, and the TSC-bad rating value to 0.
      
      Thus you will get the following behavior priority on i386 systems:
      
      tsc		[if present & stable]
      hpet		[if present]
      cyclone		[if present]
      acpi_pm		[if present]
      pit		[if UP]
      jiffies
      
      Rather then the current more complicated:
      tsc		[if present & stable]
      hpet		[if present]
      cyclone		[if present]
      acpi_pm		[if present]
      pit		[if cpus < 4]
      tsc		[if present & unstable]
      jiffies
      Signed-off-by: default avatarJohn Stultz <johnstul@us.ibm.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      3f4a0b91
    • Pierre Ossman's avatar
      [PATCH] New MMC maintainer · b9f5d804
      Pierre Ossman authored
      I will be taking over after Russell King as the new maintainer of the
      MMC layer.
      Signed-off-by: default avatarPierre Ossman <drzeus@drzeus.cx>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      b9f5d804
    • Ingo Molnar's avatar
      [PATCH] lockdep: increase max allowed recursion depth · ca268c69
      Ingo Molnar authored
      In general, lockdep warnings are intended to be non-fatal, so I have put in
      various practical limits on internal data structure failure modes.  We haven't
      had a /single/ lockdep-internal crash ever since lockdep went upstream [the
      unwinder crashes are outside of lockdep], and that's largely due to the good
      internal checks it does.
      
      Recursion within the dependency graph is currently limited to 20, that's
      probably not enough on some many-CPU boxes - this patch doubles it to 40.  I
      have written the lockdep functions to have as small stackframes as possible,
      so 40 should be OK too.  (The practical recursion limit should be somewhere
      between 100 and 200 entries.  If we hit that then I'll change the algorithm to
      be iteration-based.  Graph walking logic is so easy to program via recursion,
      so i'd like to keep recursion as long as possible.)
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      ca268c69
    • Paul Fulghum's avatar
      [PATCH] synclink: remove PAGE_SIZE reference · 623a4395
      Paul Fulghum authored
      Remove reference to PAGE_SIZE that causes errors if PAGE_SIZE != 4096
      Signed-off-by: default avatarPaul Fulghum <paulkf@microgate.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      623a4395
    • Brent Casavant's avatar
      [PATCH] ioc4: Enable build on non-SN2 · 59f14800
      Brent Casavant authored
      The SGI PCI-RT card, based on the SGI IOC4 chip, will be made available on
      Altix XE (x86_64) platforms in the near future.  As such it is now a
      misnomer for the IOC4 base device driver to live under drivers/sn, and
      would complicate builds for non-SN2.
      
      This patch moves the IOC4 base driver code from drivers/sn to drivers/misc,
      and updates the associated Makefiles and Kconfig files to allow building on
      non-SN2 configs.  Due to the resulting change in link order, it is now
      necessary to use late_initcall() for IOC4 subdriver initialization.
      
      [akpm@osdl.org: __udivdi3 fix]
      [akpm@osdl.org: fix default in Kconfig]
      Acked-by: default avatarPat Gefre <pfg@sgi.com>
      Acked-by: default avatarJeremy Higdon <jeremy@sgi.com>
      Signed-off-by: default avatarBrent Casavant <bcasavan@sgi.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      59f14800
    • Brent Casavant's avatar
      [PATCH] ioc4: Remove SN2 feature and config dependencies · 107d5a72
      Brent Casavant authored
      The SGI PCI-RT card, based on the SGI IOC4 chip, will be made available on
      Altix XE (x86_64) platforms in the near future.  As such dependencies on
      SN2-specific features and config dependencies need to be removed.
      
      This patch updates the Kconfig files to remove the config dependency, and
      updates the IOC4 bus speed detection routine to use universally available
      time interfaces instead of mmtimer.
      Signed-off-by: default avatarBrent Casavant <bcasavan@sgi.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      107d5a72
  2. 16 Oct, 2006 29 commits