Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
90ff4d27
Commit
90ff4d27
authored
Nov 23, 2007
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import 2.3.21
parent
0983223c
Changes
20
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
2311 additions
and
2326 deletions
+2311
-2326
Documentation/fb/framebuffer.txt
Documentation/fb/framebuffer.txt
+20
-3
arch/i386/boot/Makefile
arch/i386/boot/Makefile
+20
-23
arch/i386/boot/bootsect.S
arch/i386/boot/bootsect.S
+324
-365
arch/i386/boot/compressed/Makefile
arch/i386/boot/compressed/Makefile
+1
-1
arch/i386/boot/setup.S
arch/i386/boot/setup.S
+645
-660
arch/i386/boot/tools/build.c
arch/i386/boot/tools/build.c
+7
-25
arch/i386/boot/video.S
arch/i386/boot/video.S
+1175
-1210
arch/i386/defconfig
arch/i386/defconfig
+46
-0
drivers/char/qpmouse.c
drivers/char/qpmouse.c
+2
-2
drivers/net/Config.in
drivers/net/Config.in
+3
-3
drivers/scsi/imm.c
drivers/scsi/imm.c
+1
-8
drivers/video/fbmem.c
drivers/video/fbmem.c
+5
-0
fs/partitions/msdos.c
fs/partitions/msdos.c
+1
-0
include/asm-alpha/keyboard.h
include/asm-alpha/keyboard.h
+25
-0
include/asm-alpha/uaccess.h
include/asm-alpha/uaccess.h
+9
-0
include/linux/fb.h
include/linux/fb.h
+1
-0
include/linux/ide.h
include/linux/ide.h
+14
-20
include/linux/sched.h
include/linux/sched.h
+1
-1
include/linux/tty.h
include/linux/tty.h
+1
-0
kernel/fork.c
kernel/fork.c
+10
-5
No files found.
Documentation/fb/framebuffer.txt
View file @
90ff4d27
...
...
@@ -2,7 +2,7 @@
-----------------------
Maintained by Geert Uytterhoeven <geert@linux-m68k.org>
Last revised:
November 7, 1998
Last revised:
October 7, 1999
0. Introduction
...
...
@@ -304,7 +304,20 @@ applications, please refer to the following documentation:
o linux/include/video/
8. Downloading
8. Mailing list
---------------
There's a _development_ mailing list at linux-fbdev@vuser.vu.union.edu,
controlled by majordomo. Send an email with `help' in the message body to
majordomo@vuser.vu.union.edu for subscription information.
The mailing list is archived at
http://www.mail-archive.com/linux-fbdev@vuser.vu.union.edu/
9. Downloading
--------------
All necessary files can be found at
...
...
@@ -313,8 +326,12 @@ All necessary files can be found at
and on its mirrors.
The latest version of fbset can be found at
http://www.cs.kuleuven.ac.be/~geert/bin/
9
. Credits
10
. Credits
----------
This readme was written by Geert Uytterhoeven, partly based on the original
...
...
arch/i386/boot/Makefile
View file @
90ff4d27
...
...
@@ -8,9 +8,6 @@
# Copyright (C) 1994 by Linus Torvalds
#
AS86
=
$(CROSS_COMPILE)
as86
-0
-a
LD86
=
$(CROSS_COMPILE)
ld86
-0
BOOT_INCL
=
$(TOPDIR)
/include/linux/config.h
\
$(TOPDIR)
/include/linux/autoconf.h
\
$(TOPDIR)
/include/asm/boot.h
...
...
@@ -45,40 +42,40 @@ install: $(CONFIGURE) $(BOOTIMAGE)
tools/build
:
tools/build.c
$(HOSTCC)
$(HOSTCFLAGS)
-o
$@
$<
-I
$(TOPDIR)
/include
setup
:
setup
.o
$(LD
86)
-s
-o
$@
$<
bootsect
:
bootsect
.o
$(LD
)
-Ttext
0x0
-s
-oformat
binary
-o
$@
$<
setup.o
:
setup
.s
$(AS
86
)
-o
$@
$<
bootsect.o
:
bootsect
.s
$(AS)
-o
$@
$<
setup.s
:
setup.S video.S Makefile $(BOOT_INCL) $(TOPDIR)/include/linux/version.h $(TOPDIR)/include/linux/compile.h
bootsect.s
:
bootsect.S Makefile $(BOOT_INCL)
$(CPP)
-traditional
$(SVGA_MODE)
$(RAMDISK)
$<
-o
$@
b
setup
:
bsetup.o
$(LD
86)
-s
-o
$@
$<
b
bootsect
:
bbootsect.o bsetup
$(LD
)
-Ttext
0x0
-s
-oformat
binary
$<
-R
bsetup.o
-o
$@
b
setup.o
:
bsetup
.s
$(AS
86
)
-o
$@
$<
b
bootsect.o
:
bbootsect
.s
$(AS)
-o
$@
$<
b
setup.s
:
setup.S video.S Makefile $(BOOT_INCL) $(TOPDIR)/include/linux/version.h $(TOPDIR)/include/linux/compile.h
b
bootsect.s
:
bootsect.S Makefile $(BOOT_INCL)
$(CPP)
-D__BIG_KERNEL__
-traditional
$(SVGA_MODE)
$(RAMDISK)
$<
-o
$@
bootsect
:
bootsect
.o
$(LD
86)
-s
-o
$@
$<
setup
:
setup
.o
$(LD
)
-Ttext
0x0
-s
-oformat
binary
-e
begtext
-o
$@
$<
bootsect.o
:
bootsect
.s
$(AS
86
)
-o
$@
$<
setup.o
:
setup
.s
$(AS)
-o
$@
$<
bootsect.s
:
bootsect.S Makefile $(BOOT_INCL)
setup.s
:
setup.S video.S Makefile $(BOOT_INCL) $(TOPDIR)/include/linux/version.h $(TOPDIR)/include/linux/compile.h
$(CPP)
-traditional
$(SVGA_MODE)
$(RAMDISK)
$<
-o
$@
b
bootsect
:
bbootsect
.o
$(LD
86)
-s
-o
$@
$<
b
setup
:
bsetup
.o
$(LD
)
-Ttext
0x0
-s
-oformat
binary
-e
begtext
-o
$@
$<
b
bootsect.o
:
bbootsect
.s
$(AS
86
)
-o
$@
$<
b
setup.o
:
bsetup
.s
$(AS)
-o
$@
$<
b
bootsect.s
:
bootsect.S Makefile $(BOOT_INCL)
b
setup.s
:
setup.S video.S Makefile $(BOOT_INCL) $(TOPDIR)/include/linux/version.h $(TOPDIR)/include/linux/compile.h
$(CPP)
-D__BIG_KERNEL__
-traditional
$(SVGA_MODE)
$(RAMDISK)
$<
-o
$@
dep
:
...
...
arch/i386/boot/bootsect.S
View file @
90ff4d27
This diff is collapsed.
Click to expand it.
arch/i386/boot/compressed/Makefile
View file @
90ff4d27
...
...
@@ -39,7 +39,7 @@ piggy.o: $(SYSTEM)
$(OBJCOPY)
$(SYSTEM)
$$
tmppiggy
;
\
gzip
-f
-9
<
$$
tmppiggy
>
$$
tmppiggy.gz
;
\
echo
"SECTIONS { .data : { input_len = .; LONG(input_data_end - input_data) input_data = .; *(.data) input_data_end = .; }}"
>
$$
tmppiggy.lnk
;
\
$(LD)
-
m
elf_i386
-
r
-o
piggy.o
-b
binary
$$
tmppiggy.gz
-b
elf32-i386
-T
$$
tmppiggy.lnk
;
\
$(LD)
-r
-o
piggy.o
-b
binary
$$
tmppiggy.gz
-b
elf32-i386
-T
$$
tmppiggy.lnk
;
\
rm
-f
$$
tmppiggy
$$
tmppiggy.gz
$$
tmppiggy.lnk
clean
:
...
...
arch/i386/boot/setup.S
View file @
90ff4d27
This diff is collapsed.
Click to expand it.
arch/i386/boot/tools/build.c
View file @
90ff4d27
...
...
@@ -58,27 +58,10 @@ void die(const char * str, ...)
exit
(
1
);
}
/* Reading of ld86 output (Minix format) */
#define MINIX_HEADER_LEN 32
void
minix_open
(
const
char
*
name
)
void
file_open
(
const
char
*
name
)
{
static
byte
hdr
[]
=
{
0x01
,
0x03
,
0x10
,
0x04
,
0x20
,
0x00
,
0x00
,
0x00
};
static
u32
*
lb
=
(
u32
*
)
buf
;
if
((
fd
=
open
(
name
,
O_RDONLY
,
0
))
<
0
)
die
(
"Unable to open `%s': %m"
,
name
);
if
(
read
(
fd
,
buf
,
MINIX_HEADER_LEN
)
!=
MINIX_HEADER_LEN
)
die
(
"%s: Unable to read header"
,
name
);
if
(
memcmp
(
buf
,
hdr
,
sizeof
(
hdr
))
||
lb
[
5
])
die
(
"%s: Non-Minix header"
,
name
);
if
(
lb
[
3
])
die
(
"%s: Illegal data segment"
);
if
(
lb
[
4
])
die
(
"%s: Illegal bss segment"
);
if
(
lb
[
7
])
die
(
"%s: Illegal symbol table"
);
}
void
usage
(
void
)
...
...
@@ -125,7 +108,7 @@ int main(int argc, char ** argv)
}
fprintf
(
stderr
,
"Root device is (%d, %d)
\n
"
,
major_root
,
minor_root
);
minix_open
(
argv
[
1
]);
/* Copy the boot sector */
file_open
(
argv
[
1
]);
i
=
read
(
fd
,
buf
,
sizeof
(
buf
));
fprintf
(
stderr
,
"Boot sector %d bytes.
\n
"
,
i
);
if
(
i
!=
512
)
...
...
@@ -138,7 +121,7 @@ int main(int argc, char ** argv)
die
(
"Write call failed"
);
close
(
fd
);
minix
_open
(
argv
[
2
]);
/* Copy the setup code */
file
_open
(
argv
[
2
]);
/* Copy the setup code */
for
(
i
=
0
;
(
c
=
read
(
fd
,
buf
,
sizeof
(
buf
)))
>
0
;
i
+=
c
)
if
(
write
(
1
,
buf
,
c
)
!=
c
)
die
(
"Write call failed"
);
...
...
@@ -146,8 +129,8 @@ int main(int argc, char ** argv)
die
(
"read-error on `setup'"
);
close
(
fd
);
setup_sectors
=
(
i
+
511
)
/
512
;
/* Pad unused space with zeros */
/* for compatibility with ancient versions of LILO */
setup_sectors
=
(
i
+
511
)
/
512
;
/* Pad unused space with zeros */
/* for compatibility with ancient versions of LILO
.
*/
if
(
setup_sectors
<
SETUP_SECTS
)
setup_sectors
=
SETUP_SECTS
;
fprintf
(
stderr
,
"Setup is %d bytes.
\n
"
,
i
);
...
...
@@ -161,8 +144,7 @@ int main(int argc, char ** argv)
i
+=
c
;
}
if
((
fd
=
open
(
argv
[
3
],
O_RDONLY
,
0
))
<
0
)
/* Copy the image itself */
die
(
"Unable to open `%s': %m"
,
argv
[
3
]);
file_open
(
argv
[
3
]);
if
(
fstat
(
fd
,
&
sb
))
die
(
"Unable to stat `%s': %m"
,
argv
[
3
]);
sz
=
sb
.
st_size
;
...
...
@@ -187,7 +169,7 @@ int main(int argc, char ** argv)
}
close
(
fd
);
if
(
lseek
(
1
,
497
,
SEEK_SET
)
!=
497
)
/* Write sizes to the boot
sector */
if
(
lseek
(
1
,
497
,
SEEK_SET
)
!=
497
)
/* Write sizes to the bootsector */
die
(
"Output: seek failed"
);
buf
[
0
]
=
setup_sectors
;
if
(
write
(
1
,
buf
,
1
)
!=
1
)
...
...
arch/i386/boot/video.S
View file @
90ff4d27
This diff is collapsed.
Click to expand it.
arch/i386/defconfig
View file @
90ff4d27
...
...
@@ -242,6 +242,52 @@ CONFIG_DUMMY=m
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_LANCE is not set
# CONFIG_NET_VENDOR_SMC is not set
# CONFIG_NET_VENDOR_RACAL is not set
# CONFIG_DEPCA is not set
# CONFIG_NET_ISA is not set
CONFIG_NET_EISA=y
# CONFIG_PCNET32 is not set
# CONFIG_ACENIC is not set
# CONFIG_APRICOT is not set
# CONFIG_CS89x0 is not set
# CONFIG_DE4X5 is not set
# CONFIG_DEC_ELCP is not set
# CONFIG_DGRS is not set
CONFIG_EEXPRESS_PRO100=y
# CONFIG_NE2K_PCI is not set
# CONFIG_TLAN is not set
# CONFIG_VIA_RHINE is not set
# CONFIG_NET_POCKET is not set
# CONFIG_FDDI is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
#
# Wireless LAN (non-hamradio)
#
# CONFIG_NET_RADIO is not set
#
# Token Ring driver support
#
# CONFIG_TR is not set
# CONFIG_NET_FC is not set
#
# Wan interfaces
#
# CONFIG_WAN is not set
#
# PCMCIA network devices
#
CONFIG_PCMCIA_PCNET=y
# CONFIG_PCMCIA_3C589 is not set
CONFIG_PCMCIA_RAYCS=y
CONFIG_PCMCIA_NETCARD=y
#
# Amateur Radio support
...
...
drivers/char/qpmouse.c
View file @
90ff4d27
...
...
@@ -42,7 +42,7 @@
#include <asm/system.h>
#include <asm/semaphore.h>
#include
"pc_keyb.h"
/* mouse enable command.. */
#include
<linux/pc_keyb.h>
/* mouse enable command.. */
/*
...
...
@@ -134,7 +134,7 @@ static void qp_interrupt(int cpl, void *dev_id, struct pt_regs * regs)
}
queue
->
head
=
head
;
if
(
queue
->
fasync
)
kill_fasync
(
queue
->
fasync
,
SIGIO
);
kill_fasync
(
queue
->
fasync
,
SIGIO
,
POLL_IN
);
wake_up_interruptible
(
&
queue
->
proc_list
);
}
...
...
drivers/net/Config.in
View file @
90ff4d27
...
...
@@ -130,9 +130,9 @@ if [ "$CONFIG_NET_ETHERNET" = "y" ]; then
bool ' EISA, VLB, PCI and on board controllers' CONFIG_NET_EISA
if [ "$CONFIG_NET_EISA" = "y" ]; then
tristate ' AMD PCnet32 (VLB and PCI) support' CONFIG_PCNET32
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
#
tristate ' Adaptec Starfire support (EXPERIMENTAL)' CONFIG_ADAPTEC_STARFIRE
fi
#
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
#
tristate ' Adaptec Starfire support (EXPERIMENTAL)' CONFIG_ADAPTEC_STARFIRE
#
fi
tristate ' Alteon AceNIC/3Com 3C985/NetGear GA620 Gigabit support' CONFIG_ACENIC
if [ "$CONFIG_ACENIC" != "n" ]; then
bool ' Omit support for old Tigon I based AceNICs' CONFIG_ACENIC_OMIT_TIGON_I
...
...
drivers/scsi/imm.c
View file @
90ff4d27
...
...
@@ -166,16 +166,9 @@ int imm_detect(Scsi_Host_Template * host)
*/
imm_hosts
[
i
].
mode
=
IMM_NIBBLE
;
if
(
modes
&
PARPORT_MODE_
PCPS2
)
if
(
modes
&
PARPORT_MODE_
TRISTATE
)
imm_hosts
[
i
].
mode
=
IMM_PS2
;
if
(
modes
&
PARPORT_MODE_PCECPPS2
)
{
w_ecr
(
ppb
,
0x20
);
imm_hosts
[
i
].
mode
=
IMM_PS2
;
}
if
(
modes
&
PARPORT_MODE_PCECPEPP
)
w_ecr
(
ppb
,
0x80
);
/* Done configuration */
imm_pb_release
(
i
);
...
...
drivers/video/fbmem.c
View file @
90ff4d27
...
...
@@ -459,6 +459,11 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
for
(
i
=
0
;
i
<
MAX_NR_CONSOLES
;
i
++
)
set_con2fb_map
(
i
,
con2fb
.
framebuffer
);
return
0
;
case
FBIOBLANK
:
if
(
info
->
blank
==
0
)
return
-
EINVAL
;
(
*
info
->
blank
)(
arg
,
info
);
return
0
;
default:
return
fb
->
fb_ioctl
(
inode
,
file
,
cmd
,
arg
,
PROC_CONSOLE
(
info
),
info
);
...
...
fs/partitions/msdos.c
View file @
90ff4d27
...
...
@@ -26,6 +26,7 @@
#include <linux/major.h>
#include <linux/string.h>
#include <linux/blk.h>
#include <linux/ide.h>
/* IDE xlate */
#include <asm/system.h>
...
...
include/asm-alpha/keyboard.h
View file @
90ff4d27
...
...
@@ -37,6 +37,31 @@ extern unsigned char pckbd_sysrq_xlate[128];
#define SYSRQ_KEY 0x54
/* resource allocation */
#define kbd_request_region()
#define kbd_request_irq(handler) request_irq(KEYBOARD_IRQ, handler, 0, \
"keyboard", NULL)
/* How to access the keyboard macros on this platform. */
#define kbd_read_input() inb(KBD_DATA_REG)
#define kbd_read_status() inb(KBD_STATUS_REG)
#define kbd_write_output(val) outb(val, KBD_DATA_REG)
#define kbd_write_command(val) outb(val, KBD_CNTL_REG)
/* Some stoneage hardware needs delays after some operations. */
#define kbd_pause() do { } while(0)
/*
* Machine specific bits for the PS/2 driver
*/
#define AUX_IRQ 12
#define aux_request_irq(hand, dev_id) \
request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS/2 Mouse", dev_id)
#define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id)
#endif
/* __KERNEL__ */
#endif
/* __ASMalpha_KEYBOARD_H */
include/asm-alpha/uaccess.h
View file @
90ff4d27
...
...
@@ -487,6 +487,15 @@ extern inline long strlen_user(const char *str)
return
access_ok
(
VERIFY_READ
,
str
,
0
)
?
__strlen_user
(
str
)
:
0
;
}
/* Returns: 0 if exception before NUL or reaching the supplied limit (N),
* a value greater than N if the limit would be exceeded, else strlen. */
extern
long
__strnlen_user
(
const
char
*
,
long
);
extern
inline
long
strnlen_user
(
const
char
*
str
,
long
n
)
{
return
access_ok
(
VERIFY_READ
,
str
,
0
)
?
__strnlen_user
(
str
,
n
)
:
0
;
}
/*
* About the exception table:
*
...
...
include/linux/fb.h
View file @
90ff4d27
...
...
@@ -26,6 +26,7 @@
/* #define FBIOSWITCH_MONIBIT 0x460E */
#define FBIOGET_CON2FBMAP 0x460F
#define FBIOPUT_CON2FBMAP 0x4610
#define FBIOBLANK 0x4611
/* arg: 0 or vesa level + 1 */
#define FB_TYPE_PACKED_PIXELS 0
/* Packed Pixels */
#define FB_TYPE_PLANES 1
/* Non interleaved planes */
...
...
include/linux/ide.h
View file @
90ff4d27
...
...
@@ -46,9 +46,6 @@
#ifndef OK_TO_RESET_CONTROLLER
/* 1 needed for good error recovery */
#define OK_TO_RESET_CONTROLLER 1
/* 0 for use with AH2372A/B interface */
#endif
#ifndef FAKE_FDISK_FOR_EZDRIVE
/* 1 to help linux fdisk with EZDRIVE */
#define FAKE_FDISK_FOR_EZDRIVE 1
/* 0 to reduce kernel size */
#endif
#ifndef FANCY_STATUS_DUMPS
/* 1 for human-readable drive errors */
#define FANCY_STATUS_DUMPS 1
/* 0 to reduce kernel size */
#endif
...
...
@@ -262,9 +259,7 @@ typedef struct ide_drive_s {
unsigned
nice2
:
1
;
/* flag: give a share in our own bandwidth */
unsigned
doorlocking
:
1
;
/* flag: for removable only: door lock/unlock works */
unsigned
autotune
:
2
;
/* 1=autotune, 2=noautotune, 0=default */
#if FAKE_FDISK_FOR_EZDRIVE
unsigned
remap_0_to_1
:
1
;
/* flag: partitioned with ezdrive */
#endif
/* FAKE_FDISK_FOR_EZDRIVE */
unsigned
remap_0_to_1
:
2
;
/* 0=remap if ezdrive, 1=remap, 2=noremap */
unsigned
ata_flash
:
1
;
/* 1=present, 0=default */
byte
media
;
/* disk, cdrom, tape, floppy, ... */
select_t
select
;
/* basic drive/head select reg value */
...
...
@@ -282,8 +277,9 @@ typedef struct ide_drive_s {
byte
sect
;
/* "real" sectors per track */
byte
bios_head
;
/* BIOS/fdisk/LILO number of heads */
byte
bios_sect
;
/* BIOS/fdisk/LILO sectors per track */
unsigned
short
bios_cyl
;
/* BIOS/fdisk/LILO number of cyls */
unsigned
short
cyl
;
/* "real" number of cyls */
unsigned
int
bios_cyl
;
/* BIOS/fdisk/LILO number of cyls */
unsigned
int
cyl
;
/* "real" number of cyls */
unsigned
long
capacity
;
/* total number of sectors */
unsigned
int
drive_data
;
/* for use by tuneproc/selectproc as needed */
void
*
hwif
;
/* actually (ide_hwif_t *) */
wait_queue_head_t
wqueue
;
/* used to wait for drive in open() */
...
...
@@ -624,21 +620,19 @@ int ide_wait_stat (ide_drive_t *drive, byte good, byte bad, unsigned long timeou
/*
* This routine is called from the partition-table code in genhd.c
* to "convert" a drive to a logical geometry with fewer than 1024 cyls.
*
* The second parameter, "xparm", determines exactly how the translation
* will be handled:
* 0 = convert to CHS with fewer than 1024 cyls
* using the same method as Ontrack DiskManager.
* 1 = same as "0", plus offset everything by 63 sectors.
* -1 = similar to "0", plus redirect sector 0 to sector 1.
* >1 = convert to a CHS geometry with "xparm" heads.
*
* Returns 0 if the translation was not possible, if the device was not
* an IDE disk drive, or if a geometry was "forced" on the commandline.
* Returns 1 if the geometry translation was successful.
*/
int
ide_xlate_1024
(
kdev_t
,
int
,
int
,
const
char
*
);
/*
* Convert kdev_t structure into ide_drive_t * one.
*/
ide_drive_t
*
get_info_ptr
(
kdev_t
i_rdev
);
/*
* Return the current idea about the total capacity of this drive.
*/
unsigned
long
current_capacity
(
ide_drive_t
*
drive
);
/*
* Start a reset operation for an IDE interface.
* The caller should return immediately after invoking this.
...
...
include/linux/sched.h
View file @
90ff4d27
...
...
@@ -823,8 +823,8 @@ extern inline int task_on_runqueue(struct task_struct *p)
extern
inline
void
unhash_process
(
struct
task_struct
*
p
)
{
if
(
task_on_runqueue
(
p
))
BUG
();
nr_threads
--
;
write_lock_irq
(
&
tasklist_lock
);
nr_threads
--
;
unhash_pid
(
p
);
REMOVE_LINKS
(
p
);
write_unlock_irq
(
&
tasklist_lock
);
...
...
include/linux/tty.h
View file @
90ff4d27
...
...
@@ -326,6 +326,7 @@ struct tty_struct {
#define TTY_HW_COOK_OUT 14
#define TTY_HW_COOK_IN 15
#define TTY_PTY_LOCK 16
#define TTY_NO_WRITE_SPLIT 17
#define TTY_WRITE_FLUSH(tty) tty_write_flush((tty))
...
...
kernel/fork.c
View file @
90ff4d27
...
...
@@ -592,6 +592,12 @@ int do_fork(unsigned long clone_flags, unsigned long usp, struct pt_regs *regs)
struct
task_struct
*
p
;
DECLARE_MUTEX_LOCKED
(
sem
);
if
(
clone_flags
&
CLONE_PID
)
{
/* This is only allowed from the boot up thread */
if
(
current
->
pid
)
return
-
EPERM
;
}
current
->
vfork_sem
=
&
sem
;
p
=
alloc_task_struct
();
...
...
@@ -610,8 +616,9 @@ int do_fork(unsigned long clone_flags, unsigned long usp, struct pt_regs *regs)
}
/*
* Counter atomicity is protected by
* the kernel lock
* Counter increases are protected by
* the kernel lock so nr_threads can't
* increase under us (but it may decrease).
*/
if
(
nr_threads
>=
max_threads
)
goto
bad_fork_cleanup_count
;
...
...
@@ -711,9 +718,9 @@ int do_fork(unsigned long clone_flags, unsigned long usp, struct pt_regs *regs)
write_lock_irq
(
&
tasklist_lock
);
SET_LINKS
(
p
);
hash_pid
(
p
);
nr_threads
++
;
write_unlock_irq
(
&
tasklist_lock
);
nr_threads
++
;
wake_up_process
(
p
);
/* do this last */
++
total_forks
;
...
...
@@ -735,8 +742,6 @@ int do_fork(unsigned long clone_flags, unsigned long usp, struct pt_regs *regs)
__MOD_DEC_USE_COUNT
(
p
->
exec_domain
->
module
);
if
(
p
->
binfmt
&&
p
->
binfmt
->
module
)
__MOD_DEC_USE_COUNT
(
p
->
binfmt
->
module
);
nr_threads
--
;
bad_fork_cleanup_count:
if
(
p
->
user
)
free_uid
(
p
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment