1. 21 Jun, 2003 9 commits
  2. 20 Jun, 2003 31 commits
    • Andrew Morton's avatar
      [PATCH] ext3/JBD: remove trailing whitespace · f5d256f8
      Andrew Morton authored
      ext3 and JBD still have enormous numbers of lines which end in tabs.  Fix
      them all up.
      f5d256f8
    • Andrew Morton's avatar
      [PATCH] JBD: honour read-only mounts more carefully · 1ca5d490
      Andrew Morton authored
      From: "Stephen C. Tweedie" <sct@redhat.com>
      
      ext3 has long had a problem wherein it will unnecessarily write to a
      read-only filesystem during the mount process.  It does this in preparing the
      journal superblock's sequence numbers.
      
      But if the filesystem was shut down cleanly we do not need to do this.
      Detect the situation and avoid modifying and writing out the journal
      superblock.
      1ca5d490
    • Andrew Morton's avatar
      [PATCH] Restore Daniel Phillips' copyright · 34cc08da
      Andrew Morton authored
      From: Daniel Phillips <phillips@arcor.de>
      
      This patch restores my copyright notice for the HTree directory index,
      inadvertently omitted during the conversion from Ext2 to Ext3.
      34cc08da
    • Andrew Morton's avatar
      [PATCH] highmem.h needs mm.h · 6fb00b50
      Andrew Morton authored
      From: David Mosberger <davidm@napali.hpl.hp.com>
      
      highmem.h uses stuff like page_address(), but fails to include
      <linux/mm.h>.
      6fb00b50
    • Andrew Morton's avatar
      [PATCH] node-local allocation for hugetlbpages · b913b988
      Andrew Morton authored
      From: William Lee Irwin III <wli@holomorphy.com>
      
      The following patch implements node-local memory allocation support for
      hugetlb. Successfully tested on NUMA-Q.
      b913b988
    • Andrew Morton's avatar
      [PATCH] Fix binfmt_elf.c bug on ppc64 · 324a7156
      Andrew Morton authored
      From: Jakub Jelinek <jakub@redhat.com>
      
      Any prelinked shared library is impossible to run on ppc64 without this
      patch, as they immediately segfault.  Say:
      
      	/bin/echo
      
      works even if /lib64/ld64.so.1 is prelinked while
      
      	/lib64/ld64.so.1 /bin/echo
      
      segfaults.
      
      The problem is that ELF_PLAT_INIT is passed the virtual address of the
      shared library, not the difference between the virtual address of the
      shared library and p_vaddr of the first PT_LOAD segment in that library
      (while for the interpreter interp_load_address is the bias).
      
      ELF_PLAT_INIT sets gpr[2] to this absolute address, but
      arch/ppc64/kernel/process.c (start_thread) assumes it is a bias and adds it
      to entry and toc values loaded from the entry point descriptor.
      
      For non-prelinked shared libraries, first PT_LOAD segment's p_vaddr is
      typically 0 and thus load_addr == load_bias (which is why this bug has not
      been discovered that long).
      324a7156
    • Andrew Morton's avatar
      [PATCH] Fix suspend with NFS mounts active · ee9548d1
      Andrew Morton authored
      From: Pavel Machek <pavel@ucw.cz>
      
      This fixes suspend with NFS mounts active.
      ee9548d1
    • Andrew Morton's avatar
      [PATCH] mach-generic build fix · 2687d201
      Andrew Morton authored
      enable_apic_mode needs tobe hooked up.  (It came in with the es7000 merge)
      2687d201
    • Andrew Morton's avatar
      [PATCH] Fix kmod return value · bcb421ea
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      Milton Miller <miltonm@bga.com> and Junfeng Yang <yjf@stanford.edu> point
      out that we hand a kernel address to sys_wait4 for the status pointer.
      This is true, but since we don't have a SIGCHLD handler, it never gets that
      far.  Use NULL, and document the fact.
      bcb421ea
    • Andrew Morton's avatar
      [PATCH] proc_pid_lookup use-after-free fix · bf93adba
      Andrew Morton authored
      From: "Martin J. Bligh" <mbligh@aracnet.com> and me
      
      proc_pid_lookup() does a put_task_struct() and then continues to play with
      the task.
      bf93adba
    • Andrew Morton's avatar
      [PATCH] workqueue.c subtle fix and core extraction · 34c37b86
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      A barrier is needed on workqueue shutdown: there's a chance that the thead
      could see the wq->thread set to NULL before the completion is initialized.
      
      Also extracts functions which actually create and destroy workqueues, for
      use by hotplug CPU patch.
      34c37b86
    • Andrew Morton's avatar
      [PATCH] dirty inode writeback fix · eebef30c
      Andrew Morton authored
      Both sys_sync() and the kupdate function need to precalculate the number of
      pages which they are prepared to write.  Mainly for livelock avoidance.
      
      But they also must write inodes, and dirty inodes do not contribute to dirty
      page accounting (oops).  Net effect: when there are lots of dirty inodes and
      few dirty pages, we forget to write inodes.
      
      This mainly affects atime updates, because most other inode-dirtying activity
      will generate dirty pages too.
      
      It mainly affects ext2.
      
      
      Now, writing an ext2 inode will just dirty the underlying blockdev pagecache
      page.  So what the patch does is to assume that writing one inode will dirty
      up to one pagecache page.  So the patch adds (inodes_stat.nr_inodes -
      inodes_stat.nr_unused) into the number of pages to be written.
      
      I considered creating inodes_stat.nr_dirty.  It looks fairly messy, needing
      to know not to account for memory-backed inodes, etc.  But it is probably a
      better thing to do.
      eebef30c
    • Andrew Morton's avatar
      [PATCH] remove swapper_inode · 9d54df6e
      Andrew Morton authored
      By moving the special-casing for swapper_space out of __mark_inode_dirty()
      and into __set_page_dirty_nobuffers() we can remove swapper_inode.
      9d54df6e
    • Andrew Morton's avatar
      [PATCH] Permit big console scrolls · afa31420
      Andrew Morton authored
      From: Samuel Thibault <Samuel.Thibault@ens-lyon.fr>
      
      Changes the new console scrolling ioctl to permit distances greater than
      +127/-128.
      afa31420
    • Andrew Morton's avatar
      [PATCH] misc fixes · 95ea8516
      Andrew Morton authored
      - shmem: remove unneeded test for null inode->i_sb (James Morris)
      
      - kill unused var warning in traps.c (Geert Uytterhoeven)
      
      - s/u64/__u64/ in bitops.h (needed for klibc)
      
      - comment fix in gfp.h (Matthew Dobson <colpatch@us.ibm.com>)
      
      - fix smbfs constant overflow warning (Flameeyes <daps_mls@libero.it>)
      
      - yam.c irqreturn_t fix.
      
      - Remove some unused variables from baycom_epp.c (Adrian Bunk)
      
      - Remove 5-year-old unreferenced RCS string from xirc2ps_cs.c (Adrian Bunk)
      95ea8516
    • Andrew Morton's avatar
      [PATCH] hugetlbfs:update statfs · b8a105ff
      Andrew Morton authored
      update hugetlbfs_statfs for the statfs64() changes.
      b8a105ff
    • Andrew Morton's avatar
      [PATCH] hugetlbfs: specify size & inodes at mount · 7872c516
      Andrew Morton authored
      From: "Seth, Rohit" <rohit.seth@intel.com>
      
      - Add support for setting the filesystem's maximum size and maximum inode
        count on the mount command line.
      
        This is needed because the system admin can now set the ownership of teh
        fs to non-root users.  We don't want those users to be able to use all of
        the hugepage pool.
      
      - Prroperly update the inode creation/modification time.
      
      - Set the blocksize to HPAGE_SIZE (instead of PAGE_CACHE_SIZE).
      
      - Update Documentation/vm/hugetlbpage.txt.
      7872c516
    • Andrew Morton's avatar
      [PATCH] raw.c devfs support · 0056b34a
      Andrew Morton authored
      From: Andrey Borzenkov <arvidjaar@mail.ru>
      
      Add devfs support to raw.c.
      0056b34a
    • Andrew Morton's avatar
      [PATCH] sysv semundo fixes · 1327ca85
      Andrew Morton authored
      From: Manfred Spraul <manfred@colorfullife.com>
      
      The CLONE_SYSVSEM implementation is racy: it does an (atomic_read(->refcnt)
      ==1) instead of atomic_dec_and_test calls in the exit handling.  The patch
      fixes that.
      
      Additionally, the patch contains the following changes:
      
      - lock_undo() locks the list of undo structures.  The lock is held
        throughout the semop() syscall, but that's unnecessary - we can drop it
        immediately after the lookup.
      
      - undo structures are only allocated when necessary.  The need for undo
        structures is only noticed in the middle of the semop operation, while
        holding the semaphore array spinlock.  The result is a convoluted
        unlock&revalidate implementation.  I've reordered the code, and now the
        undo allocation can happen before acquiring the semaphore array spinlock.
         As a bonus, less code runs under the semaphore array spinlock.
      
      - sysvsem.sleep_list looks like code to handle oopses: if an oops kills a
        thread that sleeps in sys_timedsemop(), then sem_exit tries to recover.
        I've removed that - too fragile.
      1327ca85
    • Andrew Morton's avatar
      [PATCH] show_stack() portability and cleanup patch · 0d5ff9d0
      Andrew Morton authored
      From: David Mosberger <davidm@napali.hpl.hp.com>
      
      This is an attempt at sanitizing the interface for stack trace dumping
      somewhat.  It's basically the last thing which prevents 2.5.x from working
      out-of-the-box for ia64.  ia64 apparently cannot reasonably implement the
      show_stack interface declared in sched.h.
      
      Here is the rationale: modern calling conventions don't maintain a frame
      pointer and it's not possible to get a reliable stack trace with only a stack
      pointer as the starting point.  You really need more machine state to start
      with.  For a while, I thought the solution is to pass a task pointer to
      show_stack(), but it turns out that this would negatively impact x86 because
      it's sometimes useful to show only portions of a stack trace (e.g., starting
      from the point at which a trap occurred).  Thus, this patch _adds_ the task
      pointer instead:
      
       extern void show_stack(struct task_struct *tsk, unsigned long *sp);
      
      The idea here is that show_stack(tsk, sp) will show the backtrace of task
      "tsk", starting from the stack frame that "sp" is pointing to.  If tsk is
      NULL, the trace will be for the current task.  If "sp" is NULL, all stack
      frames of the task are shown.  If both are NULL, you'll get the full trace of
      the current task.
      
      I _think_ this should make everyone happy.
      
      The patch also removes the declaration of show_trace() in linux/sched.h (it
      never was a generic function; some platforms, in particular x86, may want to
      update accordingly).
      
      Finally, the patch replaces the one call to show_trace_task() with the
      equivalent call show_stack(task, NULL).
      
      The patch below is for Alpha and i386, since I can (compile-)test those (I'll
      provide the ia64 update through my regular updates).  The other arches will
      break visibly and updating the code should be trivial:
      
      - add a task pointer argument to show_stack() and pass NULL as the first
        argument where needed
      
      - remove show_trace_task()
      
      - declare show_trace() in a platform-specific header file if you really
        want to keep it around
      0d5ff9d0
    • Andrew Morton's avatar
      [PATCH] revert adjtimex changes · 660a7358
      Andrew Morton authored
      From: John Stultz, George Anzinger, Eric Piel
      
      There was confusion over the definition of TICK_USEC.  TICK_USEC is
      supposed to be based on USER_HZ, however a recent change caused TICK_USEC
      to be based on HZ.  This broke the adjtimex() interface on systems where
      USER_HZ != HZ.  This patch reverts the change to TICK_USEC, removes an
      added mis-use of the value and fixes some incorrect comments that could
      lead to this sort of confusion.
      
      Also this patch resolves the related LTP adjtimex failures.
      660a7358
    • Andrew Morton's avatar
      [PATCH] Fix potential set_child_tid/clear_child_tid bug · b3cc42df
      Andrew Morton authored
      From: David Mosberger <davidm@napali.hpl.hp.com>
      
      At the moment, if you don't set CLONE_CHILD_SETTID/CLONE_CHILD_CLEARTID,
      the {set,clear}_child_tid values get inherited from the parent task.  I may
      be missing something, but I suspect that's not the intended behavior.  The
      patch below instead clears the respective members.
      b3cc42df
    • Andrew Morton's avatar
      [PATCH] slab poisoning fix · 237d5bd7
      Andrew Morton authored
      The slab debugging code is supposed to poison freshly-allocated obejcts with
      0x5a and freed ones with 0x6b, so we can distinguish use-uninitialised from
      use-after-free.
      
      It wasn't working right for recycled objects.  Fix.
      237d5bd7
    • Andrew Morton's avatar
      [PATCH] kmem_cache_destroy(): use slab_error() · 919a670d
      Andrew Morton authored
      Use slab_error for printing the error message from kmem_cache_destroy
      919a670d
    • Andrew Morton's avatar
      [PATCH] Add system calls statfs64 and fstatfs64 · 244f3626
      Andrew Morton authored
      From: Peter Chubb <peter@chubb.wattle.id.au>
      
      Add two new system calls, statfs64 and fstatfs64.  This has been needed
      sincew the 64-bit sector_t merge - the current structures will overflow.
      
      - Use a common interface (vfs_statfs) with the rest of the kernel,
      
      - convert to 32-bit at (f)statfs time.
      
      - New field f_frsize gives underlying fragment size for the filesystem.
        (Solaris has this, and the Open Group describe it).
      
      - The old statfs syscalls will now return -EOVERFLOW if the device was
        too large to be represented inthe old data structures.
      
      The new system calls take a size_t argument, which is the size of the
      structure to be filled in (as requested by Ben LaHaise), to `futureproof' the
      interface.
      
      Has been reviewed by the arch maintainers and by Ulrich Drepper.
      244f3626
    • Andrew Morton's avatar
      [PATCH] /proc/kcore: handle unmapped areas · d717623a
      Andrew Morton authored
      From: Andi Kleen <ak@suse.de>
      
      On i386 and most other ports kern_addr_valid is hardcoded to 1.
      
      This works fine as long as only mapped areas are accessed.  When you have
      something partially mapped in the kclist it is possible that start points to
      an unmapped address.  The correct behaviour in this case is to zero the user
      space.  We shouldn't return -EFAULT because the fault is against the mmapped
      range, not against the user's address.
      
      copy_to_user usually even checks for exceptions on both source and
      destination, but it does not zero the destination in this case and worse
      results in EFAULT, which is user visible.
      
      This patch just tries to clear_user in this case again to actually zero the
      user data and catch real user side EFAULTs.
      
      Another way to fix this is to have kern_addr_valid do a real page table
      lookup (I did that on AMD64), but having this fallback is a bit more
      reliable in case there is a race somewhere.
      
      On i386 it could happen for example if the direct space to max_low_pfn
      contains something unmapped.  This normally isn't the case, but e.g.  the
      slab debugging patches in -mm* do this so it's better to handle it.
      
      Drawback is that it relies on a somewhat undocumented copy_to_user behaviour
      (fault on both source and destination).  It is true for i386 and amd64, but I
      don't know if it is for other port.  In the worst case they just don't have
      the race protection and may see bogus EFAULTs.
      d717623a
    • Andrew Morton's avatar
      [PATCH] Fix /proc/kcore for i386 · 98c94255
      Andrew Morton authored
      From: Andi Kleen <ak@suse.de>
      
      The recent IA64 changes for /proc/kcore broke the access on i386.
      Currently no notes are written for the direct mapped or vmalloced memory,
      which makes gdb reject it.
      
      This patch fixes it.  Other ports probably need to do the same changes.
      98c94255
    • Andrew Morton's avatar
      [PATCH] range checking in rd_open() · 25a8424c
      Andrew Morton authored
      If you open /dev/ram7 when the kernel is configured for 4 ramdisks, things
      blow up.  Teach rd_open() to check that the minor is in range.
      25a8424c
    • Andrew Morton's avatar
      [PATCH] kjournald shutdown fix · 561516c8
      Andrew Morton authored
      If someome tries to unmount the fs while kjournald is performing a commit,
      kjournald forgets to look for the termination request and goes into permanent
      sleep.
      561516c8
    • Andrew Morton's avatar
      [PATCH] ia32 copy_from_user() fix · 53f35f47
      Andrew Morton authored
      The memset which is performed if access_ok() fails got lost in the
      copy_*_user() rework.  Put it back.
      
      Bloats the kernel by 8k :(
      
      Also contains a few related #includes and whitespace fixlets from
      Joshua Kwan <joshk@triplehelix.org>
      53f35f47
    • Linus Torvalds's avatar
      Merge bk://kernel.bkbits.net/gregkh/linux/pci-2.5 · 3119cfff
      Linus Torvalds authored
      into home.transmeta.com:/home/torvalds/v2.5/linux
      3119cfff