Skip to content

Commit

Permalink
[PATCH] Lost sockfd_put() in routing_ioctl()
Browse files Browse the repository at this point in the history
This patch adds lost sockfd_put() in 32bit compat rounting_ioctl() on
64bit platforms

Signed-Off-By: Kirill Korotaev <dev@sw.ru>
Signed-Off-By: Maxim Giryaev <gem@sw.ru>
Signed-off-By: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Kirill Korotaev authored and Linus Torvalds committed Sep 9, 2005
1 parent 35311d6 commit d99901d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fs/compat_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -798,13 +798,16 @@ static int routing_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
r = (void *) &r4;
}

if (ret)
return -EFAULT;
if (ret) {
ret = -EFAULT;
goto out;
}

set_fs (KERNEL_DS);
ret = sys_ioctl (fd, cmd, (unsigned long) r);
set_fs (old_fs);

out:
if (mysock)
sockfd_put(mysock);

Expand Down

0 comments on commit d99901d

Please sign in to comment.