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
ac94a58a
Commit
ac94a58a
authored
Feb 18, 2003
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Plain Diff
Merge samba.org:/scratch/anton/linux-2.5
into samba.org:/scratch/anton/sfr
parents
06365c08
c290649e
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
116 additions
and
314 deletions
+116
-314
arch/i386/mach-voyager/voyager_thread.c
arch/i386/mach-voyager/voyager_thread.c
+4
-13
drivers/acpi/thermal.c
drivers/acpi/thermal.c
+1
-1
drivers/base/hotplug.c
drivers/base/hotplug.c
+1
-1
drivers/bluetooth/bt3c_cs.c
drivers/bluetooth/bt3c_cs.c
+7
-54
drivers/ieee1394/nodemgr.c
drivers/ieee1394/nodemgr.c
+1
-1
drivers/input/input.c
drivers/input/input.c
+1
-1
drivers/isdn/hardware/eicon/divasmain.c
drivers/isdn/hardware/eicon/divasmain.c
+1
-1
drivers/net/hamradio/baycom_epp.c
drivers/net/hamradio/baycom_epp.c
+6
-39
drivers/pnp/pnpbios/core.c
drivers/pnp/pnpbios/core.c
+1
-1
fs/proc/array.c
fs/proc/array.c
+9
-1
include/linux/kmod.h
include/linux/kmod.h
+2
-2
kernel/compat.c
kernel/compat.c
+3
-2
kernel/kmod.c
kernel/kmod.c
+77
-195
net/bluetooth/hci_core.c
net/bluetooth/hci_core.c
+1
-1
net/core/dev.c
net/core/dev.c
+1
-1
No files found.
arch/i386/mach-voyager/voyager_thread.c
View file @
ac94a58a
...
...
@@ -57,7 +57,7 @@ voyager_thread_start(void)
}
static
int
execute
_helper
(
void
*
string
)
execute
(
const
char
*
string
)
{
int
ret
;
...
...
@@ -74,22 +74,13 @@ execute_helper(void *string)
NULL
,
};
if
((
ret
=
exec_usermodehelper
(
argv
[
0
],
argv
,
envp
))
<
0
)
{
printk
(
KERN_ERR
"Voyager failed to
execute
\"
%s
\"
\n
"
,
(
char
*
)
string
);
if
((
ret
=
call_usermodehelper
(
argv
[
0
],
argv
,
envp
,
1
))
!=
0
)
{
printk
(
KERN_ERR
"Voyager failed to
run
\"
%s
\"
: %i
\n
"
,
string
,
ret
);
}
return
ret
;
}
static
void
execute
(
char
*
string
)
{
if
(
kernel_thread
(
execute_helper
,
(
void
*
)
string
,
CLONE_VFORK
|
SIGCHLD
)
<
0
)
{
printk
(
KERN_ERR
"Voyager failed to fork before exec of
\"
%s
\"\n
"
,
string
);
}
}
static
void
check_from_kernel
(
void
)
{
...
...
drivers/acpi/thermal.c
View file @
ac94a58a
...
...
@@ -436,7 +436,7 @@ acpi_thermal_call_usermode (
envp
[
0
]
=
"HOME=/"
;
envp
[
1
]
=
"PATH=/sbin:/bin:/usr/sbin:/usr/bin"
;
call_usermodehelper
(
argv
[
0
],
argv
,
envp
);
call_usermodehelper
(
argv
[
0
],
argv
,
envp
,
0
);
return_VALUE
(
0
);
}
...
...
drivers/base/hotplug.c
View file @
ac94a58a
...
...
@@ -114,7 +114,7 @@ static int do_hotplug (struct device *dev, char *argv1, const char *action,
pr_debug
(
"%s: %s %s %s %s %s %s
\n
"
,
__FUNCTION__
,
argv
[
0
],
argv
[
1
],
envp
[
0
],
envp
[
1
],
envp
[
2
],
envp
[
3
]);
retval
=
call_usermodehelper
(
argv
[
0
],
argv
,
envp
);
retval
=
call_usermodehelper
(
argv
[
0
],
argv
,
envp
,
0
);
if
(
retval
)
pr_debug
(
"%s - call_usermodehelper returned %d
\n
"
,
__FUNCTION__
,
retval
);
...
...
drivers/bluetooth/bt3c_cs.c
View file @
ac94a58a
...
...
@@ -24,18 +24,14 @@
#include <linux/config.h>
#include <linux/module.h>
#define __KERNEL_SYSCALLS__
#include <linux/kernel.h>
#include <linux/kmod.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/delay.h>
#include <linux/timer.h>
#include <linux/errno.h>
#include <linux/unistd.h>
#include <linux/ptrace.h>
#include <linux/ioport.h>
#include <linux/spinlock.h>
...
...
@@ -405,7 +401,6 @@ void bt3c_interrupt(int irq, void *dev_inst, struct pt_regs *regs)
/* ======================== HCI interface ======================== */
...
...
@@ -489,65 +484,23 @@ static int bt3c_hci_ioctl(struct hci_dev *hdev, unsigned int cmd, unsigned long
#define FW_LOADER "/sbin/bluefw"
static
int
errno
;
static
int
bt3c_fw_loader_exec
(
void
*
dev
)
{
char
*
argv
[]
=
{
FW_LOADER
,
"pccard"
,
dev
,
NULL
};
char
*
envp
[]
=
{
"HOME=/"
,
"TERM=linux"
,
"PATH=/sbin:/usr/sbin:/bin:/usr/bin"
,
NULL
};
int
err
;
err
=
exec_usermodehelper
(
FW_LOADER
,
argv
,
envp
);
if
(
err
)
printk
(
KERN_WARNING
"bt3c_cs: Failed to exec
\"
%s pccard %s
\"
.
\n
"
,
FW_LOADER
,
(
char
*
)
dev
);
return
err
;
}
static
int
bt3c_firmware_load
(
bt3c_info_t
*
info
)
{
sigset_t
tmpsig
;
char
dev
[
16
];
pid_t
pid
;
int
result
;
int
err
;
/* Check if root fs is mounted */
if
(
!
current
->
fs
->
root
)
{
printk
(
KERN_WARNING
"bt3c_cs: Root filesystem is not mounted.
\n
"
);
return
-
EPERM
;
}
char
*
argv
[]
=
{
FW_LOADER
,
"pccard"
,
dev
,
NULL
};
char
*
envp
[]
=
{
"HOME=/"
,
"TERM=linux"
,
"PATH=/sbin:/usr/sbin:/bin:/usr/bin"
,
NULL
};
sprintf
(
dev
,
"%04x"
,
info
->
link
.
io
.
BasePort1
);
pid
=
kernel_thread
(
bt3c_fw_loader_exec
,
(
void
*
)
dev
,
0
);
if
(
pid
<
0
)
{
printk
(
KERN_WARNING
"bt3c_cs: Forking of kernel thread failed (errno=%d).
\n
"
,
-
pid
);
return
pid
;
}
/* Block signals, everything but SIGKILL/SIGSTOP */
spin_lock_irq
(
&
current
->
sighand
->
siglock
);
tmpsig
=
current
->
blocked
;
siginitsetinv
(
&
current
->
blocked
,
sigmask
(
SIGKILL
)
|
sigmask
(
SIGSTOP
));
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sighand
->
siglock
);
result
=
waitpid
(
pid
,
NULL
,
__WCLONE
);
/* Allow signals again */
spin_lock_irq
(
&
current
->
sighand
->
siglock
);
current
->
blocked
=
tmpsig
;
recalc_sigpending
();
spin_unlock_irq
(
&
current
->
sighand
->
siglock
);
if
(
result
!=
pid
)
{
printk
(
KERN_WARNING
"bt3c_cs: Waiting for pid %d failed (errno=%d).
\n
"
,
pid
,
-
result
);
return
-
result
;
}
err
=
call_usermodehelper
(
FW_LOADER
,
argv
,
envp
,
1
);
if
(
err
)
printk
(
KERN_WARNING
"bt3c_cs: Failed to run
\"
%s pccard %s
\"
(errno=%d).
\n
"
,
FW_LOADER
,
dev
,
err
);
return
0
;
return
err
;
}
...
...
drivers/ieee1394/nodemgr.c
View file @
ac94a58a
...
...
@@ -786,7 +786,7 @@ static void nodemgr_call_policy(char *verb, struct unit_directory *ud)
#ifdef CONFIG_IEEE1394_VERBOSEDEBUG
HPSB_DEBUG
(
"NodeMgr: %s %s %016Lx"
,
argv
[
0
],
verb
,
(
long
long
unsigned
)
ud
->
ne
->
guid
);
#endif
value
=
call_usermodehelper
(
argv
[
0
],
argv
,
envp
);
value
=
call_usermodehelper
(
argv
[
0
],
argv
,
envp
,
0
);
kfree
(
buf
);
kfree
(
envp
);
if
(
value
!=
0
)
...
...
drivers/input/input.c
View file @
ac94a58a
...
...
@@ -383,7 +383,7 @@ static void input_call_hotplug(char *verb, struct input_dev *dev)
argv
[
0
],
argv
[
1
],
envp
[
0
],
envp
[
1
],
envp
[
2
],
envp
[
3
],
envp
[
4
]);
#endif
value
=
call_usermodehelper
(
argv
[
0
],
argv
,
envp
);
value
=
call_usermodehelper
(
argv
[
0
],
argv
,
envp
,
0
);
kfree
(
buf
);
kfree
(
envp
);
...
...
drivers/isdn/hardware/eicon/divasmain.c
View file @
ac94a58a
...
...
@@ -263,7 +263,7 @@ static void diva_adapter_trapped(void *context)
pdpc
->
card_failed
=
0
;
argv
[
2
]
=
&
adapter
[
0
];
ret
=
call_usermodehelper
(
argv
[
0
],
argv
,
envp
);
ret
=
call_usermodehelper
(
argv
[
0
],
argv
,
envp
,
0
);
if
(
ret
)
{
printk
(
KERN_ERR
...
...
drivers/net/hamradio/baycom_epp.c
View file @
ac94a58a
...
...
@@ -369,15 +369,14 @@ static char eppconfig_path[256] = "/usr/sbin/eppfpga";
static
char
*
envp
[]
=
{
"HOME=/"
,
"TERM=linux"
,
"PATH=/usr/bin:/bin"
,
NULL
};
static
int
errno
;
static
int
exec_eppfpga
(
void
*
b
)
/* eppconfig: called during ifconfig up to configure the modem */
static
int
eppconfig
(
struct
baycom_state
*
bc
)
{
struct
baycom_state
*
bc
=
(
struct
baycom_state
*
)
b
;
char
modearg
[
256
];
char
portarg
[
16
];
char
*
argv
[]
=
{
eppconfig_path
,
"-s"
,
"-p"
,
portarg
,
"-m"
,
modearg
,
NULL
};
int
i
;
char
*
argv
[]
=
{
eppconfig_path
,
"-s"
,
"-p"
,
portarg
,
"-m"
,
modearg
,
NULL
};
int
ret
;
/* set up arguments */
sprintf
(
modearg
,
"%sclk,%smodem,fclk=%d,bps=%d,divider=%d%s,extstat"
,
...
...
@@ -388,39 +387,7 @@ static int exec_eppfpga(void *b)
sprintf
(
portarg
,
"%ld"
,
bc
->
pdev
->
port
->
base
);
printk
(
KERN_DEBUG
"%s: %s -s -p %s -m %s
\n
"
,
bc_drvname
,
eppconfig_path
,
portarg
,
modearg
);
i
=
exec_usermodehelper
(
eppconfig_path
,
argv
,
envp
);
if
(
i
<
0
)
{
printk
(
KERN_ERR
"%s: failed to exec %s -s -p %s -m %s, errno = %d
\n
"
,
bc_drvname
,
eppconfig_path
,
portarg
,
modearg
,
i
);
return
i
;
}
return
0
;
}
/* eppconfig: called during ifconfig up to configure the modem */
static
int
eppconfig
(
struct
baycom_state
*
bc
)
{
int
i
,
pid
,
r
;
mm_segment_t
fs
;
pid
=
kernel_thread
(
exec_eppfpga
,
bc
,
CLONE_FS
);
if
(
pid
<
0
)
{
printk
(
KERN_ERR
"%s: fork failed, errno %d
\n
"
,
bc_drvname
,
-
pid
);
return
pid
;
}
fs
=
get_fs
();
set_fs
(
KERNEL_DS
);
/* Allow i to be in kernel space. */
r
=
waitpid
(
pid
,
&
i
,
__WCLONE
);
set_fs
(
fs
);
if
(
r
!=
pid
)
{
printk
(
KERN_ERR
"%s: waitpid(%d) failed, returning %d
\n
"
,
bc_drvname
,
pid
,
r
);
return
-
1
;
}
printk
(
KERN_DEBUG
"%s: eppfpga returned %d
\n
"
,
bc_drvname
,
i
);
return
i
;
return
call_usermodehelper
(
eppconfig_path
,
argv
,
envp
,
1
);
}
/* ---------------------------------------------------------------------- */
...
...
drivers/pnp/pnpbios/core.c
View file @
ac94a58a
...
...
@@ -602,7 +602,7 @@ static int pnp_dock_event(int dock, struct pnp_docking_station_info *info)
info
->
location_id
,
info
->
serial
,
info
->
capabilities
);
envp
[
i
]
=
0
;
value
=
call_usermodehelper
(
argv
[
0
],
argv
,
envp
);
value
=
call_usermodehelper
(
argv
[
0
],
argv
,
envp
,
0
);
kfree
(
buf
);
kfree
(
envp
);
return
0
;
...
...
fs/proc/array.c
View file @
ac94a58a
...
...
@@ -316,7 +316,15 @@ int proc_pid_stat(struct task_struct *task, char * buffer)
wchan
=
get_wchan
(
task
);
collect_sigign_sigcatch
(
task
,
&
sigign
,
&
sigcatch
);
sigemptyset
(
&
sigign
);
sigemptyset
(
&
sigcatch
);
read_lock
(
&
tasklist_lock
);
if
(
task
->
sighand
)
{
spin_lock_irq
(
&
task
->
sighand
->
siglock
);
collect_sigign_sigcatch
(
task
,
&
sigign
,
&
sigcatch
);
spin_lock_irq
(
&
task
->
sighand
->
siglock
);
}
read_unlock
(
&
tasklist_lock
);
/* scale priority and nice values from timeslices to -20..20 */
/* to make it look like a "normal" Unix priority/nice value */
...
...
include/linux/kmod.h
View file @
ac94a58a
...
...
@@ -21,6 +21,7 @@
#include <linux/config.h>
#include <linux/errno.h>
#include <linux/compiler.h>
#ifdef CONFIG_KMOD
extern
int
request_module
(
const
char
*
name
);
...
...
@@ -29,8 +30,7 @@ static inline int request_module(const char * name) { return -ENOSYS; }
#endif
#define try_then_request_module(x, mod) ((x) ?: request_module(mod), (x))
extern
int
exec_usermodehelper
(
char
*
program_path
,
char
*
argv
[],
char
*
envp
[]);
extern
int
call_usermodehelper
(
char
*
path
,
char
*
argv
[],
char
*
envp
[]);
extern
int
call_usermodehelper
(
char
*
path
,
char
*
argv
[],
char
*
envp
[],
int
wait
);
#ifdef CONFIG_HOTPLUG
extern
char
hotplug_path
[];
...
...
kernel/compat.c
View file @
ac94a58a
...
...
@@ -17,6 +17,7 @@
#include <linux/time.h>
#include <linux/signal.h>
#include <linux/sched.h>
/* for MAX_SCHEDULE_TIMEOUT */
#include <linux/futex.h>
/* for FUTEX_WAIT */
#include <asm/uaccess.h>
...
...
@@ -210,7 +211,7 @@ asmlinkage long compat_sys_sigprocmask(int how, compat_old_sigset_t *set,
return
ret
;
}
extern
long
do_futex
(
u
32
*
,
int
,
int
,
unsigned
long
);
extern
long
do_futex
(
u
nsigned
long
,
int
,
int
,
unsigned
long
);
asmlinkage
long
compat_sys_futex
(
u32
*
uaddr
,
int
op
,
int
val
,
struct
compat_timespec
*
utime
)
...
...
@@ -221,7 +222,7 @@ asmlinkage long compat_sys_futex(u32 *uaddr, int op, int val,
if
((
op
==
FUTEX_WAIT
)
&&
utime
)
{
if
(
get_compat_timespec
(
&
t
,
utime
))
return
-
EFAULT
;
timeout
=
timespec_to_jiffies
(
t
)
+
1
;
timeout
=
timespec_to_jiffies
(
&
t
)
+
1
;
}
return
do_futex
((
unsigned
long
)
uaddr
,
op
,
val
,
timeout
);
}
kernel/kmod.c
View file @
ac94a58a
This diff is collapsed.
Click to expand it.
net/bluetooth/hci_core.c
View file @
ac94a58a
...
...
@@ -114,7 +114,7 @@ static int hci_run_hotplug(char *dev, char *action)
envp
[
3
]
=
astr
;
envp
[
4
]
=
NULL
;
return
call_usermodehelper
(
argv
[
0
],
argv
,
envp
);
return
call_usermodehelper
(
argv
[
0
],
argv
,
envp
,
0
);
}
#else
#define hci_run_hotplug(A...)
...
...
net/core/dev.c
View file @
ac94a58a
...
...
@@ -2942,6 +2942,6 @@ static int net_run_sbin_hotplug(struct net_device *dev, char *action)
envp
[
i
++
]
=
action_str
;
envp
[
i
]
=
0
;
return
call_usermodehelper
(
argv
[
0
],
argv
,
envp
);
return
call_usermodehelper
(
argv
[
0
],
argv
,
envp
,
0
);
}
#endif
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