Commit graph

28840 commits

Author SHA1 Message Date
Jesper Juhl 915366da0c V4L/DVB (5912): Clean up duplicate includes in drivers/media/
This patch cleans up duplicate includes in
        drivers/media/

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:12 -03:00
Hans Verkuil c6f95d16e0 V4L/DVB (5910): ivtv-fb: improve debug message
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:09 -03:00
Hans Verkuil f38a7982ad V4L/DVB (5909): ivtv: update version to 1.1 to mark ivtv-fb support
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:08 -03:00
Ian Armstrong aaf9fa21b6 V4L/DVB (5908): ivtv-fb: cleanups, prevent fw calls in some cases
Signed-off-by: Ian Armstrong <ian@iarmst.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:08 -03:00
Hans Verkuil 84149a0f70 V4L/DVB (5906): ivtv-fb: replace HZ with msecs_to_jiffies
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:04 -03:00
Hans Verkuil d715e766dd V4L/DVB (5905): ivtv-fb: Use proper ioctl value
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:04 -03:00
Hans Verkuil be383bd312 V4L/DVB (5904): ivtv-fb: cleanups
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:03 -03:00
Hans Verkuil 32db775452 V4L/DVB (5902): Add ivtv-fb framebuffer driver.
Add the ivtv-fb framebuffer driver for cx23415 devices (currently
only the Hauppauge PVR-350 cards). This makes it possible to use
the On-Screen Display functionality of these cards, either for menus
during MPEG playback, or as a console or X display.

Signed-off-by: Kevin Thayer <nufan_wfk@yahoo.com>
Signed-off-by: Chris Kennedy <c@groovy.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: John P Harvey <john.p.harvey@btinternet.com>
Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:02 -03:00
Rasmus Rohde d3c35acf24 V4L/DVB (5897): dtt200u: add support for the Miglia TVMini USB DVB-T adapter
add code for autodetection and firmware download to the Miglia TVMini USB
DVB-T adapter.  After firmware download, the device re-registers using
the WT220U_ZL0353_WARM usb id.

Signed-off-by: Rasmus Rohde <rohde@duff.dk>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:02:59 -03:00
Trent Piepho 60e3cac47a V4L/DVB (5885): zr36067: Fix problems with module parameters
Add permissions to all the module parameters so they can be queried and set
(when possible) via sysfs.

Add description for the vidmem parameter.

Change the video_nr parameter to an array, so that the video number can be
specified when a user has more than one card.  The driver would try to give
all cards the same number otherwise, which will fail for all cards after the
first.

The default_input option would only allow values of 0 or 1, contrary to the
description.  Allow values up to the number of inputs defined for the card.

Add description of lock_norm's different behavior for 1 and >1.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:02:58 -03:00
Jean Delvare 18b548ca58 V4L/DVB (5884): zr36067: clean up debug function
Debugging cleanups to the zr36067 driver:

* Use module_param_named() to declare the debug parameter, so we can
  use a single global variable to handle the debug level. This makes
  the driver a bit smaller (by 648 bytes on x86_64), thanks to one
  less level of indirection on every use.

* Change the debug parameter sysfs permissions, so that the debug
  level can be adjusted at runtime, as is done in many other
  media/video drivers.

* The debug level is between 0 and 5, not 0 and 4.

* Move the zr_debug export and dprintk macro definition to a header
  file so that we don't have to define them in each source file.

* Simplify a duplicate test on zr_debug.

Note that zr_debug was subsequently renamed to debug_zr36067 to avoid
possible conflicts with other Zoran device drivers, on a suggestion
by Trent Piepho.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:02:57 -03:00
Sakari Ailus 63116febb9 V4L/DVB (5883): V4L: Fix a compile warning on non-32-bit machines.
Fix a compile warning on non-32-bit machines in v4l2-int-device.h.
Add internal ioctl interface fallback function for ioctls with one
argument.

Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:02:57 -03:00
Hans Verkuil baa05e4b45 V4L/DVB (5881): ivtv: init channel for NTSC_M_JP standard.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:02:54 -03:00
Sakari Ailus a5e9086211 V4L/DVB (5863): TCM825x: Add driver.
Add a driver for Toshiba TCM825x VGA camera sensor. This sensor is used
e.g. in Nokia N800 internet tablet.

