1. 04 Oct, 2002 13 commits
  2. 03 Oct, 2002 27 commits
    • Linus Torvalds's avatar
      Fix sigio process lookup handling · 706e5455
      Linus Torvalds authored
      706e5455
    • Linus Torvalds's avatar
      Merge http://linuxusb.bkbits.net/devfs-2.5 · 43f87443
      Linus Torvalds authored
      into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
      43f87443
    • Matthew Wilcox's avatar
      [PATCH] Remove another for_each_process loop · a62e0c44
      Matthew Wilcox authored
      Convert send_sigurg() to the for_each_task_pid() mechanism.  Also in
      the case where we were trying to send a signal to a non-existent PID,
      don't bother searching for -PID in the PGID array; we won't find it.
      a62e0c44
    • Linus Torvalds's avatar
      b1c725a7
    • Christoph Hellwig's avatar
      [PATCH] Remove some more devfs crap · f6b3e618
      Christoph Hellwig authored
      Translation code for old devfs names that _never_ were in mainline
      for root=.
      f6b3e618
    • Arjan van de Ven's avatar
      [PATCH] Remove sys_call_table export · f960dc50
      Arjan van de Ven authored
      The following patch removes the export of the sys_call_table.
      
      There are no uses of this export that are valid and correct. The uses I've
      found so far are
      
      1. Calling syscalls from inside kernel modules
      iBCS/Linux-abi used to do this (and this is the reason for the export
      in the first place), however it does
      no longer, because newer gcc's (2.96/3.x) don't allow
      function pointer calls with a mismatching type. Also it's much better to
      just call the sys_foo functions directly (most are export symbol'd already
      and exporting more if needed wouldn't be a problem, they are clearly a
      stable interface). Since gcc does no longer allow this
      (and I doubt older ones allowed it for all platforms) this I
      consider invalid and unneeded use.
      
      2. Install new syscalls from kernel modules
      LiS seems to be doing this. The correct way to do this is how NFS does
      it for its syscall, and that doesn't need the syscall table to be
      exported for this. Without an in-kernel helper like NFS has, it is not
      possible to do this race free wrt module-unloads etc. Eg this use of the
      export is unneeded and incorrect.
      
      3. Intercept system calls
      OProfile (and intel's vtune which is similar in function) used to do this;
      however what they really need is a notification on certain
      events (exec() mostly). The way modules do this is store the original
      function pointer, install a new one that calls the old one after storing
      whatever info they need. This mechanism breaks badly in the light of
      multiple such modules doing this versus modules
      unloading/uninstalling their handlers (by restoring their saved pointer
      that may or may not point to a valid handler anymore).
      Eg the use of the export in this just a bandaid due to lack of a
      proper mechanism, and also incorrect and crash prone.
      
      4. Extend system calls
      The mechanism for this is identical to the previous one, except
      that now the actual syscall behavior is changed. I don't think open source
      modules do this (generally they don't need to, just adding things to the
      kernel proper works for them), however I've
      seen IBM's closed source cluster fs do this.
      The objections to the mechanism are the same as in 3. Also
      this changes the userspace ABI effectively, something which is undesireable.
      f960dc50
    • Alan Cox's avatar
      [PATCH] aacraid driver for 2.5 · 03f29536
      Alan Cox authored
      Forward port from 2.4
      03f29536
    • Alan Cox's avatar
      [PATCH] move tulip into ethernet 10,100 · c1a178bd
      Alan Cox authored
      c1a178bd
    • Alan Cox's avatar
      [PATCH] 2.5 Fix set_bit abuse in ATP driver · 389e5af6
      Alan Cox authored
      389e5af6
    • Alan Cox's avatar
      0ed5c741
    • Alan Cox's avatar
      [PATCH] PC110 pad docs are wrong · 4f94e73f
      Alan Cox authored
      Someone tweaked the PC110 documents changing touchpad to touchscreen,
      this changes it back because it is a touchpad and _not_ a touchscreen
      4f94e73f
    • Alan Cox's avatar
      [PATCH] disable GMX2000 · 66a95ea5
      Alan Cox authored
      The GMX code in the DRI is unfinished stuff.  You need the old 4.0 DRM
      for the GMX2000 until 4.3 at least
      66a95ea5
    • Alan Cox's avatar
      [PATCH] PATCH: 2.5 trivial - MCA comments · f355faea
      Alan Cox authored
      f355faea
    • Linus Torvalds's avatar
      Merge bk://linuxusb.bkbits.net/linus-2.5 · 9b42378c
      Linus Torvalds authored
      into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
      9b42378c
    • Manfred Spraul's avatar
      [PATCH] pipe bugfix /cleanup · c33585c5
      Manfred Spraul authored
      pipe_write contains a wakeup storm, 2 writers that write into the same
      fifo can wake each other up, and spend 100% cpu time with
      wakeup/schedule, without making any progress.
      
      The only regression I'm aware of is that
      
        $ dd if=/dev/zero | grep not_there
      
      will fail due to OOM, because grep does something like
      
      	for(;;) {
      		rlen = read(fd, buf, len);
      		if (rlen == len) {
      			len *= 2;
      			buf = realloc(buf, len);
      		}
      	}
      
      if it operates on pipes, and due to the improved syscall merging, read
      will always return the maximum possible amount of data. But that's a grep
      bug, not a kernel problem.
      c33585c5
    • Ingo Molnar's avatar
      [PATCH] workqueue lossage (fwd) · d8ac8dd7
      Ingo Molnar authored
      patch from DaveM
      d8ac8dd7
    • Ingo Molnar's avatar
      [PATCH] timer-2.5.40-F7 · afc14106
      Ingo Molnar authored
      This does a number of timer subsystem enhancements:
      
      - simplified timer initialization, now it's the cheapest possible thing:
      
          static inline void init_timer(struct timer_list * timer)
          {
                  timer->base = NULL;
          }
      
        since the timer functions already did a !timer->base check this did not
        have any effect on their fastpath.
      
      - the rule from now on is that timer->base is set upon activation of the
        timer, and cleared upon deactivation. This also made it possible to:
      
      - reorganize all the timer handling code to not assume anything about
        timer->entry.next and timer->entry.prev - this also removed lots of
        unnecessery cleaning of these fields. Removed lots of unnecessary list
        operations from the fastpath.
      
      - simplified del_timer_sync(): it now uses del_timer() plus some simple
        synchronization code. Note that this also fixes a bug: if mod_timer (or
        add_timer) moves a currently executing timer to another CPU's timer
        vector, then del_timer_sync() does not synchronize with the handler
        properly.
      
      - bugfix: moved run_local_timers() from scheduler_tick() into
        update_process_times() .. scheduler_tick() might be called from the fork
        code which will not quite have the intended effect ...
      
      - removed the APIC-timer-IRQ shifting done on SMP, Dipankar Sarma's
        testing shows no negative effects.
      
      - cleaned up include/linux/timer.h:
      
           - removed the timer_t typedef, and fixes up kernel/workqueue.c to use
             the 'struct timer_list' name instead.
      
           - removed unnecessery includes
      
           - renamed the 'list' field to 'entry' (it's an entry not a list head)
      
           - exchanged the 'function' and 'data' fields. This, besides being
             more logical, also unearthed the last few remaining places that
             initialized timers by assuming some given field ordering, the patch
             also fixes these places. (fs/xfs/pagebuf/page_buf.c,
             net/core/profile.c and net/ipv4/inetpeer.c)
      
           - removed the defunct sync_timers(), timer_enter() and timer_exit()
             prototypes.
      
           - added docbook-style comments.
      
      - other kernel/timer.c changes:
      
           - base->running_timer does not have to be volatile ...
      
           - added consistent comments to all the important functions.
      
           - made the sync-waiting in del_timer_sync preempt- and lowpower-
             friendly.
      
      i've compiled, booted & tested the patched kernel on x86 UP and SMP. I
      have tried moderately high networking load as well, to make sure the timer
      changes are correct - they appear to be.
      afc14106
    • Ingo Molnar's avatar
      [PATCH] sigfix-2.5.40-D6 · 794aa320
      Ingo Molnar authored
      This fixes all known signal semantics problems.
      
      sigwait() is really evil - i had to re-introduce ->real_blocked. When a
      signal has no handler defined then the actual action taken by the kernel
      depends on whether the sigwait()-ing thread was blocking the signal
      originally or not. If the signal was blocked => specific delivery to the
      thread, if the signal was not blocked => kill-all.
      
      fortunately this meant that PF_SIGWAIT could be killed - the real_blocked
      field contains all the necessery information to do the right decision at
      signal-sending time.
      
      i've also cleaned up and made the shared-pending code more robust: now
      there's a single central dequeue_signal() function that handles all the
      details. Plus upon unqueueing a shared-pending signal we now re-queue the
      signal to the current thread, which this time around is not going to end
      up in the shared-pending queue. This change handles the following case
      correctly: a signal was blocked in every signal, then one thread unblocks
      it and gets the signal delivered - but there's no handler for the signal
      => the correct action is to do a kill-all.
      
      i removed the unused shared_unblocked field as well, reported by Oleg
      Nesterov.
      
      now we pass both signal-tst1 and signal-tst2, so i'm confident that we got
      most of the details right.
      794aa320
    • Ingo Molnar's avatar
      [PATCH] futex-2.5.40-B5 · 6a20c6fe
      Ingo Molnar authored
      This does a number of futex bugfixes, performance improvements and
      cleanups.
      
      The bugfixes are:
      
       - fix locking bug noticed by Martin Wirth: the ordering of
         page_table_lock, vcache_lock and futex_lock was inconsistent and
         created the possibility of an SMP deadlock.
      
       - fix spurious wakeup noticed by Andrew Morton: the get_user() in
         futex_wait() can set the task state to TASK_RUNNING.
      
       - fix futex_wake COW race, noticed by Martin Wirth - futex_wake() has to
         go through the same lookup rules as the futex_wait() code, otherwise it
         might end up trying to wake up based on the wrong physical page.
      
      Improvements:
      
       - speed up the basic addrs => page lookup done by the futex code. It used
         to do an unconditional get_user_pages() call, which did a vma lookup
         and other heavy-handed tactics - while the common case is that the
         page is mapped and available. Furthermore, due to the COW-race code we
         had to re-check the mapping anyway, which made the get_user_pages()
         thing pretty unnecessery. This inefficiency was noticed by Martin
         Wirth.
      
         the new lookup code first does a lightweight follow_page(), then if no
         page is present we do the get_user_pages() thing.
      
       - locking cleanups - the new lookup code made some things simpler, eg.
         the hash calculation can now be done in queue_me().
      
       - added comments
      
       - reduced include file use.
      
       - increased the futex hashtable.
      6a20c6fe
    • Ingo Molnar's avatar
      [PATCH] dump_stack() cleanup, BK-curr · 26f7ff2e
      Ingo Molnar authored
      This modifies x86's dump_stack() to print out just the backtrace, not
      the stack contents.  The patch also adds one more whitespace after the
      numeric EIP value.  The old dump looked this way:
      
        bad: scheduling while atomic!
        Stack: ffffffff c041c72f 0000006a 00000068 000000f0 c13e1f28 c04c49c0 c13e1f28
               c02a4099 c04c49c0 000000f0 00000000 00003104 c012592e 00003104 00003104
               ffffffff 34000286 00000282 00000000 00000000 c13e1f28 c04c49c0 c04c4468
        Call Trace:
         [<c011f009>]sys_gettimeofday+0x89/0x90
         [<c0113e40>]do_page_fault+0x0/0x49e
         [<c0107d63>]syscall_call+0x7/0xb
      
      the new output is:
      
        bad: scheduling while atomic!
        Call Trace:
         [<c011f009>] sys_gettimeofday+0x89/0x90
         [<c0113e40>] do_page_fault+0x0/0x49e
         [<c0107d63>] syscall_call+0x7/0xb
      
      much nicer and much more compact.
      26f7ff2e
    • Ivan Kokshaysky's avatar
      [PATCH] alpha compile fixes · 76c405d4
      Ivan Kokshaysky authored
      - alpha/kernel/signal.c: sigmask_lock to sig->siglock transition;
      - alpha/lib/Makefile: fix EV6 targets (restore EXTRA_AFLAGS accidentally
        killed by previous patch).
      76c405d4
    • Richard Henderson's avatar
      [PATCH] alpha strncpy fix · 0840c8ec
      Richard Henderson authored
      Ported across from a nearly identical fix to the glibc tree.  Under
      some conditions we'd read one too many source words and segfault.
      0840c8ec
    • Ivan Kokshaysky's avatar
      [PATCH] PCI: probing read-only BARs · 1307ef66
      Ivan Kokshaysky authored
      Some pci devices may have base address registers locked with non-zero values.
      Examples:
      - AGP aperture BAR of AMD-7xx host bridges: if the AGP window disabled,
        this BAR is read-only and read as 0x00000008;
      - BAR0-4 of ALi IDE controllers can be non-zero and read-only.
      
      Obviously, we can't calculate correct size of the respective region in
      this case (for AMD AGP window we'll get 4 GB resource - ouch).
      So I think that we should ignore r/o BARs (let the device specific
      fixups deal with them if needed).
      
      Patch appended (note that extra write(0)/read-back pair is required,
      as the BAR might be programmed with all 1s).
      1307ef66
    • Linus Torvalds's avatar
      Merge penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/andrew · fda0b1ed
      Linus Torvalds authored
      into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
      fda0b1ed
    • Hugh Dickins's avatar
      [PATCH] shmem whitespace cleanups · 5de3d3bd
      Hugh Dickins authored
      Regularize the erratic whitespace conventions in mm/shmem.c.  Removal
      of blank line changes BUG_ON line numbers, otherwise builds the same.
      5de3d3bd
    • Hugh Dickins's avatar
      [PATCH] shmem: misc changes and cleanups · 42ec8004
      Hugh Dickins authored
      If PAGE_CACHE_SIZE were to differ from PAGE_SIZE, the VM_ACCT macro,
      and shmem_nopage's vm_pgoff manipulation, were still not quite right.
      
      Slip a cond_resched_lock into shmem_truncate's long loop; but not into
      shmem_unuse_inode's, since other locks held, and swapoff awful anyway.
      
      Move SetPageUptodate to where it's not already set.  Replace
      copy_from_user by __copy_from_user since access already verified.
      
      Replace BUG()s by BUG_ON()s.  Remove an uninteresting PAGE_BUG().
      42ec8004
    • Hugh Dickins's avatar
      [PATCH] shmem accounting fixes · 62fe4120
      Hugh Dickins authored
      If we're going to rely on struct page *s rather than virtual addresses
      for the metadata pages, let's count nr_swapped in the private field:
      these pages are only for storing swp_entry_ts, and need not be examined
      at all when nr_swapped is zero.
      62fe4120