Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24478
b: refs/heads/master
c: 68c3431
h: refs/heads/master
v: v3
  • Loading branch information
Vadim Lobanov authored and Linus Torvalds committed Mar 28, 2006
1 parent 5e09e26 commit 650a227
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 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: e4a1f129f9e43a5e5d28fe6d1b214246a398cdce
refs/heads/master: 68c3431ae22912be580c68d3955ef46515582943
13 changes: 2 additions & 11 deletions trunk/fs/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1639,15 +1639,6 @@ void compat_set_fd_set(unsigned long nr, compat_ulong_t __user *ufdset,
* This is a virtual copy of sys_select from fs/select.c and probably
* should be compared to it from time to time
*/
static void *select_bits_alloc(int size)
{
return kmalloc(6 * size, GFP_KERNEL);
}

static void select_bits_free(void *bits, int size)
{
kfree(bits);
}

/*
* We can actually return ERESTARTSYS instead of EINTR, but I'd
Expand Down Expand Up @@ -1686,7 +1677,7 @@ int compat_core_sys_select(int n, compat_ulong_t __user *inp,
*/
ret = -ENOMEM;
size = FDS_BYTES(n);
bits = select_bits_alloc(size);
bits = kmalloc(6 * size, GFP_KERNEL);
if (!bits)
goto out_nofds;
fds.in = (unsigned long *) bits;
Expand Down Expand Up @@ -1720,7 +1711,7 @@ int compat_core_sys_select(int n, compat_ulong_t __user *inp,
compat_set_fd_set(n, exp, fds.res_ex);

out:
select_bits_free(bits, size);
kfree(bits);
out_nofds:
return ret;
}
Expand Down

0 comments on commit 650a227

Please sign in to comment.