Commit Graph

811 Commits

Author SHA1 Message Date
Alan Cox e2b3afd676 [PATCH] rio driver rework continued #2
First large chunk of code cleanup.  The split between this and #3 and #4 is
fairly arbitary and due to the message length limit on the list.  These
patches continue the process of ripping out macros and typedefs while cleaning
up lots of 32bit assumptions.  Several inlines for compatibility also get
removed and that causes a lot of noise.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-24 07:33:29 -08:00
Alan Cox 27c6e526f3 [PATCH] rio driver rework continued #1
More header cleanups, strip out typedefs and remove cruft.  There are a lot of
magic macros that can go and also a great deal of abuse of volatile that is
not needed any more as this patch set cleans up the misuse of pointer access
to ISA and PCI space.

It now builds cleanly on 64bit, although there is more work left to do

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-24 07:33:29 -08:00
Alan Cox b6c6b6021e [PATCH] rioboot: post-Lindent
After the indent we can now clean up unused code, and fix all myriad cases
that don't use readb/writeb properly.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-24 07:33:28 -08:00
Alan Cox 3b8e3f1e44 [PATCH] rioboot: lindent
This is the result of indent -kr -i8 -bri0 -l255

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-24 07:33:28 -08:00
Alan Cox 74769abfcb [PATCH] rio: more header cleanup
Strip some of the typedef mess out Remove a small subset of unused defines
and the like.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-24 07:33:28 -08:00
Olaf Hering e933b6d651 [PATCH] remove ipmi pm_power_off redefinition
Use the global define of pm_power_off

Signed-off-by: Olaf Hering <olh@suse.de>
Cc: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-24 07:33:24 -08:00
Alexey Dobriyan 53b3531bbb [PATCH] s/;;/;/g
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-24 07:33:24 -08:00
Al Viro ef5a4c8b04 [PATCH] remove ISA legacy functions: drivers/char/toshiba.c
switch from isa_read...() to ioremap() and read...()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-24 07:33:19 -08:00
Adrian Bunk 41c28ff163 [PATCH] kill _INLINE_
This patch removes all occurances of _INLINE_ in the kernel.

With the exception of tty_flip.h, I've simply removed the inline's since
gcc should know best which functions to be inlined.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-23 07:38:16 -08:00
Jes Sorensen 40953ed87d [PATCH] snsc kmalloc2kzalloc
Change driver to use kzalloc rather than kmalloc+memset

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-23 07:38:15 -08:00
Ingo Molnar 81861d78c9 [PATCH] sem2mutex: serial ->port_write_mutex
Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-23 07:38:14 -08:00
Ingo Molnar 70522e121a [PATCH] sem2mutex: tty
Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-23 07:38:11 -08:00
Ingo Molnar 6f87f0deeb [PATCH] sem2mutex: drivers/char/
Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-23 07:38:11 -08:00
Arjan van de Ven 8ed965d612 [PATCH] sem2mutex: drivers: raw, connector, dcdbas, ppp_generic
Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-23 07:38:10 -08:00
Rafael J. Wysocki ff4da2e262 [PATCH] swsusp: add check for suspension of X-controlled devices
It is unsafe to suspend devices if the hardware is controlled by X.  Add an
extra check to prevent this from happening.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-23 07:38:08 -08:00
Linus Torvalds 2e6e33bab6 Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (78 commits)
  [PATCH] powerpc: Add FSL SEC node to documentation
  [PATCH] macintosh: tidy-up driver_register() return values
  [PATCH] powerpc: tidy-up of_register_driver()/driver_register() return values
  [PATCH] powerpc: via-pmu warning fix
  [PATCH] macintosh: cleanup the use of i2c headers
  [PATCH] powerpc: dont allow old RTC to be selected
  [PATCH] powerpc: make powerbook_sleep_grackle static
  [PATCH] powerpc: Fix warning in add_memory
  [PATCH] powerpc: update mailing list addresses
  [PATCH] powerpc: Remove calculation of io hole
  [PATCH] powerpc: iseries: Add bootargs to /chosen
  [PATCH] powerpc: iseries: Add /system-id, /model and /compatible
  [PATCH] powerpc: Add strne2a() to convert a string from EBCDIC to ASCII
  [PATCH] powerpc: iseries: Make more stuff static in platforms/iseries/mf.c
  [PATCH] powerpc: iseries: Remove pointless iSeries_(restart|power_off|halt)
  [PATCH] powerpc: iseries: mf related cleanups
  [PATCH] powerpc: Replace platform_is_lpar() with a firmware feature
  [PATCH] powerpc: trivial: Cleanup whitespace in cputable.h
  [PATCH] powerpc: Remove unused iommu_off logic from pSeries_init_early()
  [PATCH] powerpc: Unconfuse htab_bolt_mapping() callers
  ...