This driver uses the new V4L2 internal ioctl interface.

Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:02:53 -03:00
Sakari Ailus 9b5d0f1e6d V4L/DVB (5862): V4L: Add internal ioctl-like interface.
This patch adds an internal ioctl-like interface which can be used in
situations where a single Video4Linux device is implemented by multiple
device drivers. One master device controls one or more slave devices.
The slaves provide Video4Linux ioctl-like interface for the use of the
master.

Only a handful of ioctls are implemented at the moment. More can (and
should) be added as more functionality is required.

Signed-off-by: Sakari Ailus <sakari.ailus@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:02:51 -03:00
Jeff Garzik baf14aa14e sata_mv: correct S/G table limits
The recent mv_fill_sg() rewrite, to fix a data corruption problem
related to IOMMU virtual merging, forgot to account for the
potentially-increased size of the scatter/gather table after its run.

Additionally, the DMA boundary is reduced from 0xffffffff to 0xffff
to more closely match the needs of mv_fill_sg().

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-09 12:38:26 -07:00
Maarten Bressers e2a57a8159 Correct Makefile rule for generating custom keymap
When building a custom keymap, after setting GENERATE_KEYMAP := 1 in
drivers/char/Makefile, the kernel build fails like this:

    CC      drivers/char/vt.o
  make[2]: *** No rule to make target `drivers/char/%.map', needed by `drivers/char/defkeymap.c'.  Stop.
  make[1]: *** [drivers/char] Error 2
  make: *** [drivers] Error 2

This was caused by commit af8b128719, which
deleted a necessary colon from the Makefile rule that generates the keymap,
since that rule contains both a target and a target-pattern.  The following
patch puts the colon back:

Signed-off-by: Maarten Bressers <mbres@gentoo.org>
Cc: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-08 16:06:51 -07:00
Karsten Keil d39d5ed97e ISDN: Fix data access out of array bounds
Fix against access random data bytes outside the dev->chanmap array.
Thanks to Oliver Neukum for pointing me to this issue.

Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-08 13:01:21 -07:00
Dmitry Torokhov 3eb215de26 Driver core: fix SYSF_DEPRECATED breakage for nested classdevs
We should only reparent to a class former class devices that
form the base of class hierarchy. Nested devices should still
grow from their real parents.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Tested-by: Andrey Borzenkov <arvidjaar@mail.ru>
Tested-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-07 16:42:22 -07:00
Linus Torvalds 85923b1246 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  firewire: point to migration document
2007-10-07 16:41:09 -07:00
Attila Kinali 9d9b7ad717 Add manufacturer and card id of teltonica pcmcia modems
Add the manufacturer and card id of teltonica pcmcia modems to serial_cs.c

Signed-off-by: Attila Kinali <attila@kinali.ch>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-07 16:28:43 -07:00
Linus Torvalds 70cb97935b VT_WAITACTIVE: Avoid returning EINTR when not necessary
We should generally prefer to return ERESTARTNOHAND rather than EINTR,
so that processes with unhandled signals that get ignored don't return
EINTR.

This can help with X startup issues:

    Fatal server error:
    xf86OpenConsole: VT_WAITACTIVE failed: Interrupted system call

although the real fix is having the X server always retry EINTR
regardless (since EINTR does happen for signals that have handlers
installed). Keithp has a patch for that.

Regardless, ERESTARTNOHAND is the correct thing to use.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-07 16:02:55 -07:00
Stefan Richter a1134dd48d firewire: point to migration document
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-10-07 13:48:41 +02:00
Kyle McMartin 3a4986955c Revert "intel_agp: fix stolen mem range on G33"
This reverts commit f443675aff, which
breaks horribly if you aren't running an unreleased xf86-video-intel
driver out of git.

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Cc: Dave Airlie <airlied@linux.ie>
Cc: Zhenyu Wang <zhenyu.z.wang@intel.com>
Acked-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-06 12:49:43 -07:00
Benjamin Herrenschmidt 71e4eda8ce Fix non-terminated PCI match table in PowerMac IDE
The PCI device table in the powermac IDE driver isn't properly
terminated.  Depending on how your kernel is linked and other random
factors, you can end up with this driver matched against any other PCI
device in your system, possibly crashing at boot.

