diff options
author | Paul Mackerras <paulus@samba.org> | 2005-11-07 19:14:20 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-11-07 19:14:20 -0500 |
commit | 24bfb00123e82a2e70bd115277d922438813515b (patch) | |
tree | 27328b8a5718e16d64e2d101f4b7ddcad5930aed /arch/cris/arch-v32 | |
parent | c6135234550ed89a6fd0e8cb229633967e41d649 (diff) | |
parent | 3f00d3e8fb963968a922d821a9a53b503b687e81 (diff) |
Merge ../linux-2.6
Diffstat (limited to 'arch/cris/arch-v32')
-rw-r--r-- | arch/cris/arch-v32/drivers/cryptocop.c | 14 | ||||
-rw-r--r-- | arch/cris/arch-v32/kernel/ptrace.c | 51 | ||||
-rw-r--r-- | arch/cris/arch-v32/kernel/signal.c | 2 |
3 files changed, 10 insertions, 57 deletions
diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c index ca72076c630a..501fa52d8d3a 100644 --- a/arch/cris/arch-v32/drivers/cryptocop.c +++ b/arch/cris/arch-v32/drivers/cryptocop.c | |||
@@ -277,7 +277,7 @@ struct file_operations cryptocop_fops = { | |||
277 | static void free_cdesc(struct cryptocop_dma_desc *cdesc) | 277 | static void free_cdesc(struct cryptocop_dma_desc *cdesc) |
278 | { | 278 | { |
279 | DEBUG(printk("free_cdesc: cdesc 0x%p, from_pool=%d\n", cdesc, cdesc->from_pool)); | 279 | DEBUG(printk("free_cdesc: cdesc 0x%p, from_pool=%d\n", cdesc, cdesc->from_pool)); |
280 | if (cdesc->free_buf) kfree(cdesc->free_buf); | 280 | kfree(cdesc->free_buf); |
281 | 281 | ||
282 | if (cdesc->from_pool) { | 282 | if (cdesc->from_pool) { |
283 | unsigned long int flags; | 283 | unsigned long int flags; |
@@ -2950,15 +2950,15 @@ static int cryptocop_ioctl_process(struct inode *inode, struct file *filp, unsig | |||
2950 | put_page(outpages[i]); | 2950 | put_page(outpages[i]); |
2951 | } | 2951 | } |
2952 | 2952 | ||
2953 | if (digest_result) kfree(digest_result); | 2953 | kfree(digest_result); |
2954 | if (inpages) kfree(inpages); | 2954 | kfree(inpages); |
2955 | if (outpages) kfree(outpages); | 2955 | kfree(outpages); |
2956 | if (cop){ | 2956 | if (cop){ |
2957 | if (cop->tfrm_op.indata) kfree(cop->tfrm_op.indata); | 2957 | kfree(cop->tfrm_op.indata); |
2958 | if (cop->tfrm_op.outdata) kfree(cop->tfrm_op.outdata); | 2958 | kfree(cop->tfrm_op.outdata); |
2959 | kfree(cop); | 2959 | kfree(cop); |
2960 | } | 2960 | } |
2961 | if (jc) kfree(jc); | 2961 | kfree(jc); |
2962 | 2962 | ||
2963 | DEBUG(print_lock_status()); | 2963 | DEBUG(print_lock_status()); |
2964 | 2964 | ||
diff --git a/arch/cris/arch-v32/kernel/ptrace.c b/arch/cris/arch-v32/kernel/ptrace.c index 208489da2a87..5528b83a622b 100644 --- a/arch/cris/arch-v32/kernel/ptrace.c +++ b/arch/cris/arch-v32/kernel/ptrace.c | |||
@@ -99,55 +99,11 @@ ptrace_disable(struct task_struct *child) | |||
99 | } | 99 | } |
100 | 100 | ||
101 | 101 | ||
102 | asmlinkage int | 102 | long arch_ptrace(struct task_struct *child, long request, long addr, long data) |
103 | sys_ptrace(long request, long pid, long addr, long data) | ||
104 | { | 103 | { |
105 | struct task_struct *child; | ||
106 | int ret; | 104 | int ret; |
107 | unsigned long __user *datap = (unsigned long __user *)data; | 105 | unsigned long __user *datap = (unsigned long __user *)data; |
108 | 106 | ||
109 | lock_kernel(); | ||
110 | ret = -EPERM; | ||
111 | |||
112 | if (request == PTRACE_TRACEME) { | ||
113 | /* are we already being traced? */ | ||
114 | if (current->ptrace & PT_PTRACED) | ||
115 | goto out; | ||
116 | ret = security_ptrace(current->parent, current); | ||
117 | if (ret) | ||
118 | goto out; | ||
119 | /* set the ptrace bit in the process flags. */ | ||
120 | current->ptrace |= PT_PTRACED; | ||
121 | ret = 0; | ||
122 | goto out; | ||
123 | } | ||
124 | |||
125 | ret = -ESRCH; | ||
126 | read_lock(&tasklist_lock); | ||
127 | child = find_task_by_pid(pid); | ||
128 | |||
129 | if (child) | ||
130 | get_task_struct(child); | ||
131 | |||
132 | read_unlock(&tasklist_lock); | ||
133 | |||
134 | if (!child) | ||
135 | goto out; | ||
136 | |||
137 | ret = -EPERM; | ||
138 | |||
139 | if (pid == 1) /* Leave the init process alone! */ | ||
140 | goto out_tsk; | ||
141 | |||
142 | if (request == PTRACE_ATTACH) { | ||
143 | ret = ptrace_attach(child); | ||
144 | goto out_tsk; | ||
145 | } | ||
146 | |||
147 | ret = ptrace_check_attach(child, request == PTRACE_KILL); | ||
148 | if (ret < 0) | ||
149 | goto out_tsk; | ||
150 | |||
151 | switch (request) { | 107 | switch (request) { |
152 | /* Read word at location address. */ | 108 | /* Read word at location address. */ |
153 | case PTRACE_PEEKTEXT: | 109 | case PTRACE_PEEKTEXT: |
@@ -347,10 +303,7 @@ sys_ptrace(long request, long pid, long addr, long data) | |||
347 | ret = ptrace_request(child, request, addr, data); | 303 | ret = ptrace_request(child, request, addr, data); |
348 | break; | 304 | break; |
349 | } | 305 | } |
350 | out_tsk: | 306 | |
351 | put_task_struct(child); | ||
352 | out: | ||
353 | unlock_kernel(); | ||
354 | return ret; | 307 | return ret; |
355 | } | 308 | } |
356 | 309 | ||
diff --git a/arch/cris/arch-v32/kernel/signal.c b/arch/cris/arch-v32/kernel/signal.c index 0a3614dab887..99e59b3eacf8 100644 --- a/arch/cris/arch-v32/kernel/signal.c +++ b/arch/cris/arch-v32/kernel/signal.c | |||
@@ -513,7 +513,7 @@ give_sigsegv: | |||
513 | } | 513 | } |
514 | 514 | ||
515 | /* Invoke a singal handler to, well, handle the signal. */ | 515 | /* Invoke a singal handler to, well, handle the signal. */ |
516 | extern inline void | 516 | static inline void |
517 | handle_signal(int canrestart, unsigned long sig, | 517 | handle_signal(int canrestart, unsigned long sig, |
518 | siginfo_t *info, struct k_sigaction *ka, | 518 | siginfo_t *info, struct k_sigaction *ka, |
519 | sigset_t *oldset, struct pt_regs * regs) | 519 | sigset_t *oldset, struct pt_regs * regs) |