2006-03-22 22:20:46 -08:00
Anton Blanchard 8ac4fc53fe [PATCH] powerpc: dont allow old RTC to be selected
Now powerpc uses the generic RTC stuff we should not enable the old RTC.
Doing so will result in hangs at boot.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-03-23 14:40:16 +11:00
Linus Torvalds d04ef3a795 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Add a secondary TSB for hugepage mappings.
  [SPARC]: Respect vm_page_prot in io_remap_page_range().
2006-03-22 10:56:57 -08:00
Dmitry Torokhov d0497614e0 [PATCH] tb0219: convert to the new platform device interface
Do not use platform_device_register_simple() as it is going away.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-22 07:53:56 -08:00
Dmitry Torokhov eee8ab75c6 [PATCH] mv64x600_wdt: convert to the new platform device interface
mv64x600_wdt: convert to the new platform device interface Do not use
platform_device_register_simple() as it is going away.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-22 07:53:56 -08:00
Dmitry Torokhov d39b6cfe66 [PATCH] vr41xx: convert to the new platform device interface
The patch does the following for v441xx seris drivers:

 - stop using platform_device_register_simple() as it is going away
 - mark ->probe() and ->remove() methods as __devinit and __devexit
   respectively
 - initialize "owner" field in driver structure so there is a link
   from /sys/modules to the driver
 - mark *_init() and *_exit() functions as __init and __exit

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-22 07:53:56 -08:00
David S. Miller 14778d9072 [SPARC]: Respect vm_page_prot in io_remap_page_range().
Make sure the callers do a pgprot_noncached() on
vma->vm_page_prot.

Pointed out by Hugh Dickens.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-22 01:15:13 -08:00
Linus Torvalds e952f31bce Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64-SGI] SN2-XP reduce kmalloc wrapper inlining
  [IA64] MCA: remove obsolete ifdef
  [IA64] MCA: update MCA comm field for user space tasks
  [IA64] MCA: print messages in MCA handler
  [IA64-SGI] - Eliminate SN pio_phys_xxx macros. Move to assembly
  [IA64] use icc defined constant
  [IA64] add __builtin_trap definition for icc build
  [IA64] clean up asm/intel_intrin.h
  [IA64] map ia64_hint definition to intel compiler intrinsic
  [IA64] hooks to wait for mmio writes to drain when migrating processes
  [IA64-SGI] driver bugfixes and hardware workarounds for CE1.0 asic
  [IA64-SGI] Handle SC env. powerdown events
  [IA64] Delete MCA/INIT sigdelayed code
  [IA64-SGI] sem2mutex ioc4.c
  [IA64] implement ia64 specific mutex primitives
  [IA64] Fix UP build with BSP removal support.
  [IA64] support for cpu0 removal
2006-03-21 15:58:17 -08:00
Linus Torvalds 08a4ecee98 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (23 commits)
  [PATCH] sysfs: fix a kobject leak in sysfs_add_link on the error path
  [PATCH] sysfs: don't export dir symbols
  [PATCH] get_cpu_sysdev() signedness fix
  [PATCH] kobject_add_dir
  [PATCH] debugfs: Add debugfs_create_blob() helper for exporting binary data
  [PATCH] sysfs: fix problem with duplicate sysfs directories and files
  [PATCH] Kobject: kobject.h: fix a typo
  [PATCH] Kobject: provide better warning messages when people do stupid things
  [PATCH] Driver core: add macros notice(), dev_notice()
  [PATCH] firmware: fix BUG: in fw_realloc_buffer
  [PATCH] sysfs: kzalloc conversion
  [PATCH] fix module sysfs files reference counting
  [PATCH] add EXPORT_SYMBOL_GPL_FUTURE() to USB subsystem
  [PATCH] add EXPORT_SYMBOL_GPL_FUTURE() to RCU subsystem
  [PATCH] add EXPORT_SYMBOL_GPL_FUTURE()
  [PATCH] Clean up module.c symbol searching logic
  [PATCH] kobj_map semaphore to mutex conversion
  [PATCH] kref: avoid an atomic operation in kref_put()
  [PATCH] handle errors returned by platform_get_irq*()
  [PATCH] driver core: platform_get_irq*(): return -ENXIO on error
  ...