Thanks to Heikki for tracking this down with me, the bug have been there
for some time, though it rarely hurts due to luck.  In this case, the
switch from .22 to .23-rc9 is causing it to show up due to differences
in the resulting layout of .data I suppose.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <pmac@au1.ibm.com>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: Heikki Lindholm <holindho@cs.helsinki.fi>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-06 09:32:56 -07:00
Francois Romieu c946b30472 r8169: revert part of 6dccd16b7c
The 8169/8110SC currently announces itself as:
[...]
eth0: RTL8169sc/8110sc at 0x........, ..:..:..:..:..:.., XID 18000000 IRQ ..
                                                             ^^^^^^^^
It uses RTL_GIGA_MAC_VER_05 and this part of the changeset can cut
its performance by a factor of 2~2.5 as reported by Timo.

(the driver includes code just before the hunk to write the ChipCmd
register when mac_version == RTL_GIGA_MAC_VER_0[1-4])

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Timo Jantunen <jeti@welho.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-05 14:05:48 -04:00
FUJITA Tomonori d5e89385e9 [SCSI] megaraid_old: fix READ_CAPACITY
The bulk transfer mode got eleminated by
3f6270ef76.  Unfortunately, this mode is
required for READ_CAPACITY commands on certain cards, so put it back
again.  This fixes a boot failure regression reported by Burton
Windle.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-04 12:08:49 -04:00
Linus Torvalds 804b3f9a16 Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  drivers/ata/pata_ixp4xx_cf.c: ioremap return code check
  Ata: pata_marvell, use ioread* for iomap-ped memory
  libata: fix for sata_mv >64KB DMA segments
2007-10-03 15:44:10 -07:00
Scott Thompson 991bf528f6 drivers/ata/pata_ixp4xx_cf.c: ioremap return code check
Add missing ioremap return checks.

Signed-off-by: Scott Thompson <postfail <at> hushmail.com>
Acked-by: Tejun Heo <htejun@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-03 14:43:28 -04:00
Jiri Slaby 90925d3050 Ata: pata_marvell, use ioread* for iomap-ped memory
pata_marvell, use ioread* for iomap-ped memory

read* on pci_iomapped memory is incorrect, fix it

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-03 14:43:27 -04:00
Olof Johansson 4007b493ee libata: fix for sata_mv >64KB DMA segments
Fix bug in sata_mv for cases where the IOMMU layer has merged SG entries
to larger than 64KB. They need to be split up before being sent to
the driver.

Just for simplicity's sake, split up at 64K boundary instead of 64K size,
since that's what the common code does anyway.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-03 14:41:20 -04:00
Stephen Hemminger 529d303e07 sky2: jumbo frame regression fix
Remove unneeded check that caused problems with jumbo frame sizes.
The check was recently added and is wrong.
When using jumbo frames the sky2 driver does fragmentation, so
rx_data_size is less than mtu.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-03 13:39:42 -04:00
Jeff Garzik 5c55c43491 Merge branch 'fixes-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes 2007-10-03 13:39:16 -04:00
Joe Perches 4365e99f95 [PATCH] bcm43xx: Correct printk with PFX before KERN_
Correct printk with PFX before KERN_ in bcm43xx_wx.c

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-02 17:04:22 -04:00
Linus Torvalds f778089cb2 Merge branch 'sas-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6
* 'sas-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
  aic94xx: fix DMA data direction for SMP requests
2007-10-02 10:41:06 -07:00
Linus Torvalds db7a89db5e Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  dm9601: Fix receive MTU
  mv643xx_eth: Do not modify struct netdev tx_queue_len
  qla3xxx: bugfix: Fix VLAN rx completion handling.
  qla3xxx: bugfix: Add memory barrier before accessing rx completion.
