Commit 14209d06 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Minor bug fixes to the compat layer

From: Arun Sharma <arun.sharma@intel.com>

- Several instances where we were using pid_t instead of uid_t

- If the caller passed a NULL `oldact' pointer into sys_sigprocmask then
  don't try to write the old sigmask there.
parent 41339307
......@@ -1704,7 +1704,7 @@ static int do_smb_getmountuid(unsigned int fd, unsigned int cmd, unsigned long a
set_fs(old_fs);
if (err >= 0)
err = put_user(kuid, (compat_pid_t *)arg);
err = put_user(kuid, (compat_uid_t *)arg);
return err;
}
......@@ -3081,7 +3081,7 @@ HANDLE_IOCTL(VIDIOCSFBUF32, do_video_ioctl)
HANDLE_IOCTL(VIDIOCGFREQ32, do_video_ioctl)
HANDLE_IOCTL(VIDIOCSFREQ32, do_video_ioctl)
/* One SMB ioctl needs translations. */
#define SMB_IOC_GETMOUNTUID_32 _IOR('u', 1, compat_pid_t)
#define SMB_IOC_GETMOUNTUID_32 _IOR('u', 1, compat_uid_t)
HANDLE_IOCTL(SMB_IOC_GETMOUNTUID_32, do_smb_getmountuid)
HANDLE_IOCTL(ATM_GETLINKRATE32, do_atm_ioctl)
HANDLE_IOCTL(ATM_GETNAMES32, do_atm_ioctl)
......
......@@ -204,6 +204,7 @@ asmlinkage long compat_sys_sigprocmask(int how, compat_old_sigset_t *set,
ret = sys_sigprocmask(how, set ? &s : NULL, oset ? &s : NULL);
set_fs(old_fs);
if (ret == 0)
if (oset)
ret = put_user(s, oset);
return ret;
}
......
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