2006-03-21 09:25:15 -08:00
Tony Luck 1f84253e3c Pull sn-handle-sc-powerdown into release branch 2006-03-21 08:18:04 -08:00
David Vrabel 489447380a [PATCH] handle errors returned by platform_get_irq*()
platform_get_irq*() now returns on -ENXIO when the resource cannot be
found.  Ensure all users of platform_get_irq*() handle this error
appropriately.

Signed-off-by: David Vrabel <dvrabel@arcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 13:42:57 -08:00
Adrian Bunk 7b9af3455b remove dead Radeon URL
This patch removes a dead Radeon URL from two Kconfig files.

This isue was noted by Reto Gantenbein <ganto82@gmx.ch> in
Kernel Bugzilla #4446.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-03-20 20:23:13 +01:00
Adrian Bunk 0f76ee4514 Merge with git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git 2006-03-20 18:30:36 +01:00
Paul Mackerras 5164501794 Merge ../linux-2.6 2006-03-09 14:32:05 +11:00
Bjorn Helgaas f032f90809 [IA64] SGI SN drivers: don't report !sn2 hardware as an error
This stuff is all in the generic ia64 kernel, and the new initcall error
reporting complains about them.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2006-03-07 15:27:59 -08:00
Mark Brown 28e02bac9c [PATCH] Add missing ifdef for VIA RNG code
Almost all the code for the VIA RNG is guarded with __i386__ #ifdefs,
the only exception being the enumeration of RNG types which is used to
index into the rng_vector ops array.  This patch adds an ifdef around
that for consistency and since the guard makes a difference when adding
new RNG types on non-i386 hardware.

Signed-Off-By: Mark Brown <broonie@sirena.org.uk>
Signed-Off-By: Jeff Garzik <jeff@garzik.org>
2006-03-03 21:05:58 -05:00
Harald Welte 67bc620006 [PATCH] pcmcia: CM4000, CM4040 Driver fixes
Using this patch, Omnikey CardMan 4000 and 4040 devices automatically
get their device nodes created by udev.

Also, we now check for (and handle) failure of pcmcia_register_driver()

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-03-01 11:18:30 +01:00
Darren Jenkins 2641dfd981 [PATCH] synclink_gt: make ->init_error signed
Examples of misuse are

3112 info->init_error = -1;

4440 if ((info->init_error = register_test(info)) < 0) {

Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-28 20:53:44 -08:00
Paul Fulghum 6af6aab34a [PATCH] tty buffering: comment out debug code
Comment out debug code in tty receive buffering.  For performance reasons
(I'll keep it enabled in -mm).

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-28 20:53:44 -08:00
Paul Mackerras 6749c55073 Merge ../powerpc-merge 2006-02-28 16:35:24 +11:00
Marc Zyngier d904ffd6e0 [PATCH] Fix Specialix SX corruption
With the latest kernels, I experienced some strange corruption, some
'*****' being randomly inserted in the character flow, like this:

	ashes:~#
	ashes:~#
	a*******shes:~#
	ashes:~#
	ashes:~#

Further investigation shows that the problem was introduced during
Alan's "TTY layer buffering revamp" patch, the amount of data to be
copied being reduced after buffer allocation.  Moving the count fixup
around solves the problem.

Signed-off-by: Marc Zyngier <maz@misterjones.org>
Approved-by: Rogier Wolff <R.E.Wolff@BitWizard.nl>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-27 08:18:04 -08:00
Marc Zyngier 04a3d311c0 [PATCH] Fix Specialix SI probing
As the (probably) last user of a Specialix SI board, I noticed that
recent kernels would fail to probe the sucker.  Quick investigation
indicate a few missing braces...

I left the double probing in place, as it looks like it's been here
forever.

Signed-off-by: Marc Zyngier <maz@misterjones.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-26 09:10:58 -08:00
Paul Mackerras a00428f5b1 Merge ../powerpc-merge 2006-02-24 14:05:47 +11:00
Michal Ostrowski fb5c594c2a [PATCH] Fix race condition in hvc console.
tty_schedule_flip() would schedule a thread that would call flush_to_ldisc().
If tty_buffer_request_room() gets called prior to that thread running --
which is likely in this loop in hvc_poll(), it would set the active flag
in the tty buffer and consequently flush_to_ldisc() would ignore it.

The result is that input on the hvc console is not processed.

This fix calls tty_flip_buffer_push (and flags the tty as
"low_latency").  The push to the ldisc thus happens synchronously.

Signed-off-by: Michal Ostrowski <mostrows@watson.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-24 11:36:40 +11:00
Linus Torvalds 6d7b9efacb Merge branch 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 2006-02-20 20:23:14 -08:00
Linus Torvalds 0b1fc9b86f Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart 2006-02-20 20:08:23 -08:00
Christoph Lameter 9b0f8b040a [PATCH] Terminate process that fails on a constrained allocation
Some allocations are restricted to a limited set of nodes (due to memory
policies or cpuset constraints).  If the page allocator is not able to find
enough memory then that does not mean that overall system memory is low.

In particular going postal and more or less randomly shooting at processes
is not likely going to help the situation but may just lead to suicide (the
whole system coming down).

It is better to signal to the process that no memory exists given the
constraints that the process (or the configuration of the process) has
placed on the allocation behavior.  The process may be killed but then the
sysadmin or developer can investigate the situation.  The solution is
similar to what we do when running out of hugepages.

This patch adds a check before we kill processes.  At that point
performance considerations do not matter much so we just scan the zonelist
and reconstruct a list of nodes.  If the list of nodes does not contain all
online nodes then this is a constrained allocation and we should kill the
current process.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-20 20:00:09 -08:00
Dave Jones b41c82eb5f [AGPGART] Add some informational printk to nforce GART failure path.
Signed-off-by: Dave Jones <davej@redhat.com>
2006-02-20 18:34:37 -05:00
Dave Airlie 73d72cffe5 drm: fix brace placement
Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-02-18 16:30:54 +11:00
Dave Airlie 4e5e2e2560 drm: radeon add r300 TX_CNTL and verify bitblt packets
The Xgl on r300 doesn't work unless you add a verify bitblt function to the
DRM, and we need to pass TX_CNTL to flush texture caches.

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-02-18 15:51:35 +11:00
Dave Airlie 91e3738ebc drm: fixup i915 interrupt on X server exit
Fixes: IRQ disabled (i915?) when switchig between gnome themes (gnome-theme-manager)

Signed-off-by: Dave Airlie <airlied@linux.ie>
2006-02-18 15:17:04 +11:00
Marcel Selhorst 8c9e877949 [PATCH] Infineon TPM: IO-port leakage fix, WTX-bugfix
Fix IO-port leakage from request_region in case of error during TPM
initialization, adds more pnp-verification and fixes a WTX-bug.

Signed-off-by: Marcel Selhorst <selhorst@crypto.rub.de>
Acked-by: Kylene Jo Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-17 13:59:26 -08:00
Bjorn Helgaas be5efffb76 [PATCH] HPET: handle multiple ACPI EXTENDED_IRQ resources
When the _CRS for a single HPET contains multiple EXTENDED_IRQ resources,
we overwrote hdp->hd_nirqs every time we found one.

So the driver worked when all the IRQs were described in a single
EXTENDED_IRQ resource, but failed when multiple resources were used.
(Strictly speaking, I think the latter is actually more correct, but both
styles have been used.)

Someday we should remove all the ACPI stuff from hpet.c and use PNP driver
registration instead.  But currently PNP_MAX_IRQ is 2, and HPETs often have
more IRQs.  Hint, hint, Adam :-)

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Bob Picco <robert.picco@hp.com>
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Adam Belay <ambx1@neo.rr.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-14 16:09:34 -08:00
Paul Fulghum da965822ab [PATCH] tty reference count fix
Fix hole where tty structure can be released when reference count is non
zero.  Existing code can sleep without tty_sem protection between deciding
to release the tty structure (setting local variables tty_closing and
otty_closing) and setting TTY_CLOSING to prevent further opens.  An open
can occur during this interval causing release_dev() to free the tty
structure while it is still referenced.

This should fix bugzilla.kernel.org [Bug 6041] New: Unable to handle kernel
paging request

In Bug 6041, tty_open() oopes on accessing the tty structure it has
successfully claimed.  Bug was on SMP machine with the same tty being
opened and closed by multiple processes, and DEBUG_PAGEALLOC enabled.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-14 16:09:33 -08:00
Alan Cox 5552c28f69 [PATCH] Fix locking error in esp
Noted by Al Viro.

Also remove unused tmp_buf

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-14 10:01:39 -08:00