[PATCH] make devpts filesystem mandatory even for CONFIG_DEVFS
This patch rips out handling of UNIX98 ptys from devfs. We already
have a special small filesystem to handle it (devpts) that's always
compiled in anyway. This allows to get rid of all DEVFS_FL* flags and
some gunk in devfs.
Ben Collins [Thu, 17 Apr 2003 06:07:43 +0000 (23:07 -0700)]
[PATCH] IEEE-1394/Firewire updates
- Add driver registration for dv1394/video1394/raw1394.
- Fix 3 sleep-while-atomic bugs in ohci1394 and ieee1394.
- Cleanup some bus-reset handling in ohci1394.
- Add empty config-rom handling.
- Check and handle SBP-2 logins active/available for non-exclusive
logins.
- Fix bug in SBP-2 DMA cleanup.
Andrew Morton [Thu, 17 Apr 2003 05:52:11 +0000 (22:52 -0700)]
[PATCH] Fix orlov allocator boundary case
In the interests of SMP scalability the ext2 free blocks and free inodes
counters are "approximate". But there is a piece of code in the Orlov
allocator which fails due to boundary conditions on really small
filesystems.
Fix that up via a final allocation pass which simply uses first-fit for
allocation of a directory inode.
David Mosberger [Wed, 16 Apr 2003 04:20:26 +0000 (21:20 -0700)]
[PATCH] fix fs->lock deadlock with emulated name lookup
The patch below is needed to avoid a deadlock on fs->lock. Without
the patch, if __emul_lookup_dentry() returns 0, we fail to reacquire
current->fs->lock and then go ahead to read_unlock() it anyhow. Bad
for your health.
I believe the bug was introduced when the fast pathwalk was reverted
in order to introduce the RCU lockless path walking.
David Mosberger [Tue, 15 Apr 2003 15:51:27 +0000 (08:51 -0700)]
[PATCH] module symbol fix
Fix for trivial typo. Without it, you can't insert anything on top of
agpgart.ko because the agp_register_driver() will erroneously pick up
the symbol version from agp_backend_acquire().
Rusty Russell [Tue, 15 Apr 2003 14:56:40 +0000 (07:56 -0700)]
[NETFILTER_IPV4]: De-linearization of IP Connection Tracking.
This converts connection tracking and all the connection tracking
modules to handle non-linear skbs. Enough interfaces have been
broken in the process that old helpers won't compile.
Interfaces which used to take a "void *data, int len" or
"struct iphdr *iph, int len" now take the skb itself (and an offset to
the data in the case of the first interface), which is not
linearized in any way (although Alexey says after ip_rcv the IP header
is always linear, so IPv4 netfilter hooks can always assume a linear
IP hdr).
Helpers which examine data (amanda, FTP, IRC) now copy it into a buffer
and examine that.
Now that the kernel provides code user programs are executing directly
(I mean the vsyscall code on x86) it is necessary to add unwind
information for that code as well. The unwind information is used not
only in C++ code.
This patch adds a AT_SYSINFO_EH_FRAME ELF aux-table value that points to
the unwinding block description for the sysinfo frame, and makes sure
the AT_* value is passed to applications. It defines the static data
for the unwind blocks (two, one for int80 and the other for sysenter),
and finally adds code to copy the data in place.
Ivan Kokshaysky [Tue, 15 Apr 2003 03:58:21 +0000 (20:58 -0700)]
[PATCH] alpha: move_initrd fix (from Jeff Wiedemeier)
While testing our upcoming kernel update for 7.2 alpha, I've encountered
a problem with move_initrd. It allocates a page-aligned chunk to move
the initrd into, but it doesn't allocate the entire last
page. Subsequent bootmem allocations can then be filled from the last
page used be the initrd. This then becomes a problem when the initrd
memory is released.
Ivan Kokshaysky [Tue, 15 Apr 2003 03:56:48 +0000 (20:56 -0700)]
[PATCH] alpha: execve() fix
The 2.5 kernels may hang on execve(). Most easily this can be reproduced
by submitting forms in mozilla, apparently because it does execve with
very long argument strings.
That's what happens in do_execve, I suppose:
bprm.mm = mm_alloc();
...
init_new_context(current, bprm.mm); here we update current ptbr
with new mm->pgd
...
copy_strings;
interrupt -> do_softirq -> switch to ksoftirqd
...
switch back to do_execve;
copy_strings - immediate page fault in copy_user that we can't
handle because the new ptbr has been activated
after context switch and current->mm is not
valid anymore.
The fix is to not update ptbr for current task in init_new_context(),
as we do it later in activate_mm() anyway.
The patch fixes some problems with NFS under heavy writeout.
NFS pages can be in a clean but unreclaimable state. They are unreclaimable
because the server has not yet acked the write - we may need to "redirty"
them if the server crashes.
These are referred to as "unstable" pages. We need to count them alongside
dirty and writeback pages when making flushing and throttling decisions.
Otherwise the machine can be flooded with these pages and the VM has
problems.
Andrew Morton [Mon, 14 Apr 2003 13:10:43 +0000 (06:10 -0700)]
[PATCH] Posix timer hang fix
From: george anzinger <george@mvista.com>
The MAJOR problem was a hang in the kernel if a user tried to delete a
repeating timer that had a signal delivery pending. I was putting the
task in a loop waiting for that same task to pick up the signal. OUCH!
A minor issue relates to the need by the glibc folks, to specify a
particular thread to get the signal. I had this code in all along,
but somewhere in 2.5 the signal code was made POSIX compliant, i.e.
deliver to the first thread that doesn't have it masked out.
This now uses the code from the above mentioned clean up. Most
signals go to the group delivery signal code, however, those
specifying THREAD_ID (an extension to the POSIX standard) are sent to
the specified thread. That thread MUST be in the same thread group as
the thread that creates the timer.
Andrew Morton [Mon, 14 Apr 2003 13:09:45 +0000 (06:09 -0700)]
[PATCH] flush_work_queue() fixes
The workqueue code currently has a notion of a per-cpu queue being "busy".
flush_scheduled_work()'s responsibility is to wait for a queue to be not busy.
Problem is, flush_scheduled_work() can easily hang up.
- The workqueue is deemed "busy" when there are pending delayed
(timer-based) works. But if someone repeatedly schedules new delayed work
in the callback, the queue will never fall idle, and flush_scheduled_work()
will not terminate.
- If someone reschedules work (not delayed work) in the work function, that
too will cause the queue to never go idle, and flush_scheduled_work() will
not terminate.
So what this patch does is:
- Create a new "cancel_delayed_work()" which will try to kill off any
timer-based delayed works.
- Change flush_scheduled_work() so that it is immune to people re-adding
work in the work callout handler.
We can do this by recognising that the caller does *not* want to wait
until the workqueue is "empty". The caller merely wants to wait until all
works which were pending at the time flush_scheduled_work() was called have
completed.
The patch uses a couple of sequence numbers for that.
So now, if someone wants to reliably remove delayed work they should do:
/*
* Make sure that my work-callback will no longer schedule new work
*/
my_driver_is_shutting_down = 1;
/*
* Kill off any pending delayed work
*/
cancel_delayed_work(&my_work);
/*
* OK, there will be no new works scheduled. But there may be one
* currently queued or in progress. So wait for that to complete.
*/
flush_scheduled_work();
The patch also changes the flush_workqueue() sleep to be uninterruptible.
We cannot legally bale out if a signal is delivered anyway.
Andrew Morton [Mon, 14 Apr 2003 13:09:35 +0000 (06:09 -0700)]
[PATCH] Fix oprofile on hyperthreaded P4's
From: Philippe Elie <phil.el@wanadoo.fr>
- oprofile is currently only profiling one sibling. Fix that with
appropriate register settings.
- fix an oops which could occur if the userspace driver were to request a
non-existent resource.
- in NMI handler counter_config[i].event is accessible from user space so
user can change the event during profiling by echo xxx >
/dev/oprofile/event
- event mask was wrong, the bit field is 6 bits length not 5, events
SSE_INPUT_ASSIST and X87_SIMD_MOVES_UOP was affected by masking high bit of
event number.
Amiga keyboard: fix default keyboard mappings:
- Map the parentheses keys on the numeric keypad to KPLEFTPAREN and
KPRIGHTPAREN (was: NUMLOCK and SCROLLLOCK)
- Map the Help key to HELP (was: F11)
- Map the Amiga keys to LEFTMETA and RIGHTMETA (was: RESERVED)
[IPV6]: Fixed multiple mistake extension header handling.
- double free if sending Parameter Problem message in reassembly code.
- (sometimes) broken checksum
- HbH not producing unknown header; it is only allowed at the beginning of
the exthdrs chain.
- wrong pointer value in Parameter Problem message.
s390 dasd driver fixes:
- Take request queue lock in dasd_end_request.
- Make it work with CONFIG_DEVFS_FS=y.
- Properly wait for the root device.
- Cope with requests killed due to failed channel path.
- Improve reference counting.
- Remove devno from struct dasd_device.
- Remove unnecessary bdget/bdput calls.
Common i/o layer fixes:
- Fix for path no operational condition in cio_start.
- Fix handling of user interruption parameter.
- Add code to wait for devices in init_ccw_bus_type.
- Move qdio states out of main cio state machine.
- Reworked chsc data structures.
- Add ccw_device_start_timeout.
- Handle path verification required flag.
s390 fixes:
- Initialize timing related variables first and then enable the timer interrupt.
- Normalize nano seconds to micro seconds in do_gettimeofday.
- Add types for __kernel_timer_t and __kernel_clockid_t.
- Fix ugly bug in switch_to: set prev to the return value of resume, otherwise
prev still contains the previous process at the time resume was called and
not the previous process at the time resume returned. They differ...
- Add missing include to get the kernel compiled.
- Get a closer match with the i386 termios.h file.
- Cope with INITIAL_JIFFIES.
- Define cpu_relax to do a cpu yield on VM and LPAR.
- Don't reenable interrupts in program check handler.
- Add pte_file definitions.
- Fix PT_IEEE_IP special case in ptrace.
- Use compare and swap to release the lock in _raw_spin_unlock.
- Introduce invoke_softirq to switch to async. interrupt stack.
Russell King [Mon, 14 Apr 2003 04:05:37 +0000 (21:05 -0700)]
[PATCH] flush_cache_mm in zap_page_range
unmap_vmas() eventually calls tlb_start_vma(), where most architectures
flush caches as necessary. The flush here seems to make the
flush_cache_range() in zap_page_range() redundant, and therefore can be
removed.
Kai Mäkisara [Mon, 14 Apr 2003 03:33:35 +0000 (20:33 -0700)]
[PATCH] SCSI tape EOT write fixes
This contains the following changes:
- EOT detection fixed when writing in fixed block mode
- asynchronous writes in fixed block mode and write threshold removed
to enable the EOT fixes (the parameter accepted for compatibility)
Kai Mäkisara [Mon, 14 Apr 2003 03:33:25 +0000 (20:33 -0700)]
[PATCH] SCSI tape ILI and timeout fixes
This contains the following changes:
- ILI fixed to work with really old drives
- message printed in case block larger than read()
- long timeout used when creating a tape partition
I managed to add a bug to the local APIC NMI watchdog's
resume procedure in the driver model conversion for 2.5.67.
The problem is that the resume procedure simply calls the
enable procedure. If the NMI watchdog has been disabled by
another driver (like oprofile or perfctr), then the NMI
watchdog will incorrectly be re-enabled.
I discovered this when updating the perfctr driver for 2.5.67
and seeing unexpected NMIs after a resume from apm --suspend.
We can fix this by unregistering the NMI watchdog from the
driver model when disabling it (like the code did before the
driver model changes), or by remembering the previous state
at suspend and checking it at resume. The patch below uses
the second, simpler, approach. Tested, please apply.
James Bottomley [Mon, 14 Apr 2003 04:18:41 +0000 (23:18 -0500)]
fix scsi queue plugging behaviour
Following recent changes removing blk_queue_empty(), we were
incorrectly plugging the queue some times (most often as part of
the SCSI scan process). This was causing a non-deterministic panic
in the scan code because a destroyed queue was sometimes being
unplugged and run.
Cam Mayor [Sun, 13 Apr 2003 19:22:24 +0000 (20:22 +0100)]
[ARM PATCH] 1453/1: fix clps711x framebuffer "use SRAM?" range
Patch from cam mayor
when setting up the framebuffer on the clps711x platform, the code checks to see if your allocated memory area is less than 38400 bytes. If it is, a comment is sent to the kernel output suggesting it could be placed into SRAM. This patch modifies the check so that it is suggested if the allocated memory area is less than OR EQUAL TO 38400 bytes. This value is important as 38400 bytes is exactly the size of a 320 x 240 x 4bpp screen.
Please see mail thread '[patch] Cleanup of head.S?' from 25 Feb 2003. Let us remove the third part now. The mapping set by this code is done already.
The comment of rmk was
'I suspect we can kill (3) without hurting stuff that's merged into the
-rmk tree, although I'm sure there's a reason it existed. I'll have
to check my mail archives, but I think there was a machine that required,
but it appears not to be merged.'