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
nexedi
linux
Commits
a7df4a00
Commit
a7df4a00
authored
Sep 07, 2002
by
Paul Mackerras
Committed by
Paul Mackerras
Sep 07, 2002
Browse files
Options
Browse Files
Download
Plain Diff
Merge au1.ibm.com:/home/paulus/kernel/linux-2.5
into au1.ibm.com:/home/paulus/kernel/for-linus-ppc
parents
e30b4514
c9581bb6
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
41 additions
and
71 deletions
+41
-71
arch/i386/Makefile
arch/i386/Makefile
+2
-2
arch/i386/vmlinux.lds.S
arch/i386/vmlinux.lds.S
+0
-0
drivers/i2c/i2c-proc.c
drivers/i2c/i2c-proc.c
+0
-46
drivers/ide/ide-floppy.c
drivers/ide/ide-floppy.c
+1
-1
drivers/ide/ide.c
drivers/ide/ide.c
+1
-1
include/linux/fs.h
include/linux/fs.h
+1
-1
include/linux/sched.h
include/linux/sched.h
+1
-1
include/linux/sysctl.h
include/linux/sysctl.h
+1
-0
include/linux/threads.h
include/linux/threads.h
+1
-2
kernel/exit.c
kernel/exit.c
+9
-2
kernel/fork.c
kernel/fork.c
+20
-14
kernel/ptrace.c
kernel/ptrace.c
+1
-1
kernel/sysctl.c
kernel/sysctl.c
+3
-0
No files found.
arch/i386/Makefile
View file @
a7df4a00
...
...
@@ -18,7 +18,7 @@
LDFLAGS
:=
-m
elf_i386
OBJCOPYFLAGS
:=
-O
binary
-R
.note
-R
.comment
-S
LDFLAGS_vmlinux
:=
-T
arch
/i386/vmlinux.lds
-e
stext
LDFLAGS_vmlinux
:=
-T
arch
/i386/vmlinux.lds
.s
-e
stext
CFLAGS
+=
-pipe
...
...
@@ -104,7 +104,7 @@ endif
MAKEBOOT
=
+
$(MAKE)
-C
arch
/
$(ARCH)
/boot
vmlinux
:
arch/i386/vmlinux.lds
vmlinux
:
arch/i386/vmlinux.lds
.s
.PHONY
:
zImage bzImage compressed zlilo bzlilo zdisk bzdisk install
\
clean archclean archmrproper
...
...
arch/i386/vmlinux.lds
→
arch/i386/vmlinux.lds
.S
View file @
a7df4a00
File moved
drivers/i2c/i2c-proc.c
View file @
a7df4a00
...
...
@@ -60,7 +60,6 @@ int __init sensors_init(void);
static
struct
ctl_table_header
*
i2c_entries
[
SENSORS_ENTRY_MAX
];
static
struct
i2c_client
*
i2c_clients
[
SENSORS_ENTRY_MAX
];
static
unsigned
short
i2c_inodes
[
SENSORS_ENTRY_MAX
];
static
ctl_table
sysctl_table
[]
=
{
{
CTL_DEV
,
"dev"
,
NULL
,
0
,
0555
},
...
...
@@ -189,8 +188,6 @@ int i2c_register_entry(struct i2c_client *client, const char *prefix,
return
id
;
}
#endif
/* DEBUG */
i2c_inodes
[
id
-
256
]
=
new_header
->
ctl_table
->
child
->
child
->
de
->
low_ino
;
new_header
->
ctl_table
->
child
->
child
->
de
->
owner
=
controlling_mod
;
return
id
;
...
...
@@ -213,49 +210,6 @@ void i2c_deregister_entry(int id)
}
}
/* Monitor access for /proc/sys/dev/sensors; make unloading i2c-proc.o
impossible if some process still uses it or some file in it */
void
i2c_fill_inode
(
struct
inode
*
inode
,
int
fill
)
{
if
(
fill
)
MOD_INC_USE_COUNT
;
else
MOD_DEC_USE_COUNT
;
}
/* Monitor access for /proc/sys/dev/sensors/ directories; make unloading
the corresponding module impossible if some process still uses it or
some file in it */
void
i2c_dir_fill_inode
(
struct
inode
*
inode
,
int
fill
)
{
int
i
;
struct
i2c_client
*
client
;
#ifdef DEBUG
if
(
!
inode
)
{
printk
(
KERN_ERR
"i2c-proc.o: Warning: inode NULL in fill_inode()
\n
"
);
return
;
}
#endif
/* def DEBUG */
for
(
i
=
0
;
i
<
SENSORS_ENTRY_MAX
;
i
++
)
if
(
i2c_clients
[
i
]
&&
(
i2c_inodes
[
i
]
==
inode
->
i_ino
))
break
;
#ifdef DEBUG
if
(
i
==
SENSORS_ENTRY_MAX
)
{
printk
(
KERN_ERR
"i2c-proc.o: Warning: inode (%ld) not found in fill_inode()
\n
"
,
inode
->
i_ino
);
return
;
}
#endif
/* def DEBUG */
client
=
i2c_clients
[
i
];
if
(
fill
)
client
->
driver
->
inc_use
(
client
);
else
client
->
driver
->
dec_use
(
client
);
}
int
i2c_proc_chips
(
ctl_table
*
ctl
,
int
write
,
struct
file
*
filp
,
void
*
buffer
,
size_t
*
lenp
)
{
...
...
drivers/ide/ide-floppy.c
View file @
a7df4a00
...
...
@@ -1817,7 +1817,7 @@ static int idefloppy_ioctl (ide_drive_t *drive, struct inode *inode, struct file
return
(
idefloppy_get_format_progress
(
drive
,
inode
,
file
,
(
int
*
)
arg
));
}
return
-
EI
O
;
return
-
EI
NVAL
;
}
/*
...
...
drivers/ide/ide.c
View file @
a7df4a00
...
...
@@ -3347,7 +3347,7 @@ static ide_startstop_t default_error (ide_drive_t *drive, const char *msg, byte
static
int
default_ioctl
(
ide_drive_t
*
drive
,
struct
inode
*
inode
,
struct
file
*
file
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
return
-
EI
O
;
return
-
EI
NVAL
;
}
static
int
default_open
(
struct
inode
*
inode
,
struct
file
*
filp
,
ide_drive_t
*
drive
)
...
...
include/linux/fs.h
View file @
a7df4a00
...
...
@@ -368,7 +368,7 @@ struct inode {
atomic_t
i_count
;
dev_t
i_dev
;
umode_t
i_mode
;
nlink_t
i_nlink
;
unsigned
int
i_nlink
;
uid_t
i_uid
;
gid_t
i_gid
;
kdev_t
i_rdev
;
...
...
include/linux/sched.h
View file @
a7df4a00
...
...
@@ -455,7 +455,7 @@ extern struct task_struct init_task;
extern
struct
mm_struct
init_mm
;
/* PID hashing. (shouldnt this be dynamic?) */
#define PIDHASH_SZ
(4096 >> 2)
#define PIDHASH_SZ
8192
extern
struct
task_struct
*
pidhash
[
PIDHASH_SZ
];
#define pid_hashfn(x) ((((x) >> 8) ^ (x)) & (PIDHASH_SZ - 1))
...
...
include/linux/sysctl.h
View file @
a7df4a00
...
...
@@ -127,6 +127,7 @@ enum
KERN_CORE_USES_PID
=
52
,
/* int: use core or core.%pid */
KERN_TAINTED
=
53
,
/* int: various kernel tainted flags */
KERN_CADPID
=
54
,
/* int: PID of the process to notify on CAD */
KERN_PIDMAX
=
55
,
/* int: PID # limit */
};
...
...
include/linux/threads.h
View file @
a7df4a00
...
...
@@ -19,7 +19,6 @@
/*
* This controls the maximum pid allocated to a process
*/
#define PID_MASK 0x3fffffff
#define PID_MAX (PID_MASK+1)
#define DEFAULT_PID_MAX 0x8000
#endif
kernel/exit.c
View file @
a7df4a00
...
...
@@ -66,7 +66,8 @@ static void release_task(struct task_struct * p)
atomic_dec
(
&
p
->
user
->
processes
);
security_ops
->
task_free_security
(
p
);
free_uid
(
p
->
user
);
BUG_ON
(
!
list_empty
(
&
p
->
ptrace_list
)
||
!
list_empty
(
&
p
->
ptrace_children
));
BUG_ON
(
p
->
ptrace
||
!
list_empty
(
&
p
->
ptrace_list
)
||
!
list_empty
(
&
p
->
ptrace_children
));
unhash_process
(
p
);
release_thread
(
p
);
...
...
@@ -718,8 +719,14 @@ asmlinkage long sys_wait4(pid_t pid,unsigned int * stat_addr, int options, struc
ptrace_unlink
(
p
);
do_notify_parent
(
p
,
SIGCHLD
);
write_unlock_irq
(
&
tasklist_lock
);
}
else
}
else
{
if
(
p
->
ptrace
)
{
write_lock_irq
(
&
tasklist_lock
);
ptrace_unlink
(
p
);
write_unlock_irq
(
&
tasklist_lock
);
}
release_task
(
p
);
}
goto
end_wait4
;
default:
continue
;
...
...
kernel/fork.c
View file @
a7df4a00
...
...
@@ -46,6 +46,14 @@ int nr_threads;
int
max_threads
;
unsigned
long
total_forks
;
/* Handle normal Linux uptimes. */
/*
* Protects next_safe, last_pid and pid_max:
*/
spinlock_t
lastpid_lock
=
SPIN_LOCK_UNLOCKED
;
static
int
next_safe
=
DEFAULT_PID_MAX
;
int
pid_max
=
DEFAULT_PID_MAX
;
int
last_pid
;
struct
task_struct
*
pidhash
[
PIDHASH_SZ
];
...
...
@@ -151,11 +159,8 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
return
tsk
;
}
spinlock_t
lastpid_lock
=
SPIN_LOCK_UNLOCKED
;
static
int
get_pid
(
unsigned
long
flags
)
{
static
int
next_safe
=
PID_MAX
;
struct
task_struct
*
p
;
int
pid
;
...
...
@@ -163,34 +168,35 @@ static int get_pid(unsigned long flags)
return
0
;
spin_lock
(
&
lastpid_lock
);
if
((
++
last_pid
)
&
~
PID_MASK
)
{
if
(
++
last_pid
>
pid_max
)
{
last_pid
=
300
;
/* Skip daemons etc. */
goto
inside
;
}
if
(
last_pid
>=
next_safe
)
{
if
(
last_pid
>=
next_safe
)
{
inside:
next_safe
=
PID_MAX
;
next_safe
=
pid_max
;
read_lock
(
&
tasklist_lock
);
repeat:
for_each_task
(
p
)
{
if
(
p
->
pid
==
last_pid
||
if
(
p
->
pid
==
last_pid
||
p
->
pgrp
==
last_pid
||
p
->
tgid
==
last_pid
||
p
->
session
==
last_pid
)
{
if
(
++
last_pid
>=
next_safe
)
{
if
(
last_pid
&
~
PID_MASK
)
if
(
++
last_pid
>=
next_safe
)
{
if
(
last_pid
>=
pid_max
)
last_pid
=
300
;
next_safe
=
PID_MAX
;
next_safe
=
pid_max
;
}
goto
repeat
;
}
if
(
p
->
pid
>
last_pid
&&
next_safe
>
p
->
pid
)
if
(
p
->
pid
>
last_pid
&&
next_safe
>
p
->
pid
)
next_safe
=
p
->
pid
;
if
(
p
->
pgrp
>
last_pid
&&
next_safe
>
p
->
pgrp
)
if
(
p
->
pgrp
>
last_pid
&&
next_safe
>
p
->
pgrp
)
next_safe
=
p
->
pgrp
;
if
(
p
->
tgid
>
last_pid
&&
next_safe
>
p
->
tgid
)
if
(
p
->
tgid
>
last_pid
&&
next_safe
>
p
->
tgid
)
next_safe
=
p
->
tgid
;
if
(
p
->
session
>
last_pid
&&
next_safe
>
p
->
session
)
if
(
p
->
session
>
last_pid
&&
next_safe
>
p
->
session
)
next_safe
=
p
->
session
;
}
read_unlock
(
&
tasklist_lock
);
...
...
kernel/ptrace.c
View file @
a7df4a00
...
...
@@ -29,7 +29,7 @@ void __ptrace_link(task_t *child, task_t *new_parent)
if
(
!
list_empty
(
&
child
->
ptrace_list
))
BUG
();
if
(
child
->
parent
==
new_parent
)
BUG
()
;
return
;
list_add
(
&
child
->
ptrace_list
,
&
child
->
parent
->
ptrace_children
);
REMOVE_LINKS
(
child
);
child
->
parent
=
new_parent
;
...
...
kernel/sysctl.c
View file @
a7df4a00
...
...
@@ -51,6 +51,7 @@ extern int max_queued_signals;
extern
int
sysrq_enabled
;
extern
int
core_uses_pid
;
extern
int
cad_pid
;
extern
int
pid_max
;
/* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */
static
int
maxolduid
=
65535
;
...
...
@@ -255,6 +256,8 @@ static ctl_table kern_table[] = {
{
KERN_S390_USER_DEBUG_LOGGING
,
"userprocess_debug"
,
&
sysctl_userprocess_debug
,
sizeof
(
int
),
0644
,
NULL
,
&
proc_dointvec
},
#endif
{
KERN_PIDMAX
,
"pid_max"
,
&
pid_max
,
sizeof
(
int
),
0600
,
NULL
,
&
proc_dointvec
},
{
0
}
};
...
...
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