James Ketrenos [Tue, 13 Sep 2005 22:35:21 +0000 (17:35 -0500)]
[PATCH] ieee80211 Added wireless spy support
Added wireless spy support to Rx code path.
Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
NOTE: Looks like scripts/Lindent generated output different
than the Lindented version already in-kernel, hence all the
whitespace deltas... *sigh* Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Intel Pro/Wireless 2011 and 2011B have the same numeric ID, so use
strings instead.
Take all entries from *.conf for Orinoco, HostAP and linux-wlan-ng and
adds them with minimal changes (e.g. we don't need a revision string
after a string that identifies the chipset).
Add comments with card names to all numeric entries. Note: the comments
don't and cannot cover all cards, since the main reason of having
numeric IDs is to cover cards that are often rebranded.
Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Don Fry reminded me that the pcnet32_loopback_test() asssumes the ring size
is no less than 4. The minimum ring size was changed to 4 in
pcnet32_set_ringparam() to allow the loopback test to work unchanged.
- Set minimum ring size to 4 to allow loopback test to work unchanged
- Moved variable init_block to first field in struct pcnet32_private
Signed-off-by: Hubert WS Lin <wslin@tw.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This patch implements the set_ringparam(), one of the ethtool operations,
which allows changing tx/rx ring sizes via ethtool.
- Changed memery allocation of tx/rx ring from static to dynamic
- Implemented set_ringparam()
- Tested on i386 and ppc64
Signed-off-by: Hubert WS Lin <wslin@tw.ibm.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Cc: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Matt Porter [Fri, 9 Sep 2005 19:10:10 +0000 (12:10 -0700)]
[PATCH] Add rapidio net driver
Adds an "Ethernet" driver which sends Ethernet packets over the standard
RapidIO messaging. This depends on the core RIO patch for mailbox/doorbell
access.
Signed-off-by: Matt Porter <mporter@kernel.crashing.org> Cc: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Adrian Bunk [Sat, 10 Sep 2005 06:17:28 +0000 (23:17 -0700)]
[PATCH] drivers/net/wan/: possible cleanups
This patch contains possible cleanups including the following:
- make needlessly global code static
- #if 0 the following unused global function:
- sdladrv.c: sdla_intde
- remove the following unused global variable:
- lmc_media.c: lmc_t1_cables
- remove the following unneeded EXPORT_SYMBOL's:
- cycx_drv.c: cycx_inten
- sdladrv.c: sdla_inten
- sdladrv.c: sdla_intde
- sdladrv.c: sdla_intack
- sdladrv.c: sdla_intr
- syncppp.c: sppp_input
- syncppp.c: sppp_change_mtu
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
[PATCH] Replace drivers/net/wan custom ctype macros with standard ones
Replace the custom is_digit()/is_hex_digit() macros with
isdigit()/isxdigit() from <linux/ctype.h> Additionaly remove unused macro
is_alpha() from <linux/wanpipe.h>
Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Cc: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Pavel Roskin [Fri, 9 Sep 2005 22:43:02 +0000 (18:43 -0400)]
[PATCH] orinoco: WE-18 support
Author: Jean Tourrilhes <jt@hpl.hp.com> Signed-off-by: Pavel Roskin <proski@gnu.org>
Use new Wireless Extension API for wireless stats. Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
[DCCP]: Check if already in the CLOSING state in dccp_rcv_closereq
It is possible to receive more than one CLOSEREQ packet if the
CLOSE packet sent in response is somehow lost, change the state
to DCCP_CLOSING only on the first CLOSEREQ packet received.
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
George G. Davis [Tue, 13 Sep 2005 21:55:00 +0000 (22:55 +0100)]
[ARM] 2896/1: Add sys_ipc_wrapper to pass 'fifth' argument on stack
Patch from George G. Davis
As pointed out be Matthew Klahn <MKLAHN@motorola.com>, some sys_ipc()
call options require six args, e.g. SEMTIMEDOP. This patch adds an ARM sys_ipc_wrapper to save the sys_ipc() 'fifth' arg on the stack.
Signed-off-by: George G. Davis <gdavis@mvista.com>
arch/arm/kernel/calls.S | 2 +-
arch/arm/kernel/entry-common.S | 5 +++++ Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Patrick McHardy [Tue, 13 Sep 2005 20:49:15 +0000 (13:49 -0700)]
[NETFILTER]: Fix DHCP + MASQUERADE problem
In 2.6.13-rcX the MASQUERADE target was changed not to exclude local
packets for better source address consistency. This breaks DHCP clients
using UDP sockets when the DHCP requests are caught by a MASQUERADE rule
because the MASQUERADE target drops packets when no address is configured
on the outgoing interface. This patch makes it ignore packets with a
source address of 0.
Thanks to Rusty for this suggestion.
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Masked FPU exceptions should obviously not happen in the first place,
but if they do, ignoring them seems to be the right thing to do.
Although there is no documentation available for Cyrix MII, I did find
erratum F-7 for Winchip C6, "FPU instruction may result in spurious
exception under certain conditions" which seems to indicate that this
can happen.
That would also explain the behaviour Ondrej Zary reported on the MII.
Paul Mackerras [Tue, 13 Sep 2005 10:56:20 +0000 (20:56 +1000)]
[PATCH] ppc64: Make eeh_init function again
My patch "Separate pci bits out of struct device_node" (commit 1635317facea3094ddf34082cd86797efb1d9f7e) had the unfortunate
side-effect that it stopped eeh_init() from working correctly.
It needs the pointers set up by find_and_init_phbs(), but it was being
called just before find_and_init_phbs(). That meant that we didn't
enable EEH (pSeries PCI error recovery) on any devices, and that meant
that on POWER5 systems, the hypervisor wouldn't let us enable memory or
I/O space access to any devices, and their drivers got somewhat
confused.
This fixes it by moving the eeh_init call after find_and_init_phbs.
Tested on a POWER5 partition.
Signed-of-by: Paul Mackerras <paulus@samba.org> Signed-of-by: Linus Torvalds <torvalds@osdl.org>
Jan Beulich [Tue, 13 Sep 2005 08:25:45 +0000 (01:25 -0700)]
[PATCH] matroxfb adjustments
Some adjustments to the matroxfb code, for one part preventing the display
to be disabled for longer than necessary, and for the other part to make
information about the frame buffer position available so that a kernel
debugger might obtain that before the initial mode change.
Finally, some return code corrections to fit the generic fb code.
Signed-off-by: Jan Beulich <jbeulich@novell.com> Acked-by: Petr Vandrovec <vandrove@vc.cvut.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jan Beulich [Tue, 13 Sep 2005 08:25:44 +0000 (01:25 -0700)]
[PATCH] fbcon: constify font data
const-ify the font control structures and data, to make somewhat better
guarantees that these are not modified anywhere in the kernel.
Specifically for a kernel debugger to share this information from the
normal kernel code, such a guarantee seems rather desirable.
Signed-off-by: Jan Beulich <jbeulich@novell.com> Cc: "Antonino A. Daplas" <adaplas@hotpop.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Adds all defines, ioctls and structs needed for the sliced VBI API
VBI = Vertical Blank Interval.
It is related with the way TV signals work. It sends a line, then, it has a
retrace time to allow the tube to move electrons to the beginning of the next
line. This was the main reason at the beginning of analog B&W TV.
There is a lot of bandwidth lost on VBI. So, lots of TV systems use it to
send other information such as Closed Captions and Teletext. Also,
broadcasters uses this as a channel to exchange information from the content
producer to their subsidiaries at each city.
There's already a raw VBI interface on V4L2 api, used for Closed Captions and
Teletext. The decoding is doing at userlevel space and it is mostly for
analog TV signals, non encoded.
Encoded signals (MPEG, for example), may need also to transmit other
information (like, for example, display aspect, i.e. 4x3, widescreen...).
Sliced VBI interface is a method to allow the video stream to transmit this
kind of information.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Tue, 13 Sep 2005 08:25:39 +0000 (01:25 -0700)]
[PATCH] Code cleanups in calbacks in svcsock
Change a printk(KERN_WARNING to dprintk, and it is really only interesting
when trying to debug a problem, and can occur normally without error.
Remove various gratuitous gotos in surrounding code, and remove some
type-cast assignments from inside 'if' conditionals, as that is just
obscuring what it going on.
Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Tue, 13 Sep 2005 08:25:39 +0000 (01:25 -0700)]
[PATCH] nfsd4: fix setclientid unlock of unlocked state lock
We could try to unlock the state lock here without having first locked it.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Tue, 13 Sep 2005 08:25:38 +0000 (01:25 -0700)]
[PATCH] nfsd4: fix open seqid incrementing in lock
In the case of a lock which introduces a new lockowner, the openowner's
sequence id should be incremented, even when the operation fails, if the
error is a sequence-id-mutating error. The current code fails to do that
in some cases. Fix this by using the same sequence-id-incrementing
mechanism that all other such operations use.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Tue, 13 Sep 2005 08:25:37 +0000 (01:25 -0700)]
[PATCH] nfsd4: move replay_owner
It seems more natural to move the setting of the replay_owner into the
relevant procedure instead of doing it in nfsv4_proc_compound.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Neil Brown [Tue, 13 Sep 2005 08:25:36 +0000 (01:25 -0700)]
[PATCH] nfsd4: printk reduction
Demote some printk's that look like they could be triggered by non-buggy
clients to dprintk's. (For example, stale clientid's are normal
occurrences on reboot, and on a server with a lot of clients these messages
could become annoying.)
Also remove some redundant dprintk's (e.g. no need for both STALE_CLIENTID
and its callers to do dprintks).
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Richard Purdie [Tue, 13 Sep 2005 08:25:35 +0000 (01:25 -0700)]
[PATCH] SharpSL: Add an input keyboard driver for Zaurus cxx00 series
Add a input driver for the keyboard found on the Zaurus Cxx00 series (Spitz,
Akita, Borzoi). Its based on corgikbd but there are enough subtle differences
to justify a separate driver.
Signed-Off-by: Richard Purdie <rpurdie@rpsys.net> Cc: Vojtech Pavlik <vojtech@suse.cz> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Richard Purdie [Tue, 13 Sep 2005 08:25:34 +0000 (01:25 -0700)]
[PATCH] SharpSL: Add new ARM PXA machines Spitz and Borzoi with partial Akita Support
Add the platform support code for two new Sharp Zaurus Models, Spitz
(SL-C3000) and Borzoi (SL-C3100).
This patch also adds most of the foundations for Akita (SL-C1000) Support.
The missing link for Akita is the driver for its I2C io expander. Once this
has been finished, the missing Kconfig option and machine declaration can
easily be added to this code.
Signed-Off-by: Richard Purdie <rpurdie@rpsys.net> Cc: Vojtech Pavlik <vojtech@suse.cz> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Richard Purdie [Tue, 13 Sep 2005 08:25:33 +0000 (01:25 -0700)]
[PATCH] SharpSL: Abstract model specifics from Corgi Backlight driver
Separate out the Sharp Zaurus c7x0 series specific code from the Corgi
backlight driver. Abstract model/machine specific functions to corgi_lcd.c
via sharpsl.h
This enables the driver to be used by the Zaurus cxx00 series.
Signed-Off-by: Richard Purdie <rpurdie@rpsys.net> Cc: Vojtech Pavlik <vojtech@suse.cz> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Richard Purdie [Tue, 13 Sep 2005 08:25:33 +0000 (01:25 -0700)]
[PATCH] SharpSL: Abstract c7x0 specifics from Corgi Touchscreen driver
Separate out the Sharp Zaurus c7x0 series specific code from the Corgi
Touchscreen driver. Use the new functions in corgi_lcd.c via sharpsl.h for
hsync handling and pass the IRQ as a platform device resource. Move a
function prototype into the w100fb header file where it belongs.
This enables the driver to be used by the Zaurus cxx00 series.
Signed-Off-by: Richard Purdie <rpurdie@rpsys.net> Cc: Vojtech Pavlik <vojtech@suse.cz> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Richard Purdie [Tue, 13 Sep 2005 08:25:32 +0000 (01:25 -0700)]
[PATCH] SharpSL: Add cxx00 support to the Corgi LCD driver
The same LCD is present on both the Sharp Zaurus c7x0 series and the cxx00 but
with different framebuffer drivers (w100fb vs. pxafb). This patch adds
support for the cxx00 series to the LCD driver. It also adds some LCD to
touchscreen interface logic needed by the touchscreen driver to prevent
interference problems, the idea being to keep all the ugly code in one place
leaving the drivers themselves clean. sharpsl.h is used to provide the
abstraction.
Signed-Off-by: Richard Purdie <rpurdie@rpsys.net> Cc: Vojtech Pavlik <vojtech@suse.cz> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Richard Purdie [Tue, 13 Sep 2005 08:25:30 +0000 (01:25 -0700)]
[PATCH] SharpSL: Abstract c7x0 specifics from Corgi SSP
Sharp's newer range of Zaurus clamshell handhelds, the cxx00's are similar to
the c7x0 series yet different. This patch series abstracts the differences
and generates a set of common drivers that support both series of devices. It
then adds machine support for Spitz (SL-C3000) and Borzoi (SL-C3100). Hooks
for Akita (SL-C1000) differences are also added. The I2C driver for its IO
expander is the only missing piece.
This patch:
Separate out the Sharp Zaurus c7x0 series specific code from corgi_ssp.c so
that other models such as the cxx00's can share it. Create sharpsl.h which
will be used to abstract machine/model specifics.
This enables the driver to be used by the Zaurus cxx00 series.
Signed-Off-by: Richard Purdie <rpurdie@rpsys.net> Cc: Vojtech Pavlik <vojtech@suse.cz> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Peter Osterlund [Tue, 13 Sep 2005 08:25:28 +0000 (01:25 -0700)]
[PATCH] pktcdvd: more accurate I/O accounting
In the /proc statistics, only count writes that upper layers have requested.
Don't count additional writes created inside the packet driver to satisfy the
requirement to only write full packets.
Signed-off-by: Peter Osterlund <petero2@telia.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Mike Miller [Tue, 13 Sep 2005 08:25:26 +0000 (01:25 -0700)]
[PATCH] cciss: SCSI tape info for /proc
Add SCSI host and device info not elsewhere available to /proc/scsi/cciss/*
Namely, connect cciss device instance with scsi host number, and give scsi
host number, bus, target, lun, devicetype, and 8-byte cciss LUNID for each
tapedrive/medium changer attached to a controller
Signed-off-by: Stephen M. Cameron <steve.cameron@hp.com> Signed-off-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Mike Miller [Tue, 13 Sep 2005 08:25:25 +0000 (01:25 -0700)]
[PATCH] cciss: One Button Disaster Recovery support
This patch adds support for "One Button Disaster Recovery" devices to the
cciss driver. (OBDR devices are tape drives which can pretend to be cd-rom
devices temporarily. Once booted the device can be reverted to a tape drive
and data recovery operations can be automatically begun.)
This is an enhancement request by a vendor/partner working on One Button
Disaster Recovery.
Signed-off-by: Stephen M. Cameron <steve.cameron@hp.com> Signed-off-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Mike Miller [Tue, 13 Sep 2005 08:25:24 +0000 (01:25 -0700)]
[PATCH] cciss: fix for DMA brokeness
The CCISS driver seems to loose track of DMA mappings created by it's
fill_cmd() routine. Neither callers of this routine are extracting the DMA
address created in order to do the unmap.
Instead, they simply try to unmap 0x0. It's easy to see this problem on an
x86_64 system when using the "swiotlb=force" boot option. In this case, the
driver is leaking resources of the swiotlb and not causing a sync of the
bounce buffer.
Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Mike Miller [Tue, 13 Sep 2005 08:25:22 +0000 (01:25 -0700)]
[PATCH] cciss: direct lookup for command completions
This patch changes the way we complete commands. In the old method when we
got a completion we searched our command list from the top until we find it.
This method uses a tag associated with each command (not SCSI command tagging)
to index us directly to the completed command. This helps performance.
Signed-off-by: Don Brace <dab@hp.com> Signed-off-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Mike Miller [Tue, 13 Sep 2005 08:25:22 +0000 (01:25 -0700)]
[PATCH] cciss: new disk register/deregister routines
This patch removes a couple of functions dealing with configuration and
replaces them with new functions. This implementation fixes some bugs
associated with the ACUXE. It also allows a logical volume to be removed from
the middle without deleting all volumes behind it.
If a user has 5 logical volumes and decides he wants to reconfigure volume
number 3, he can now do that without removing volumes 4 & 5 first. This code
has been tested in our labs against all application software.
Signed-off-by: Chase Maupin <chase.maupin@hp.com> Signed-off-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Mike Miller [Tue, 13 Sep 2005 08:25:21 +0000 (01:25 -0700)]
[PATCH] cciss: busy_initializing flag
This patch adds a flag called busy_initializing. If there are multiple
controllers in a server AND the HP agents are running it's possible the agents
may try to poll a card that is still initializing if the driver is removed and
then added again.
Signed-off-by: Don Brace <dab@hp.com> Signed-off-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Mike Miller [Tue, 13 Sep 2005 08:25:19 +0000 (01:25 -0700)]
[PATCH] cciss: new controller pci/subsystem ids
This patch adds new PCI and subsystem ID's that finally made the spec. It
also include a name change for one controller. I know there's a lot of
duplicat names but the fw folks wanted this for the different implementations.
Even though the same ASIC is used it may be embedded on some platforms,
standup card in others, and a mezzanine in other servers.
Signed-off-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
We seem to use both asm-offsets.* and asm_offsets.*
Signed-off-by: Michal K. K. Piotrowski <michal.k.k.piotrowski@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Chris Mason [Tue, 13 Sep 2005 08:25:17 +0000 (01:25 -0700)]
[PATCH] reiserfs: use mark_inode_dirty instead of reiserfs_update_sd
reiserfs should use mark_inode_dirty during reiserfs_file_write and
reiserfs_commit_write. This makes sure the inode is properly flagged as
dirty, which is used during O_SYNC to decide when to trigger log commits.
This patch also removes the O_SYNC check from reiserfs_commit_write, since
that gets dealt with properly at higher layers once we start using
mark_inode_dirty.
Thanks to Hifumi Hisashi <hifumi.hisashi@lab.ntt.co.jp> for catching this.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton [Tue, 13 Sep 2005 08:25:14 +0000 (01:25 -0700)]
[PATCH] set_current_state() commentary
Explain the mysteries of set_current_state().
Quoth Linus:
The scheduler itself never needs the memory barrier at all.
The barrier is needed only if the user itself ends up testing some other
thing afterwards, ie if you have
set_process_state(TASK_INTERRUPTIBLE);
if (still_need_to_sleep())
schedule();
then the "still_need_to_sleep()" thing may test flags and wakeup events,
and then you _may_ want to (and often do) make sure that the write of
TASK_INTERRUPTIBLE is serialized wrt the reads of any wakeup data (since
the wakeup may have happened on another CPU).
So the comment is somewhat wrong. We don't really _care_ whether the state
propagates out to other CPU's since all of our actions are purely local,
and there is nothing we do that is conditional on any other CPU: we're
going to sleep unconditionally, and the scheduler only cares about _our_
state, not about somebody elses state.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Peter Staubach [Tue, 13 Sep 2005 08:25:12 +0000 (01:25 -0700)]
[PATCH] open returns ENFILE but creates file anyway
When open(O_CREAT) is called and the error, ENFILE, is returned, the file
may be created anyway. This is counter intuitive, against the SUS V3
specification, and may cause applications to misbehave if they are not
coded correctly to handle this semantic. The SUS V3 specification
explicitly states "No files shall be created or modified if the function
returns -1.".
The error, ENFILE, is used to indicate the system wide open file table is
full and no more file structs can be allocated.
This is due to an ordering problem. The entry in the directory is created
before the file struct is allocated. If the allocation for the file struct
fails, then the system call must return an error, but the directory entry
was already created and can not be safely removed.
The solution to this situation is relatively easy. The file struct should
be allocated before the directory entry is created. If the allocation
fails, then the error can be returned directly. If the creation of the
directory entry fails, then the file struct can be easily freed.
Signed-off-by: Peter Staubach <staubach@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Tom Rini [Tue, 13 Sep 2005 08:25:09 +0000 (01:25 -0700)]
[PATCH] ppc32: discard *.exit.text and *.exit.data sections
Discard *.exit.text sections on runtime. We cannot do this on link time
because of the way BUG macros are implemented. If "__exit function" calls
one of those macros, __bug_table section will reference this function.
This is similar to ".altinstructions" situation on i386.
*.exit.data seems to be OK in this respect and is discarded on link
time.
Signed-off-by: Eugene Surovegin <ebs@ebshome.net> Signed-off-by: Tom Rini <trini@kernel.crashing.org> Acked-by: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>