2007-10-02 10:40:40 -07:00
Linus Torvalds 2910ca6f8a Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  ata_piix: add another TECRA M3 entry to broken suspend list
2007-10-02 10:40:20 -07:00
Jeff Garzik d136552e8b aic94xx: fix DMA data direction for SMP requests
DMA-mapped SMP (scsi management protocol) requests going /to/ the device
need the PCI DMA data direction to indicate such.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-02 13:16:10 -04:00
Peter Korsgaard f662fe5a0b dm9601: Fix receive MTU
dm9601 didn't take the ethernet header into account when calculating
RX MTU, causing packets bigger than 1486 to fail.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-02 12:59:10 -04:00
Dale Farnsworth 593ff56ef2 mv643xx_eth: Do not modify struct netdev tx_queue_len
This driver erroneously zeros dev->tx_queue_len, since
mp->tx_ring_size has not yet been initialized.  Actually,
the driver shouldn't modify tx_queue_len at all and should
leave the value set by alloc_etherdev(), currently 1000.

Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-02 12:55:10 -04:00
Ron Mercer 50626297b1 qla3xxx: bugfix: Fix VLAN rx completion handling.
Fix 4032 chip undocumented "feature" where bit-8 is set
if the inbound completion is for a VLAN.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-02 12:55:10 -04:00
Ron Mercer b323e0e49f qla3xxx: bugfix: Add memory barrier before accessing rx completion.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-02 12:55:10 -04:00
Tejun Heo 4c74d4ec35 ata_piix: add another TECRA M3 entry to broken suspend list
There's a different version of DMI table for TECRA M3 where it has
proper vendor and product name entry.  Add the entry to the broken
suspend list.

Angus Turnbull reported and provided initial patch.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Angus Turnbull <angus@twinhelix.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-02 10:54:02 -04:00
Eric Dumazet 9b42c336d0 [TCP]: secure_tcp_sequence_number() should not use a too fast clock
TCP V4 sequence numbers are 32bits, and RFC 793 assumed a 250 KHz clock.
In order to follow network speed increase, we can use a faster clock, but
we should limit this clock so that the delay between two rollovers is
greater than MSL (TCP Maximum Segment Lifetime : 2 minutes)

Choosing a 64 nsec clock should be OK, since the rollovers occur every
274 seconds.

Problem spotted by Denys Fedoryshchenko

[ This bug was introduced by f859581519 ]

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-01 21:01:24 -07:00
Linus Torvalds e2cd68f7cd Merge branch 'fixes-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
* 'fixes-jgarzik' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6:
  [PATCH] libertas: build problems when partially modular
2007-10-01 13:11:48 -07:00
Linus Torvalds ca45fe8ea8 Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
  V4L/DVB (6052): ivtv: fix udma yuv bug
2007-10-01 08:02:57 -07:00
Samuel Ortiz 8792f961ba VT ioctl race fix
When calling the RELDISP VT ioctl, we are reading vt_newvt while the
console workqueue could be messing with it (through change_console()).  We
fix this race by taking the console semaphore before reading vt_newvt.

Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Acked-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-01 07:52:23 -07:00
Randy Dunlap f998351c75 [PATCH] libertas: build problems when partially modular
Fix missing symbols in libertas USB driver when it is modular and rest
of libertas is built-in.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-09-30 20:35:39 -04:00
Ian Armstrong cb50f548c0 V4L/DVB (6052): ivtv: fix udma yuv bug
Using udma yuv causes the driver becomes locked into that mode. This prevents
use of the mpeg decoder & non-udma yuv output. This patch clears the
operating mode when the device is closed.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-09-30 10:31:34 -03:00
Jan Lübbe a64314e62d fix console change race exposed by CFS
The new behaviour of CFS exposes a race which occurs if a switch is
requested when vt_mode.mode is VT_PROCESS.

The process with vc->vt_pid is signaled before vc->vt_newvt is set.
This causes the switch to fail when triggered by the monitoing process
because the target is still -1.

[ If the signal sending fails, the subsequent "reset_vc(vc)" will then
  reset vt_newvt to -1, so this works for that case too.   - Linus ]

Signed-off-by: Jan Lübbe <jluebbe@lasnet.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-29 10:00:15 -07:00