24 Mar, 2006

40 commits

  • This patch series creates a strndup_user() function to easy copying C strings
    from userspace. Also we avoid common pitfalls like userspace modifying the
    final \0 after the strlen_user().

    Signed-off-by: Davi Arnaut
    Cc: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Davi Arnaut
     
  • Make the softlockup detector purely timer-interrupt driven, removing
    softirq-context (timer) dependencies. This means that if the softlockup
    watchdog triggers, it has truly observed a longer than 10 seconds
    scheduling delay of a SCHED_FIFO prio 99 task.

    (the patch also turns off the softlockup detector during the initial bootup
    phase and does small style fixes)

    Signed-off-by: Ingo Molnar
    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • If the change of personality does not lead to change of exec domain,
    __set_personality() returned without releasing the module reference
    acquired by lookup_exec_domain().

    Signed-off-by: Sergey Vlasov
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sergey Vlasov
     
  • In filesystems with the meta block group flag on, ext3_bg_num_gdb() fails
    to report the correct number of blocks used to store the group descriptor
    backups in a given group. It happens because meta_bg follows a different
    logic from the original ext3 backup placement in groups multiples of 3, 5
    and 7.

    Signed-off-by: Glauber de Oliveira Costa
    Cc: Andreas Dilger
    Cc: "Stephen C. Tweedie"
    Cc: Alex Tomas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Glauber de Oliveira Costa
     
  • Document the fact that setrlimit(RLIMIT_CPU) doesn't return error codes when
    it should. I don't think we can fix this without a 2.7.x..

    Cc: Martin Schwidefsky
    Cc: Ulrich Weigand
    Cc: Cliff Wickman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • At present the kernel doesn't honour an attempt to set RLIMIT_CPU to zero
    seconds. But the spec says it should, and that's what 2.4.x does.

    Fixing this for real would involve some complexity (such as adding a new
    it-has-been-set flag to the task_struct, and testing that everwhere, instead
    of overloading the value of it_prof_expires).

    Given that a 2.4 kernel won't actually send the signal until one second has
    expired anyway, let's just handle this case by treating the caller's
    zero-seconds as one second.

    Cc: Martin Schwidefsky
    Cc: Ulrich Weigand
    Cc: Cliff Wickman
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • - Whitespace cleanups

    - Make that expression comprehensible.

    There's a potential logic change here: we do the "is it_prof_expires equal to
    zero" test after converting it to seconds, rather than doing the comparison
    between raw cputime_t's.

    But given that it's in units of seconds anyway, that shouldn't change
    anything.

    Cc: Martin Schwidefsky
    Cc: Ulrich Weigand
    Cc: Cliff Wickman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Drivers have no business looking at the task list and thus using this lock.
    The only possibly modular users left are:

    arch/ia64/kernel/mca.c
    drivers/edac/edac_mc.c
    fs/binfmt_elf.c

    which I'll send out fixes for soon.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • - Remove more unused headers
    - Remove various typedefs
    - Correct type of PaddrP (physical addresses should be ulong)
    - Kill use of bcopy
    - More printk cleanups
    - Kill true/false
    - Clean up direct access to pci BARs

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • - Remove more unused headers
    - Remove various typedefs
    - Correct type of PaddrP (physical addresses should be ulong)
    - Kill use of bcopy
    - More printk cleanups
    - Kill true/false
    - Clean up direct access to pci BARs

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Final polish. There is no more save_flags/cli type locking left. We also no
    longer use the pcicopy function and file so they can go.

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Third large chunk of code cleanup. The split between this and #3 and #4 is
    fairly arbitary and due to the message length limit on the list. These
    patches continue the process of ripping out macros and typedefs while cleaning
    up lots of 32bit assumptions. Several inlines for compatibility also get
    removed and that causes a lot of noise.

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Second large chunk of code cleanup. The split between this and #3 and #4 is
    fairly arbitary and due to the message length limit on the list. These
    patches continue the process of ripping out macros and typedefs while cleaning
    up lots of 32bit assumptions. Several inlines for compatibility also get
    removed and that causes a lot of noise.

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • First large chunk of code cleanup. The split between this and #3 and #4 is
    fairly arbitary and due to the message length limit on the list. These
    patches continue the process of ripping out macros and typedefs while cleaning
    up lots of 32bit assumptions. Several inlines for compatibility also get
    removed and that causes a lot of noise.

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • More header cleanups, strip out typedefs and remove cruft. There are a lot of
    magic macros that can go and also a great deal of abuse of volatile that is
    not needed any more as this patch set cleans up the misuse of pointer access
    to ISA and PCI space.

    It now builds cleanly on 64bit, although there is more work left to do

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • After the indent we can now clean up unused code, and fix all myriad cases
    that don't use readb/writeb properly.

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • This is the result of indent -kr -i8 -bri0 -l255

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Strip some of the typedef mess out Remove a small subset of unused defines
    and the like.

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Fixes for annoying gcc-4.1 compile warnings "value computed not used".
    Simply cast to void.

    (akpm: Linus will go ballistic...)

    Signed-off-by: Takashi Iwai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Takashi Iwai
     
  • Announce that the kernel_thread export will be removed in half a year,
    after all it's users have been converted to the kthread_ API, which I plan
    to do over the next month.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • In some embedded systems the IDE hardware interface may only support 16-bit
    or smaller accesses. Allow the interface to specify if this is the case
    and don't allow the drive or user to override the setting.

    Signed-off-by: Kumar Gala
    Acked-by: Bartlomiej Zolnierkiewicz
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kumar Gala
     
  • On architectures like i386, the "Multimedia Capabilities Port drivers" menu is
    visible, but it can't be visited since it contains nothing usable for
    !ARCH_SA1100.

    This patch therefore shows this menu only on ARCH_SA1100.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • If we don't want sys_newfstatat because __ARCH_WANT_STAT64 is defined, then
    we certainly don't want compat_sys_newfstatat either.

    Signed-off-by: Grant Grundler
    Signed-off-by: Kyle McMartin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kyle McMartin
     
  • It appears that console_setup() code only gets compiled into the kernel if
    CONFIG_PRINTK is enabled. One detrimental side-effect of this is that
    serial8250_console_setup() never gets invoked when CONFIG_PRINTK is not
    set, resulting in baud rate not being read/parsed from command line (i.e.
    console=ttyS0,115200n8 is ignored, at least the baud rate part...)

    Attached patch moves console_setup() code from inside

    #ifdef CONFIG_PRINTK

    to outside (in printk.c), removing dependence on said config. option.

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    John Z. Bohach
     
  • I today booted the first time my embedded device using Linux 2.6.15.2,
    which was booted by pxelinux, which then bootet itself from the nfsroot.

    This went pretty fine, but when I was reading through
    Documentation/nfsroot.txt I saw that there are some more modern versions
    available of loading the kernel and passing parameters.

    Signed-off-by: Nico Schottelius
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nico Schottelius
     
  • Driver for the Secure Digital Host Controller Interface specification.

    Signed-off-by: Pierre Ossman
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pierre Ossman
     
  • Class code and register definitions for the Secure Digital Host Controller
    standard.

    Signed-off-by: Pierre Ossman
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pierre Ossman
     
  • No need to duplicate all that code.

    Cc: Hugh Dickins
    Cc: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Pull the guts out of do_fsync() - we can use it elsewhere.

    Cc: Hugh Dickins
    Cc: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • msync() does a strange thing. Essentially:

    vma = find_vma();
    for ( ; ; ) {
    if (!vma)
    return -ENOMEM;
    ...
    vma = vma->vm_next;
    }

    so an msync() request which starts within or before a valid VMA and which ends
    within or beyond the final VMA will incorrectly return -ENOMEM.

    Fix.

    Cc: Hugh Dickins
    Cc: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • It seems bad to hold mmap_sem while performing synchronous disk I/O. Alter
    the msync(MS_SYNC) code so that the lock is released while we sync the file.

    Cc: Hugh Dickins
    Cc: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • It seems sensible to perform dirty page throttling in msync: as the application
    dirties pages we can kick off pdflush early, or even force the msync() caller
    to perform writeout, or even throttle the msync() caller.

    The main effect of this is to start disk writeback earlier if we've just
    discovered that a large amount of pagecache has been dirtied. (Otherwise it
    wouldn't happen for up to five seconds, next time pdflush wakes up).

    It also will cause the page-dirtying process to get panalised for dirtying
    those pages rather than whacking someone else with the problem.

    We should do this for munmap() and possibly even exit(), too.

    We drop the mmap_sem while performing the dirty page balancing. It doesn't
    seem right to hold mmap_sem for that long.

    Note that this patch only affects MS_ASYNC. MS_SYNC will be syncing all the
    dirty pages anyway.

    We note that msync(MS_SYNC) does a full-file-sync inside mmap_sem, and always
    has. We can fix that up...

    The patch also tightens up the mmap_sem coverage in sys_msync(): no point in
    taking it while we perform the incoming arg checking.

    Cc: Hugh Dickins
    Cc: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • We need set_page_dirty() to return true if it actually transitioned the page
    from a clean to dirty state. This wasn't right in a couple of places. Do a
    kernel-wide audit, fix things up.

    This leaves open the possibility of returning a negative errno from
    set_page_dirty() sometime in the future. But we don't do that at present.

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Modify balance_dirty_pages_ratelimited() so that it can take a
    number-of-pages-which-I-just-dirtied argument. For msync().

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Instead of using for_each_cpu(i), we can use for_each_online_cpu(i).

    When a CPU goes offline (ie removed from online map), it might have a non
    null bh_accounting.nr, so this patch adds a transfer of this counter to an
    online CPU counter.

    We already have a hotcpu_notifier, (function buffer_cpu_notify()), where we
    can do this bh_accounting.

    Signed-off-by: Eric Dumazet
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Dumazet
     
  • OPL3_HW_OPL3_PC98 #define isn't used anywhere; previously in
    sound/drivers/opl3/opl3_lib.c and sound/isa/cs423x/pc98.c, the latter of which
    went away with the rest of PC98 subarch.

    Signed-off-by: Arthur Othieno
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arthur Othieno
     
  • floppy98 went out together with the rest of PC98 subarch. Remove stale
    Makefile entry that remained.

    Signed-off-by: Arthur Othieno
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arthur Othieno
     
  • SUSv3 says the shmdt() function shall fail with EINVAL if the value of
    shmaddr is not the data segment start address of a shared memory segment:
    our sys_shmdt needs to reject a shmaddr which is not page-aligned.

    Does it have the potential to break existing apps?

    Hugh says

    "sys_shmdt() just does the wrong (unexpected) thing with a misaligned
    address: it'll fail on what you might expect it to succeed on, and only
    succeed on what it should definitely fail on.

    "That is, I think it behaves as if shmaddr gets rounded up, when the only
    understandable behaviour would be if it rounded it down.

    "Which does mean you'd have to be devious to see anything but EINVAL from
    a misaligned shmaddr there, so it's not terribly important."

    Signed-off-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • sb_set_blocksize() cleanup: make sb_set_blocksize() use blksize_bits().

    Signed-off-by: Coywolf Qi Hunt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Coywolf Qi Hunt
     
  • Remove all trailing tabs and spaces. No other changes.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap