Neil Brown [Wed, 24 Jul 2002 03:40:30 +0000 (20:40 -0700)]
[PATCH] MD - Fix two bugs that would cause sync_sbs to Oops
Sync_sbs tries to access the ->sb for the first rdev of an mddev.
This can oops as the wrong arg is given to list_entry, and also
if a define was faound to be failed, as failed devices have their ->sb
removed. But that removal isn't necessary, so now an rdev will always
have an ->sb.
Martin Schwidefsky <schwidefsky@de.ibm.com> reported "Bug with shared
memory" to LKML 14 May: hang due to schedule in truncate_list_pages
called from .... shm_destroy holding shm_lock spinlock. shm_destroy
needs that lock for shm_rmid, but it can be safely unlocked once link
from id to shp has been removed.
Martin Dalecki [Wed, 24 Jul 2002 03:12:13 +0000 (20:12 -0700)]
[PATCH] IDE-101
Here is a quick fix. I would like to synchronize with the irq handler
changes as well. Becouse right now I know that preemption is killing
the disk subsystem when moving data between disks using different
request queues... In esp. It get's me in to do_request() with a queue
in unplugged state. (Not everything is my fault, after all :-).
- init thread needs to have preempt_count of 1 until sched_init().
(William Lee Irwin III)
- clean up the irq-mask macros. (Linus)
- add barrier() to irq_enter() and irq_exit(). (based on Oleg Nesterov's
comment.)
- move the irqs-off check into preempt_schedule() and remove
CONFIG_DEBUG_IRQ_SCHEDULE.
- remove spin_unlock_no_resched() and comment the affected places more
agressively.
- slab.c needs to spin_unlock_no_resched(), instead of spin_unlock(). (It
also has to check for preemption in the right spot.) This should fix
the memory corruption.
- irq_exit() needs to run softirqs if interrupts not active - in the
previous patch it ran them when preempt_count() was 0, which is
incorrect.
- spinlock macros are updated to enable preemption after enabling
interrupts. Besides avoiding false positive warnings, this also
- fork.c has to call scheduler_tick() with preemption disabled -
otherwise scheduler_tick()'s spin_unlock can preempt!
- irqs_disabled() macro introduced.
- [ all other local_irq_enable() or sti instances conditional on
CONFIG_DEBUG_IRQ_SCHEDULE are to fix false positive warnings. ]
- fix buggy in_softirq(). Fortunately the bug made the test broader,
which didnt result in algorithmical breakage, just suboptimal
performance.
- move do_softirq() processing into irq_exit() => this also fixes the
softirq processing bugs present in apic.c IRQ handlers that did not
test for softirqs after irq_exit().
- simplify local_bh_enable().
Amiga Zorro bus updates
- Bring APUS Zorro bus announcement in sync with the m68k version
- Fix typo in Zorro device generator name
- Kill duplicate ] in Zorro device ID database
- Include <asm/io.h> instead of duplicating definitions from <asm/io.h>
M68k VT updates:
- Include <linux/vt_kern.h> instead of copying the kd_mksound() prototype
- Lots of stuff depends on CONFIG_VT:
o SYSRQ_KEY
o kd_mksound()
o mach_keyb_init()
o mach_kbdrate()
o mach_kbd_leds()
o mach_kbd_translate()
o mach_sysrq_xlate()
o Atari keyboard and joystick drivers
- There's no need to provide dummy routines for kbd{rate,_leds}()
- dummy_con depends on CONFIG_DUMMY_CONSOLE
M68k parport updates
- Remove workaround code for parport bug (parport without FIFO)
- ->dma_buf is used in FIFO mode only
- Add missing prototype for parport_atari_init()
- Initialize uninitialized variable
Mac/m68k Nubus updates
- Use nubus_{read,write}[bwl]()
- Fix /proc/bus/nubus
- Fix type and linkage of nubus_init()
- Use nubus_{read,write}[bwl]()
- Kill some address assignment warnings
- Include <asm/nubus.h>
- nubus_init() is an initcall, hence static
Update ISA space code on m68k (from 2.4.x)
- Add support for multiple types of ISA busses in one kernel image (e.g. an
image for both Q40 and Amiga with PCMCIA)
- Allow port operations on m68k if CONFIG_ISA is defined
M68k I/O core updates
- Use memory mapped I/O access routines for non-ISA/PCI/PCMCIA m68k devices
- Don't use writel() and friends on m68k memory mapped I/O
- Fix typo in definition of writew()
- Add missing definitions for {in,out}_le{16,32}()
The old form of designated initializers are obsolete: we need to replace them
with the ISO C forms before 2.6. Gcc has always supported both forms anyway.
(from Rusty Russell <rusty@rustcorp.com.au>, with some mods by me)
Linux/m68k configuration updates
- Unify serial console questions
- Move serial driver config questions together
- The Atari mouse driver depends on the Atari keyboard driver, hence on
CONFIG_VT
- Don't hardcode CONFIG_VT=n on VME, you may want it for a multi-machine
kernel
- The IRQ_* definitions are not used on Amiga, but we need them if we
build a multi-machine kernel, too
Atari frame buffer device updates
- Move static function definition before usage
- Fix breakage caused by recent fbdev changes
- Make some setup parameter parsing separate routines (strsep() must be able
to modify the passed pointers)
- On Atari the ATI Mach64 registers are memory mapped, but it's not on
the PCI bus, so we cannot use writel() and friends.
- Kill warnings by protecting unused data with the appropriate #ifdef
- On Atari the ATI Mach64 registers are memory mapped, but it's not on the
PCI bus, so we cannot use writel() and friends.
- Fix assignment of addresses for Atari
Mac/m68k ADB updates (from 2.4.x)
- Add support for m68k Macs
- Add missing call to VIA CUDA initialization routine
- Update Mac II VIA support
- Make local functions static and add their prototypes
- Add missing defines for Mac/m68k PMUs
It turns out there was a subtle bug in Craig Kulesa's port of
the rmap patch to 2.5, which is only apparent on non-x86 machines
where pfn 0 isn't valid.
The problem was that zap_pte_range() would clear the pte before
page_remove_rmap() would get called. This means that on these
machines the pte chain would never be removed and the machine
would oops at page_alloc.c line 98...
Thanks to Russell King for helping track down this bug.
Kai Mäkisara [Tue, 23 Jul 2002 02:12:51 +0000 (19:12 -0700)]
[PATCH] SCSI tape driver fixes for 2.5.27
This patch contains the following changes to the SCSI tape driver:
- fixes EOM bug in large transfer in fixed block mode
- enables writing trailers by alternating error with ENOSPC and
attempting a new write
- the write loop cleaned and simplified
- set the scatter/gather list element lengths to sum up to the
desired transfer length
- MTERASE to use the short erase SCSI command if argument is zero
- set the can-bsr flag for drives with SCSI level >= 3
- C99 structure initializations
- some janitorial changes
Russell King [Tue, 23 Jul 2002 01:45:58 +0000 (02:45 +0100)]
[SERIAL] Fix another SMP deadlock with modem status signal changes
The original fix sent to Ingo for stop_tx didn't take account that
the start_tx and stop_tx methods can be called from the device
specific code under the port spinlock. Consequently, we move the
spinlock to the callers of these methods. Documentation updated
to reflect the change.