Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288112
b: refs/heads/master
c: c8e2525
h: refs/heads/master
v: v3
  • Loading branch information
H. Peter Anvin authored and Linus Torvalds committed Mar 2, 2012
1 parent c706aaa commit 6ae37c6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1f033c1a6ec1a6815e9c4507d83eb20161163c37
refs/heads/master: c8e252586f8d5de906385d8cf6385fee289a825e
2 changes: 1 addition & 1 deletion trunk/fs/binfmt_elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1421,7 +1421,7 @@ static int fill_thread_core_info(struct elf_thread_core_info *t,
for (i = 1; i < view->n; ++i) {
const struct user_regset *regset = &view->regsets[i];
do_thread_regset_writeback(t->task, regset);
if (regset->core_note_type &&
if (regset->core_note_type && regset->get &&
(!regset->active || regset->active(t->task, regset))) {
int ret;
size_t size = regset->n * regset->size;
Expand Down
6 changes: 6 additions & 0 deletions trunk/include/linux/regset.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,9 @@ static inline int copy_regset_to_user(struct task_struct *target,
{
const struct user_regset *regset = &view->regsets[setno];

if (!regset->get)
return -EOPNOTSUPP;

if (!access_ok(VERIFY_WRITE, data, size))
return -EIO;

Expand All @@ -358,6 +361,9 @@ static inline int copy_regset_from_user(struct task_struct *target,
{
const struct user_regset *regset = &view->regsets[setno];

if (!regset->set)
return -EOPNOTSUPP;

if (!access_ok(VERIFY_READ, data, size))
return -EIO;

Expand Down

0 comments on commit 6ae37c6

Please sign in to comment.