Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7395
b: refs/heads/master
c: 39ed3fd
h: refs/heads/master
i:
  7393: b7796c5
  7391: f6f16c1
v: v3
  • Loading branch information
Pekka Enberg authored and Linus Torvalds committed Sep 7, 2005
1 parent 5350d36 commit c399869
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 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: 580b2e3c0183818adf6151e60270405b02ea8504
refs/heads/master: 39ed3fdeec1290dd246dcf1da6b278566987a084
21 changes: 9 additions & 12 deletions trunk/kernel/futex.c
Original file line number Diff line number Diff line change
Expand Up @@ -786,34 +786,26 @@ static int futex_fd(unsigned long uaddr, int signal)
filp->f_mapping = filp->f_dentry->d_inode->i_mapping;

if (signal) {
int err;
err = f_setown(filp, current->pid, 1);
if (err < 0) {
put_unused_fd(ret);
put_filp(filp);
ret = err;
goto out;
goto error;
}
filp->f_owner.signum = signal;
}

q = kmalloc(sizeof(*q), GFP_KERNEL);
if (!q) {
put_unused_fd(ret);
put_filp(filp);
ret = -ENOMEM;
goto out;
err = -ENOMEM;
goto error;
}

down_read(&current->mm->mmap_sem);
err = get_futex_key(uaddr, &q->key);

if (unlikely(err != 0)) {
up_read(&current->mm->mmap_sem);
put_unused_fd(ret);
put_filp(filp);
kfree(q);
return err;
goto error;
}

/*
Expand All @@ -829,6 +821,11 @@ static int futex_fd(unsigned long uaddr, int signal)
fd_install(ret, filp);
out:
return ret;
error:
put_unused_fd(ret);
put_filp(filp);
ret = err;
goto out;
}

long do_futex(unsigned long uaddr, int op, int val, unsigned long timeout,
Expand Down

0 comments on commit c399869

Please sign in to comment.