1. 12 Mar, 2004 33 commits
    • Andrew Morton's avatar
      [PATCH] Remove arbitrary #acl entries limits on ext[23] when reading · 10658a35
      Andrew Morton authored
      From: Andreas Gruenbacher <agruen@suse.de>
      
      Remove the arbitrary limit of 32 ACL entries on ext[23] when reading from
      disk.  This change is backward compatible; we need to have this change in
      to be able to also allow writing big ACLs.
      
      The second patch that removes the ACL entry limit for writes is not
      included.  I don't want to push that patch now, because large ACLs would
      cause 2.4 and current 2.6 kernels to fail.  My plan is to remove the second
      limit later, in a half-year or year or so.
      10658a35
    • Andrew Morton's avatar
      [PATCH] Enable i810 fb on x86-64 · c833cc5a
      Andrew Morton authored
      From: Andi Kleen <ak@suse.de>
      
      i810fb most likely is needed on x86-64 too because there are Intel chipsets
      for it now.  So far it only linked on i386, fix this.
      c833cc5a
    • Andrew Morton's avatar
      [PATCH] /proc data corruption check · 08194fb2
      Andrew Morton authored
      From: Arjan van de Ven <arjanv@redhat.com>
      
      If someone removes a /proc directory which still has subdirectories it will
      lead to very nasty things (dentries remaining on hash chains etc etc etc).
      The BUG_ON in the patch below will catch this nasty situation.
      08194fb2
    • Andrew Morton's avatar
      [PATCH] Remove unneeded unlock in ipc/sem.c · 644a73eb
      Andrew Morton authored
      From: Manfred Spraul <manfred@colorfullife.com>
      
      sem_revalidate checks that a semaphore array didn't disappear while the
      code was running without the semaphore array spinlock.  If the array
      disappeared, then it will return without holding a lock.  find_undo calls
      sem_revalidate and then sem_unlock, even if sem_revalidate failed.  The
      sem_unlock call must be removed.
      
      Mingming Cao reported a spinlock deadlock with sysv semaphores.  A
      superflous unlock doesn't explain the deadlock, but it's obviously a bug.
      644a73eb
    • Andrew Morton's avatar
      [PATCH] kbuild: fix usage with directories containing '.o' · 2e83d38a
      Andrew Morton authored
      From: Sam Ravnborg <sam@ravnborg.org>
      
      From: Daniel Mack <daniel@zonque.org>, me
      
      modpost unconditionally searched for ".o" assuming this is always the
      suffix of the module.  This fails in two cases:
      
      a) when building external modules where any directory include ".o" in
         the name.  One example is a directory named: .../cvs.alsa.org/...
      
      b) when someone names a kernel directory so it contains ".o".  One
         example is drivers/scsi/aic.ok/...
      
      case b) was triggered by renaming the directory for aic7xxx, and modifying
      Makefile and Kconfig.  This caused make modules to fail.
      2e83d38a
    • Andrew Morton's avatar
      [PATCH] loop setup race fix · 238a43a0
      Andrew Morton authored
      From: Chris Mason <mason@suse.com>
      
      There's a race in loopback setup, it's easiest to trigger with one or more
      procs doing loopback mounts at the same time.  The problem is that
      fs/block_dev.c:do_open() only calls bdev_set_size on the first open.
      Picture two procs:
      
      proc1: mount -o loop file1 mnt1
      proc2: mount -o loop file2 mnt2
      
      proc1                   proc2
      open /dev/loop0                         # bd_openers now 1
      do_open
       bd_set_size(bdev, 0)                   # loop unbound, so bdev size is 0
                              open /dev/loop0 # bd_openers now 2
      loop_set_fd                             # disk capacity now correct, but
      				        # bdev not updated
      mount /dev/loop0 /mnt
      do_open
      
      Because bd_openers != 0 for the last do_open, bd_set_size is not called
      again and a size of 0 is used.  This eventually leads to an oops when the
      loop device is unmounted, because fsync_bdev calls block_write_full_page
      who decides every page on the block device is outside i_size and unmaps
      them.
      
      When ext2 or reiserfs try to sync a metadata buffer, we get an oops on
      because the buffers are no longer mapped.
      
      The patch below changes loop_set_fd and loop_clr_fd to also manipulate the
      size of the block device, which fixes things for me.
      238a43a0
    • Andrew Morton's avatar
      [PATCH] LOOP_CHANGE_FD ioctl · 275da6a3
      Andrew Morton authored
      From: Arjan van de Ven <arjanv@redhat.com>
      
      The patch below (written by Al Viro) solves a nasty chicken-and-egg issue
      for operating system installers (well at least anaconda but the problem
      domain is not exclusive to that)
      
      The basic problem is this:
      
      - The small first stage installer locates the image file of the second
        stage installer (which has X and all the graphical stuff); this image can
        be on the same CD, but it can come via NFS, http or ftp or ...  as well.
      
      - The first stage installer loop-back mounts this image and gives control
        to the second stage installer by calling some binary there.
      
      - The graphical installer then asks the user all those questions and
        starts installing packages.  Again the packages can come from the CD but
        also from NFS or http or ...
      
      Now in case of a CD install, once all requested packages from the first CD
      are installed, the installer wants to unmount and eject the CD and prompt
      the user to put CD 2 in.......  EXCEPT that the unmount can't work since
      the installer is actually running from a loopback mount of this cd.
      
      The solution is a "LOOP_CHANGE_FD" ioctl, where basically the installer
      copies the image to the harddisk (which can only be done late since only
      late the target harddisk is mkfs'd) and then magically switches the backing
      store FD from underneath the loop device to the one on the target harddisk
      (and thus unbusying the CD mount).
      
      This is obviously only allowed if the size of the new image is identical
      and if the loop image is read-only in the first place.  It's the
      responsibility of root to make sure the contents is the same (but that's of
      the give-root-enough-rope kind)
      275da6a3
    • Andrew Morton's avatar
      [PATCH] kbuild: Cause `make clean' to remove more files · 0c8846a5
      Andrew Morton authored
      From: Sam Ravnborg <sam@ravnborg.org>
      
      Make the difference between 'make clean' and 'make distclean/mrproper' more
      explicit.
      
      make clean now removes all generated files except .config* and .version.
      The result is much easier to understand now.
      
      make clean deletes all generated files (except .config* and .version).
      make mrproper deletes configuration and all temporary files left by patch,
      editors and the like.
      
      Example output:
      > make mrproper
        CLEAN   init
        CLEAN   usr
        CLEAN   scripts/kconfig
        CLEAN   scripts
        CLEAN   .tmp_versions include/config
        CLEAN   include/asm-i386/asm_offsets.h include/linux/autoconf.h include/linux/version.h include/asm .tmp_versions
        CLEAN   .version .config
      
      Form the list of files/directories deleted during make clean, removed all
      references that is no longer relevant for the current kernel.
      0c8846a5
    • Andrew Morton's avatar
      [PATCH] Fix elf mapping of the zero page · 22a5dad8
      Andrew Morton authored
      From: William Lee Irwin III <wli@holomorphy.com>
      
      Using PAGE_SIZE rather than 4096 so that mmap() granularity is honored by
      whatever non-i386 architectures use MMAP_PAGE_ZERO.
      22a5dad8
    • Andrew Morton's avatar
      [PATCH] compiler.h scoping fixes · d398efb9
      Andrew Morton authored
      From: Ville Nuorvala <vnuorval@tcs.hut.fi>
      
      There are a few kernel-only things in compiler.h which should have been
      placed inside __KERNEL__.
      d398efb9
    • Andrew Morton's avatar
      [PATCH] Redundant unplug_timer deletion · 3b704d3f
      Andrew Morton authored
      From: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
      
      The only path to get to del_timer call in __generic_unplug_device() is when
      blk_remove_plug() returns 1, and in that case it already removed the
      unplug_timer.
      
      Patch to remove this redundant call.
      3b704d3f
    • Andrew Morton's avatar
      [PATCH] NUMA-aware zonelist builder · 0eaf393b
      Andrew Morton authored
      From: <j-nomura@ce.jp.nec.com>
      
      The attached patch is NUMA-aware zonelist builder patch, which sorts
      zonelist in the order that near-node first, far-node last.  In lse-tech and
      linux-ia64, where most of NUMA people resides, no objections are raised so
      far.
      
      The patch adds NUMA-specific version of build_zonelists which calls
      find_next_best_node to select the next-nearest node to add to zonelist.
      
      The patch has no effect on flat NUMA platform.
      0eaf393b
    • Andrew Morton's avatar
      [PATCH] kbuild: Remove CFLAGS assignment in i386/mach-*/Makefile · 290d11d8
      Andrew Morton authored
      From: Sam Ravnborg <sam@ravnborg.org>
      
      The EXTRA_CFLAGS assignments in the following files are a left-over from
      the early 2.5 days where the source was not compiled from the root of the
      source tree.
      
      Removing these wrong assignments fixes
      http://bugme.osdl.org/show_bug.cgi?id=2210
      
      A script named 'kernel' in the .. directory no longer halt compilation.
      290d11d8
    • Andrew Morton's avatar
      [PATCH] UDF filesystem update · 5cc6e01a
      Andrew Morton authored
      From: Ben Fennema <bfennema@falcon.csc.calpoly.edu>
      
      - added udf 2.5 #defines
      
      - fixed prealloc discard race
      
      - fixed several bugs in inode_getblk
      
      - added S_IFSOCK support
      
      - fix unicode encoding bug
      
      - change partition allocation from kmalloc to vmalloc for large
        allocations
      5cc6e01a
    • Andrew Morton's avatar
      [PATCH] selinux: clean up binary mount data · 5289ba41
      Andrew Morton authored
      From: James Morris <jmorris@redhat.com>
      
      selinux is currently inspecting the filesystem name ("nfs" vs "coda" vs
      watever) to work out whether it needs to hanbdle binary mount data.
      
      Eliminate all that by adding a flag to file_system_type.fs_flags.
      5289ba41
    • Andrew Morton's avatar
      [PATCH] dm: stripe width fix · ef01bd3f
      Andrew Morton authored
      dm-stripe.c: The stripe width must be at least the page size.
      ef01bd3f
    • Andrew Morton's avatar
      [PATCH] dm: list targets cmd · c0ffbd19
      Andrew Morton authored
      From: Joe Thornber <thornber@redhat.com>
      
      List targets ioctl.  [Patrick Caulfield]
      c0ffbd19
    • Andrew Morton's avatar
      [PATCH] dm: default queue limits · eafc59ae
      Andrew Morton authored
      From: Joe Thornber <thornber@redhat.com>
      
      Fill in missing queue limitations when table is complete instead of enforcing
      the "default" limits on every dm device.  Problem noticed by Mike Christie.
      
      [Christophe Saout]
      eafc59ae
    • Andrew Morton's avatar
      [PATCH] dm: list_for_each_entry audit · 2c99d295
      Andrew Morton authored
      From: Joe Thornber <thornber@redhat.com>
      
      Audit for list_for_each_*entry*
      2c99d295
    • Andrew Morton's avatar
      [PATCH] dm: endio method · ba657cf7
      Andrew Morton authored
      From: Joe Thornber <thornber@redhat.com>
      
      Add an endio method to targets.  This method is allowed to request another
      shot at failed ios (think multipath).  Context can be passed between the map
      method and the endio method.
      ba657cf7
    • Andrew Morton's avatar
      [PATCH] Allow X86_MCE_NONFATAL to be a module · e8c8fab4
      Andrew Morton authored
      From: Herbert Xu <herbert@gondor.apana.org.au>
      
      By allowing X86_MCE_NONFATAL to be a module, it can be included in
      distribution kernels without upsetting those with strange hardware.
      e8c8fab4
    • Andrew Morton's avatar
      [PATCH] i386 very early memory detection cleanup patch · 973adfc0
      Andrew Morton authored
      From: "H. Peter Anvin" <hpa@zytor.com>
      
      This patch cleans up the very early memory setup on the i386 platform.  In
      particular, it removes the hard-coded 8 MB limit completely by dynamically
      creating the early-boot pagetables rather than having them hard coded.
      
      While I was at it, I changed head.S so that it always sets up a local GDT;
      this means among other things that SMP and VISWS are no longer special
      cases, and is conceptually cleaner to boot.  The VISWS people have
      confirmed it works on VISWS.
      
      It also uses a separate entrypoint for non-boot processors since this is
      completely kernel-internal anyway.  This eliminates the need to set %bx on
      boot.  (If you think this is a bad idea I can eliminate this change; it
      just seemed cleaner to me to do it this way.)
      
      Additionally, zero bss with rep;stosl rather that rep;stosb.
      973adfc0
    • Andrew Morton's avatar
      [PATCH] genrtc: cleanups · e47d860c
      Andrew Morton authored
      From: "Randy.Dunlap" <rddunlap@osdl.org>
      
      From: Luiz Fernando Capitulino <lcapitulino@prefeitura.sp.gov.br>
      
      remove ifdef/endif in rtc_generic_init().
      use returned error code;
      e47d860c
    • Andrew Morton's avatar
      [PATCH] remove __io_virt_debug · a1d75429
      Andrew Morton authored
      From: Brian Gerst <bgerst@didntduck.org>
      
      Drivers should all be converted to use ioremap() or isa_*() by now.
      a1d75429
    • Andrew Morton's avatar
      [PATCH] teach /proc/kmsg about O_NONBLOCK · 48c26153
      Andrew Morton authored
      If there's nothing available and the file is O_NONBLOCK, return -EAGAIN.
      
      This is a bit grubby - really we should push the file* down into do_syslog()
      and handle it inside the spinlock.
      48c26153
    • Andrew Morton's avatar
      [PATCH] time interpolator fix · 40aaa9b3
      Andrew Morton authored
      From: john stultz <johnstul@us.ibm.com>
      
      In developing the ia64-cyclone patch, which implements a cyclone based time
      interpolator, I found the following bug which could cause time
      inconsistencies.
      
      In update_wall_time_one_tick(), which is called each timer interrupt, we
      call time_interpolator_update(delta_nsec) where delta_nsec is approximately
      NSEC_PER_SEC/HZ.  This directly correlates with the changes to xtime which
      occurs in update_wall_time_one_tick().
      
      However in update_wall_time(), on a second overflow, we again call
      time_interpolator_update(NSEC_PER_SEC).  However while the components of
      xtime are being changed, the overall value of xtime does not (nsec is
      decremented NSEC_PER_SEC and sec is incremented).  Thus this call to
      time_interpolator_update is incorrect.
      
      This patch removes the incorrect call to time_interpolator_update and was
      found to resolve the time inconsistencies I had seen while developing the
      ia64-cyclone patch.
      40aaa9b3
    • Andrew Morton's avatar
      [PATCH] fb_console_init fix · 688466a4
      Andrew Morton authored
      From: James Simmons <jsimmons@infradead.org>
      
      This patch fixes fb_console_init from being called twice.  I still need to
      fix set_con2fb but this helps but this is still important to get in.
      688466a4
    • Andrew Morton's avatar
      [PATCH] read-only support for UFS2 · e3459dfb
      Andrew Morton authored
      From: Niraj Kumar <niraj17@iitbombay.org>
      
      This patch adds read-only support for ufs2 (used in FreeBSD 5.x) variant of
      ufs filesystem.  For filesystem specific tools, see
      http://ufs-linux.sourceforge.com .
      e3459dfb
    • Andrew Morton's avatar
      [PATCH] adaptive lazy readahead · 202775d6
      Andrew Morton authored
      From: Suparna Bhattacharya <suparna@in.ibm.com>
      
      From: Ram Pai <linuxram@us.ibm.com>
      
      Pipelined readahead behaviour is suitable for sequential reads, but not for
      large random reads (typical of database workloads), where lazy readahead
      provides a big performance boost.
      
      One option (suggested by Andrew Morton) would be to have the application
      pass hints to turn off readahead by setting the readahead window to zero
      using posix_fadvise64(POSIX_FADV_RANDOM), and to special-case that in
      do_generic_mapping_read to completely bypass the readahead logic and
      instead read in all the pages needed directly.
      
      This was the idea I started with.  But then I thought, we can do a still
      better job ?  How about adapting the readahead algorithm to lazy-read or
      non-lazy-read based on the past i/o patterns ?
      
      The overall idea is to keep track of average number of contiguous pages
      accessed in a file.  If the average at any given time is above ra->pages
      the pattern is sequential.  If not the pattern is random.  If pattern is
      sequential do non-lazy-readahead( read as soon as the first page in the
      active window is touched) else do lazy-readahead.
      
      I have studied the behaviour of this patch using my user-level simulator.
      It adapts pretty well.
      
      Note from Suparna: This appears to bring streaming AIO read performance for
      large (64KB) random AIO reads back to sane values (since the lazy readahead
      backout in the mainline).
      202775d6
    • Andrew Morton's avatar
      [PATCH] readdir() cleanups · 724feb8d
      Andrew Morton authored
      From: <viro@parcelfarce.linux.theplanet.co.uk>
      
      cramfs and freevxfs explicitly mark themselves readonly (as other r/o fs
      do).
      
      afs marked noatime (ACKed by maintainer)
      
      filesystems that do not do update_atime() in their ->readdir() had been
      explicitly marked nodiratime.  NOTE: cifs, coda and ncpfs almost certainly
      need full noatime as we currently have in nfs and afs.
      
      update_atime() call shifted to callers of ->readdir() and out of
      ->readdir() instances.  Bugs caught:
      
        dcache_readdir() updated atime only if it reached EOF.
      
        bfs_readdir() - ditto.
      
        qnx4_readdir() - ditto.
      724feb8d
    • Andrew Morton's avatar
      [PATCH] Clean up sys_ioperm stubs · 68f79793
      Andrew Morton authored
      From: Brian Gerst <bgerst@didntduck.org>
      
      Remove stubs for sys_ioperm for non-x86 arches, using sys_ni_syscall
      instead where applicable.  Support for sys_ioperm is unconditionally no for
      non-x86 arches.
      68f79793
    • Andrew Morton's avatar
      [PATCH] ppc64: fix initialisation of NUMA arrays · ef6574ff
      Andrew Morton authored
      From: Anton Blanchard <anton@samba.org>
      
      We were hitting problems on machines with cpu_possible != cpu_online when
      NUMA was enabled.  The debug checks would trip during scheduler init
      because we iterate through all possible cpus whereas we only set up NUMA
      information for online cpus.
      
      Longer term we should have a cpu_up hook which sets up its NUMA information
      but for now we initalise all possible cpus and memory to node 0.
      ef6574ff
    • Andrew Morton's avatar
      [PATCH] print kernel version in oops messages · dcdeeef8
      Andrew Morton authored
      From: Arjan van de Ven <arjanv@redhat.com>
      
      Unfortunatly a large portion of the oops reports lack the basic
      information about what kernel version the oops is for; it's trivial to just
      print this in the oops as well to improve the usefulness of bugreports...
      dcdeeef8
  2. 11 Mar, 2004 5 commits
    • Benjamin Herrenschmidt's avatar
      [PATCH] ppc32: Fix G5 config space access lockup · 19175f1d
      Benjamin Herrenschmidt authored
      Fix a typo in the code that prevents lockup on config space access
      to sleeping devices on ppc32/G5. Please apply.
      19175f1d
    • Anton Blanchard's avatar
      [PATCH] fix ppc64 in kernel syscalls · cb0cd969
      Anton Blanchard authored
      Thanks to some great debugging work by Olaf Hering and Marcus Meissner
      it has been noticed that the current ppc64 syscall code is corrupting
      4 bytes past errno. Why we even bothered to set errno beats me, its
      unusable in the kernel.
      
      Since we had to reinstate the inline syscall code we can go back to
      using it for those few syscalls that we call. Especially now with
      Randy's syscall prototype cleanup we should be calling them directly
      but we can do that sometime later.
      cb0cd969
    • Jens Axboe's avatar
      [PATCH] CDROMREADAUDIO dma support · f644f166
      Jens Axboe authored
      This small patch builds on top of the blk_rq_map_user() patch just sent,
      and enables us to easily support DMA for CDROMREADAUDIO cdda extraction.
      It's quite amazing how much cool stuff you can with the new block layer
      :-)
      
      Patch has intelligent fall back from multi frame dma to single frame
      dma, and further to old-style pio ripping in case of hardware problems.
      f644f166
    • Jens Axboe's avatar
      [PATCH] user data -> request mapping · 637b48c8
      Jens Axboe authored
      This patch allows you to map a request with user data for io, similarly
      to what you can do with bio_map_user() already to a bio. However, this
      goes one step further and populates the request so the user only has to
      fill in the cdb (almost) and put it on the queue for execution. Patch
      converts sg_io() to use it, next patch I'll send adapts cdrom layer to
      use it for zero copy cdda dma extraction.
      637b48c8
    • Stephen Rothwell's avatar
      [PATCH] fix PPC64 iSeries virtual console devices · 95902cd8
      Stephen Rothwell authored
      While playing with udev, I discovered that the virtual console
      devices on iSeries had there minor numbers off by one i.e. /dev/tty1
      was minor 2!
      
      This fixes it.
      95902cd8
  3. 10 Mar, 2004 2 commits
    • Andi Kleen's avatar
      [PATCH] Fix a 64bit bug in kobject module request · 19c0199a
      Andi Kleen authored
      From Takashi Iwai
      
      kobj_lookup had a 64bit bug, which caused the request of a unknown
      character device to burn CPU instead of failing quickly.
      19c0199a
    • Andi Kleen's avatar
      [PATCH] x86-64 merge for 2.6.4 · 7abe2c67
      Andi Kleen authored
      The biggest new feature is fixed 32bit vsyscall (SYSCALL+SYSENTER)
      support, mostly from Jakub Jelinek.  This increases 32bit syscall
      performance greatly (latency halved and better).  The SYSENTER for Intel
      support required some infrastructure changes, but seems to work now too.
      
      The 64bit vsyscall vtime() just references xtime.tv_sec now.  This
      should make it a lot faster too.
      
      A fix for some Intel IA32e systems.  Also a few long standing bugs in
      NMI like exception handlers were fixed.
      
      And a lot of other bug fixes.
      
      Full changeLog:
       - Clean up 32bit address room limit handling, fix 3gb personality
       - Move memcpy_{from,to}io export to ksyms.c file. This seems to work
         around a toolchain bug (Andreas Gruenbacher)
       - Update defconfig
       - ACPI merges from i386 (SBF should work now, acpi=strict)
       - Implement mmconfig support based on i386 code (untested)
       - Fix i386/x86-64 pci source file sharing
       - Implement ptrace access for 32bit vsyscall page
       - Always initialize all 32bit SYSENTER/SYSCALL MSRs.
       - Export run time cache line size to generic kernel
       - Remove explicit CPUID in ia32 syscall code
       - Fill in most of boot_cpu_data early
       - Remove unused PER_LINUX32 setup
       - Fix syscall trace in fast 32bit calls (Suresh B. Siddha)
       - Tighten first line of the oops again.
       - Set up ptrace registers correctly for debug,ss,double fault exceptions
       - Fix 64bit bug in sys_time64
       - Optimize time syscall/vsyscall to only read xtime
       - Fix csum_partial_copy_nocheck
       - Remove last traces of FPU emulation
       - Check properly for rescheduling in exceptions with own stack
       - Harden exception stack entries (#SS,#NMI,#MC,#DF,#DB) against bogus GS
       - Use an exception stack for machine checks
       - Handle TIF_SINGLESTEP properly in kernel exit
       - Add exception stack for debug handler
       - Disable X86_HT for Opteron optimized builds because it pulls in ACPI_BOOT
       - Fix CONFIG_ACPI_BOOT compilation without CONFIG_ACPI
       - Fix eflags handling in SYSENTER path (Jakub Jelinek)
       - Use atomic counter for enable/disable_hlt
       - Support 32bit SYSENTER vsyscall too (Jakub Jelinek)
       - Don't redefine Dprintk
       - Change some cpu/apic id arrays to char
       - Support arbitary cpu<->apicid in hard_smp_processor_id (Surresh B Sidda)
       - Move K8 erratum #100 workaround into slow path of page fault handler.
       - Fix 32bit cdrom direct access ioctls (Jens Axboe)
       - Enable 32bit vsyscalls by default
       - Fix 32bit vsyscalls (Jakub Jelinek)
      7abe2c67