Commit 6e5243cc authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] more sparse checking of do_utimes()

Speaking of conflicts...  Here's another half of a do_utimes() patch,
same story as on ppc64:
parent 0b973969
...@@ -1445,28 +1445,15 @@ asmlinkage int sys32_settimeofday(struct compat_timeval *tv, struct timezone *tz ...@@ -1445,28 +1445,15 @@ asmlinkage int sys32_settimeofday(struct compat_timeval *tv, struct timezone *tz
asmlinkage int sys32_utimes(char *filename, struct compat_timeval *tvs) asmlinkage int sys32_utimes(char *filename, struct compat_timeval *tvs)
{ {
char *kfilename;
struct timeval ktvs[2]; struct timeval ktvs[2];
mm_segment_t old_fs;
int ret;
kfilename = getname(filename);
ret = PTR_ERR(kfilename);
if (!IS_ERR(kfilename)) {
if (tvs) {
if (get_tv32(&ktvs[0], tvs) ||
get_tv32(&ktvs[1], 1+tvs))
return -EFAULT;
}
old_fs = get_fs(); if (tvs) {
set_fs(KERNEL_DS); if (get_tv32(&ktvs[0], tvs) ||
ret = do_utimes(kfilename, (tvs ? &ktvs[0] : NULL)); get_tv32(&ktvs[1], 1+tvs))
set_fs(old_fs); return -EFAULT;
putname(kfilename);
} }
return ret;
return do_utimes(filename, (tvs ? &ktvs[0] : NULL));
} }
/* These are here just in case some old sparc32 binary calls it. */ /* These are here just in case some old sparc32 binary calls it. */
......
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