| .. | .. |
|---|
| 298 | 298 | static int ppr_get(struct task_struct *target, const struct user_regset *regset, |
|---|
| 299 | 299 | struct membuf to) |
|---|
| 300 | 300 | { |
|---|
| 301 | + if (!target->thread.regs) |
|---|
| 302 | + return -EINVAL; |
|---|
| 303 | + |
|---|
| 301 | 304 | return membuf_write(&to, &target->thread.regs->ppr, sizeof(u64)); |
|---|
| 302 | 305 | } |
|---|
| 303 | 306 | |
|---|
| .. | .. |
|---|
| 305 | 308 | unsigned int pos, unsigned int count, const void *kbuf, |
|---|
| 306 | 309 | const void __user *ubuf) |
|---|
| 307 | 310 | { |
|---|
| 311 | + if (!target->thread.regs) |
|---|
| 312 | + return -EINVAL; |
|---|
| 313 | + |
|---|
| 308 | 314 | return user_regset_copyin(&pos, &count, &kbuf, &ubuf, |
|---|
| 309 | 315 | &target->thread.regs->ppr, 0, sizeof(u64)); |
|---|
| 310 | 316 | } |
|---|