Commit e72fdc57 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] Futex-fd error return fix

Hugh Dickins caught this confusion between the ret variable in outer
scope (holding the fd) and the return value of f_setown.  Rename inner
"ret".
parent c4b8b77d
...@@ -478,12 +478,12 @@ static int futex_fd(unsigned long uaddr, int signal) ...@@ -478,12 +478,12 @@ static int futex_fd(unsigned long uaddr, int signal)
filp->f_dentry = dget(futex_mnt->mnt_root); filp->f_dentry = dget(futex_mnt->mnt_root);
if (signal) { if (signal) {
int ret; int err;
err = f_setown(filp, current->tgid, 1);
ret = f_setown(filp, current->tgid, 1); if (err < 0) {
if (ret) {
put_unused_fd(ret); put_unused_fd(ret);
put_filp(filp); put_filp(filp);
ret = err;
goto out; goto out;
} }
filp->f_owner.signum = signal; filp->f_owner.signum = signal;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment