diff options
Diffstat (limited to 'arch/mips/kernel/kspd.c')
-rw-r--r-- | arch/mips/kernel/kspd.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/arch/mips/kernel/kspd.c b/arch/mips/kernel/kspd.c index c6580018c94b..cb9a14a1ca5b 100644 --- a/arch/mips/kernel/kspd.c +++ b/arch/mips/kernel/kspd.c | |||
@@ -89,7 +89,7 @@ static int sp_stopping = 0; | |||
89 | #define MTSP_O_EXCL 0x0800 | 89 | #define MTSP_O_EXCL 0x0800 |
90 | #define MTSP_O_BINARY 0x8000 | 90 | #define MTSP_O_BINARY 0x8000 |
91 | 91 | ||
92 | #define SP_VPE 1 | 92 | extern int tclimit; |
93 | 93 | ||
94 | struct apsp_table { | 94 | struct apsp_table { |
95 | int sp; | 95 | int sp; |
@@ -225,8 +225,8 @@ void sp_work_handle_request(void) | |||
225 | /* Run the syscall at the priviledge of the user who loaded the | 225 | /* Run the syscall at the priviledge of the user who loaded the |
226 | SP program */ | 226 | SP program */ |
227 | 227 | ||
228 | if (vpe_getuid(SP_VPE)) | 228 | if (vpe_getuid(tclimit)) |
229 | sp_setfsuidgid( vpe_getuid(SP_VPE), vpe_getgid(SP_VPE)); | 229 | sp_setfsuidgid(vpe_getuid(tclimit), vpe_getgid(tclimit)); |
230 | 230 | ||
231 | switch (sc.cmd) { | 231 | switch (sc.cmd) { |
232 | /* needs the flags argument translating from SDE kit to | 232 | /* needs the flags argument translating from SDE kit to |
@@ -245,7 +245,7 @@ void sp_work_handle_request(void) | |||
245 | 245 | ||
246 | case MTSP_SYSCALL_EXIT: | 246 | case MTSP_SYSCALL_EXIT: |
247 | list_for_each_entry(n, &kspd_notifylist, list) | 247 | list_for_each_entry(n, &kspd_notifylist, list) |
248 | n->kspd_sp_exit(SP_VPE); | 248 | n->kspd_sp_exit(tclimit); |
249 | sp_stopping = 1; | 249 | sp_stopping = 1; |
250 | 250 | ||
251 | printk(KERN_DEBUG "KSPD got exit syscall from SP exitcode %d\n", | 251 | printk(KERN_DEBUG "KSPD got exit syscall from SP exitcode %d\n", |
@@ -255,7 +255,7 @@ void sp_work_handle_request(void) | |||
255 | case MTSP_SYSCALL_OPEN: | 255 | case MTSP_SYSCALL_OPEN: |
256 | generic.arg1 = translate_open_flags(generic.arg1); | 256 | generic.arg1 = translate_open_flags(generic.arg1); |
257 | 257 | ||
258 | vcwd = vpe_getcwd(SP_VPE); | 258 | vcwd = vpe_getcwd(tclimit); |
259 | 259 | ||
260 | /* change to the cwd of the process that loaded the SP program */ | 260 | /* change to the cwd of the process that loaded the SP program */ |
261 | old_fs = get_fs(); | 261 | old_fs = get_fs(); |
@@ -283,7 +283,7 @@ void sp_work_handle_request(void) | |||
283 | break; | 283 | break; |
284 | } /* switch */ | 284 | } /* switch */ |
285 | 285 | ||
286 | if (vpe_getuid(SP_VPE)) | 286 | if (vpe_getuid(tclimit)) |
287 | sp_setfsuidgid( 0, 0); | 287 | sp_setfsuidgid( 0, 0); |
288 | 288 | ||
289 | old_fs = get_fs(); | 289 | old_fs = get_fs(); |
@@ -364,10 +364,9 @@ static void startwork(int vpe) | |||
364 | } | 364 | } |
365 | 365 | ||
366 | INIT_WORK(&work, sp_work); | 366 | INIT_WORK(&work, sp_work); |
367 | queue_work(workqueue, &work); | 367 | } |
368 | } else | ||
369 | queue_work(workqueue, &work); | ||
370 | 368 | ||
369 | queue_work(workqueue, &work); | ||
371 | } | 370 | } |
372 | 371 | ||
373 | static void stopwork(int vpe) | 372 | static void stopwork(int vpe) |
@@ -389,7 +388,7 @@ static int kspd_module_init(void) | |||
389 | 388 | ||
390 | notify.start = startwork; | 389 | notify.start = startwork; |
391 | notify.stop = stopwork; | 390 | notify.stop = stopwork; |
392 | vpe_notify(SP_VPE, ¬ify); | 391 | vpe_notify(tclimit, ¬ify); |
393 | 392 | ||
394 | return 0; | 393 | return 0; |
395 | } | 394 | } |