diff options
Diffstat (limited to 'arch/ia64/ia32/sys_ia32.c')
-rw-r--r-- | arch/ia64/ia32/sys_ia32.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c index 5e92ae00bdbb..16ef61a91d95 100644 --- a/arch/ia64/ia32/sys_ia32.c +++ b/arch/ia64/ia32/sys_ia32.c | |||
@@ -1767,25 +1767,24 @@ groups16_from_user(struct group_info *group_info, short __user *grouplist) | |||
1767 | asmlinkage long | 1767 | asmlinkage long |
1768 | sys32_getgroups16 (int gidsetsize, short __user *grouplist) | 1768 | sys32_getgroups16 (int gidsetsize, short __user *grouplist) |
1769 | { | 1769 | { |
1770 | const struct cred *cred = current_cred(); | ||
1770 | int i; | 1771 | int i; |
1771 | 1772 | ||
1772 | if (gidsetsize < 0) | 1773 | if (gidsetsize < 0) |
1773 | return -EINVAL; | 1774 | return -EINVAL; |
1774 | 1775 | ||
1775 | get_group_info(current->group_info); | 1776 | i = cred->group_info->ngroups; |
1776 | i = current->group_info->ngroups; | ||
1777 | if (gidsetsize) { | 1777 | if (gidsetsize) { |
1778 | if (i > gidsetsize) { | 1778 | if (i > gidsetsize) { |
1779 | i = -EINVAL; | 1779 | i = -EINVAL; |
1780 | goto out; | 1780 | goto out; |
1781 | } | 1781 | } |
1782 | if (groups16_to_user(grouplist, current->group_info)) { | 1782 | if (groups16_to_user(grouplist, cred->group_info)) { |
1783 | i = -EFAULT; | 1783 | i = -EFAULT; |
1784 | goto out; | 1784 | goto out; |
1785 | } | 1785 | } |
1786 | } | 1786 | } |
1787 | out: | 1787 | out: |
1788 | put_group_info(current->group_info); | ||
1789 | return i; | 1788 | return i; |
1790 | } | 1789 | } |
1791 | 1790 | ||