1. 18 Jul, 2003 25 commits
    • Andrew Morton's avatar
      [PATCH] Update Documentation/magic-numbers.txt · bd5fe976
      Andrew Morton authored
      From: <ffrederick@prov-liege.be>
      
      Update Documentation/magic-numbers.txt
      bd5fe976
    • Andrew Morton's avatar
      [PATCH] fix bootmem allocator on machines with holes in · 2dd23d7c
      Andrew Morton authored
      From: Anton Blanchard <anton@samba.org>
      
      If the memory we are trying to allocate is too large to fit in the current
      region, we should skip to the end.  We currently search the available
      bitmap, find the area is too small, increment the start by incr and try
      again.  This resulted in an apparent lockup on a 64GB machine that had a
      3GB IO hole starting at 1GB (and the mem_map array would not fit in the
      first region).
      
      Also use ALIGN macro instead of an open coded version.
      2dd23d7c
    • Andrew Morton's avatar
      [PATCH] dm: v4 ioctl interface · 77d7ccc8
      Andrew Morton authored
      From: Joe Thornber <thornber@sistina.com>
      
      v4 of the ioctl interface.  Note there never was a v2 or a v3 except in an
      unofficial EVMS way.
      
      This works correctly with the 64-bit dev_t patches in -mm kernels.
      
      There is now a config option to allow the user to select v1 or v4, it
      defaults to v1.  dm-ioctl.[hc] just #includes dm-ioctl-v[14].[hc] depending
      on the config option.
      
      If you want to use v4 you will have to update your tools
      (libdevmapper/lvm).  The latest tools at the time of writing are:
      
      dmsetup + libdevmapper + replacement kernel patches for 2.4.20 & 2.4.21:
      
        ftp://ftp.sistina.com/pub/LVM2/device-mapper/device-mapper-testing-new-version4-interface.tgz
      
      Updated LVM2 tools to work with the above:
      
        ftp://ftp.sistina.com/pub/LVM2/tools/LVM2.0-testing.tgz
      77d7ccc8
    • Andrew Morton's avatar
      [PATCH] dm: 'wait for event' race · aa6d85aa
      Andrew Morton authored
      From: Joe Thornber <thornber@sistina.com>
      
      There was a race associated with the 'wait for a significant event'
      functionality.
      
      Basically userland could read the status table, then wait for another
      event, but the event it was waiting for could have occurred in the gap
      between reading and waiting.
      
      To solve this we assign identifiers to events, in order to successfully
      wait for an event both userland and the kernel driver must be in agreement
      about what the last event identifier was.  If they don't agree the wait
      call will return immediately, allowing userland to re-read the status and
      see what it missed.
      
      The new ioctl interface will use this properly.
      aa6d85aa
    • Andrew Morton's avatar
      [PATCH] CLONE_STOPPED · 074127b5
      Andrew Morton authored
      From: Ulrich Drepper <drepper@redhat.com>
      
      CLONE_STOPPED: start a thread in a stopped state.  Required for NTPL.
      074127b5
    • Andrew Morton's avatar
      [PATCH] watchdog: i810-tco support · 7b17636c
      Andrew Morton authored
      From: Wim Van Sebroeck <wim@iguana.be>
      
      Adds support for the 82801EB and 82801ER I/O Controller Hub's (ICH5 &
      ICH5R).  This will add watchdog support for the i865 and i875 motherboard
      chipsets.  It also removes some extra trailing spaces in the source files.
      7b17636c
    • Andrew Morton's avatar
      [PATCH] vesafb fix · b23202a6
      Andrew Morton authored
      From: Gerd Knorr <kraxel@suse.de>
      
      The patch below fixes some vesafb issues.  Changes:
      
      * fixed struct screen_info in tty.h to use portable types.  "unsigned
        long" for 32bit values doesn't work on hammer machines ...
      
      * limited the framebuffer memory used by vesafb to 16 MB.  This avoids
        that vesafb's ioremap() eats plenty of kernel address space for no real
        benefit if the gfx card has very much memory (some have 128 MB or more,
        ia32 has 128 MB address space for vmalloc and ioremap ...).
      
      * mtrr is enabled by default.  That should improve the vesafb performance
        a lot.  Also added a option to disable mtrr.
      b23202a6
    • Andrew Morton's avatar
      [PATCH] visws: fix PCI breakage · e23b0206
      Andrew Morton authored
      From: Andrey Panin <pazke@donpac.ru>
      
      This fixes Visws PCI code which was broken since 2.5.73.
      e23b0206
    • Andrew Morton's avatar
      [PATCH] settimeofday() fixes · 73a9eb39
      Andrew Morton authored
      From: davem
      
      - sys_stime() takes an int*, but it should be a time_t*: they have different
        sizes on (for example) sparc64.
      
      - sys_settimeofday() is confusing timevals with timespecs.  They have
        different sizes on sparc64 and the time keeps on getting set to epoch.
      73a9eb39
    • Andrew Morton's avatar
      [PATCH] slab: print stuff when the wrong cache is used · 5808e76e
      Andrew Morton authored
      From: Manfred Spraul <manfred@colorfullife.com>
      
      Some extra diagnostics when someone passes the wrong object type
      into kmem_cache_free().  To help some bug which Manfred is chasing.
      5808e76e
    • Andrew Morton's avatar
      [PATCH] CONFIG_BLK_DEV_CRYPTOLOOP needs CONFIG_CRYPTO · 234ed735
      Andrew Morton authored
      From: Brett <generica@email.com>
      
      CONFIG_BLK_DEV_CRYPTOLOOP needs CONFIG_CRYPTO
      234ed735
    • Andrew Morton's avatar
      [PATCH] unline most of put_namespace() · 16096694
      Andrew Morton authored
      It has five callsites, and is big.
      16096694
    • Andrew Morton's avatar
      [PATCH] Fix two bugs with process limits (RLIMIT_NPROC) · 909cc4ae
      Andrew Morton authored
      From: Neil Brown <neilb@cse.unsw.edu.au>
      
      1/ If a setuid process swaps it's real and effective uids and then forks,
       the fork fails if the new realuid has more processes
       than the original process was limited to.
       This is particularly a problem if a user with a process limit
       (e.g. 256) runs a setuid-root program which does setuid() + fork()
       (e.g. lprng) while root already has more than 256 process (which
       is quite possible).
      
       The root problem here is that a limit which should be a per-user
       limit is being implemented as a per-process limit with
       per-process (e.g. CAP_SYS_RESOURCE) controls.
       Being a per-user limit, it should be that the root-user can over-ride
       it, not just some process with CAP_SYS_RESOURCE.
      
       This patch adds a test to ignore process limits if the real user is root.
      
      2/ When a root-owned process (e.g. cgiwrap) sets up process limits and then
        calls setuid, the setuid should fail if the user would then be running
        more than rlim_cur[RLIMIT_NPROC] processes, but it doesn't.  This patch
        adds an appropriate test.  With this patch, and per-user process limit
        imposed in cgiwrap really works.
      909cc4ae
    • Andrew Morton's avatar
      [PATCH] fix return of compat_sys_sched_getaffinity · 89001a84
      Andrew Morton authored
      From: Anton Blanchard <anton@samba.org>
      
      On success getaffinity should return the size of mask.  It looks like
      Randy's patch (which fixed a bogus return) missed this bit.
      
      In reality I'm not sure if we care, and with cpu bitmasks this stuff is
      going to break.
      89001a84
    • Andrew Morton's avatar
      [PATCH] fix removable partitioned media with devfs · 0490d8f2
      Andrew Morton authored
      From: Andrey Borzenkov <arvidjaar@mail.ru>
      
      Current 2.5 does not register any device node in devfs for empty media
      (capacity == 0) case.  This makes removables unusable with devfs.
      Partition rescan is done only on bdev open, but without any device node for
      device it is impossible to open it.
      
      In 2.4 it was finally solved by always registering .../disc node as
      representation for "whole" disk and using devfsd action to force partition
      rescan on access to (non-existing) partition name.  For primary names it
      was handled internally by devfs - it kept track of removable devices in
      directory and initiated partition rescan when name was not found.
      
      Both are obviously broken now.  You can't do partition rescan because no
      node is registered at all and internal handling was removed.  Very nice.
      
      The attached patch makes resgister_disk always register at least disc node.
       This now works for old and new compat names as per devfsd configuration;
      canonical names are still broken:
      
        {pts/3}% ll /dev/scsi/host1/bus0/target4/lun0/part4
        ls: /dev/scsi/host1/bus0/target4/lun0/part4: No such file or directory
      
      but it can be fixed using the same technique as above so I won't push it.
      0490d8f2
    • Andrew Morton's avatar
      [PATCH] use kmalloc for ia32 stacks · 37c2c764
      Andrew Morton authored
      From: William Lee Irwin III <wli@holomorphy.com>
      
      I've been slab allocating the stack on i386 for some time, and it has gone
      without incident in pgcl, -wli, -mjb (?), and so on.  kmalloc() is fine;
      there isn't any particularly compelling reason for a dedicated slab as
      there's no preconstruction to do, though it can be arranged.
      
      Basically, it works, there's no obvious reason not to, and (even better)
      it's not totally invisible to the VM and even makes overhead reportable.
      37c2c764
    • Andrew Morton's avatar
      [PATCH] remove task_cache entirely · 4da99f75
      Andrew Morton authored
      From: Manfred Spraul <manfred@colorfullife.com>
      
      kernel/fork.c contains a disabled cache for task stuctures.  task
      structures are placed into the task cache only if "tsk==current", and
      "tsk==current" is impossible.  There is even a WARN_ON against that in
      __put_task_struct().
      
      So remove it entirely - it's dead code.
      
      One problem is that order-1 allocations are not cached per-cpu - we can
      use kmalloc for the stack.
      4da99f75
    • Andrew Morton's avatar
      [PATCH] is_devfsd_or_child() deadlock fix · 04af9e58
      Andrew Morton authored
      From: Andrey Borzenkov <arvidjaar@mail.ru>
      
      The code that did proper check existed in 2.4 and was removed in 2.5 for
      whatever reason. The patch restores it slightly modified as below.
      
      2.4 code looks somewhat unclean in that
      
      - it traverses task list without lock.
      
      - it starts from current->real_parent but nothing prevents current be
        init_task itself.  This hung for me on 2.5 during boot.  May be 2.4 does
        something differently.
      04af9e58
    • Andrew Morton's avatar
      [PATCH] pass regs into dump_fpu() in elf coredump · 57732625
      Andrew Morton authored
      From: Pete Zaitcev <zaitcev@redhat.com>
      
      sparc32 needs the registers passed into dump_fpu().
      57732625
    • Andrew Morton's avatar
      [PATCH] ioctl(BLKBSZSET) fix and cleanup · 923a1b0f
      Andrew Morton authored
      From: Lou Langholtz <ldl@aros.net>
      
      - set_blocksize() already does those size checks.
      
      - test the set_blocksize() return value: it can fail if the requested
        blocksize is less that the hard sector size.
      923a1b0f
    • Andrew Morton's avatar
      [PATCH] Ext3 xattr credits fix for quotas · eda597e2
      Andrew Morton authored
      From: Andreas Gruenbacher <agruen@suse.de>
      
      The xattr and acl code are not properly reserving credits for quotas.
      EXT3_DATA_TRANS_BLOCKS is an overestimate of the credits required including
      quotas.  Make it a little more tight, and use it in the xattr and acl code
      to be quota safe.
      eda597e2
    • Andrew Morton's avatar
      [PATCH] ext3 extended attribute fixes · 2e1972fa
      Andrew Morton authored
      From: Andreas Gruenbacher <agruen@suse.de>
      
      - Fix transaction credit exhaustion BUG.
      
      - ext3_journal_get_write_access_credits failures break out of the loop in
        1058, so <ce> is not released properly.
      
      - <credits> must be reset after journal_release_buffer() in line 1072.
      2e1972fa
    • Andrew Morton's avatar
      [PATCH] parport_pc.c compile warning · 7360a440
      Andrew Morton authored
      From: Shane Shrybman <shrybman@sympatico.ca>
      
      This fixes the following warning:
      
      drivers/parport/parport_pc.c:98: warning: `verbose_probing' defined but
      not used
      7360a440
    • Andrew Morton's avatar
      [PATCH] misc fixes · 5acf32ee
      Andrew Morton authored
      - i460-agp linkage fix ("Luck, Tony" <tony.luck@intel.com>)
      
      - Don't reimplement offsetof() in hfs
      
      - NBD warning fix
      
      - Remove unneeded null-pointer test in journal_stop (Andreas Gruenbacher)
      
      - remove debug stuff in journal_dirty_metadata()
      
      - slab.c typo fixes (Lev Makhlis <mlev@despammed.com>)
      
      - In devfs_mk_cdev() error path, don't print `buf' until we've written
        something into it.  (Reported by Gergely Nagy <algernon@gandalph.mad.hu>)
      
      - Two ISA sound drivers had their kmalloc() args reversed (Spotted by Steve
        French)
      5acf32ee
    • Andrew Morton's avatar
      [PATCH] Allow LBD on architectures that support it · c07f63b3
      Andrew Morton authored
      From: Milton Miller <miltonm@bga.com>
      
      Enable the CONFIG_LBD option for the architectures which appear to support
      it.
      
      It is not actually tested for those architectures, but it's not likely to
      be unless we do this...
      c07f63b3
  2. 17 Jul, 2003 15 commits