diff options
author | Arun Sharma <arun.sharma@intel.com> | 2005-04-22 22:06:47 +0200 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-04-22 22:06:47 +0200 |
commit | 7130667107cd3ab9d6802b69bab63c7d22f20bd4 (patch) | |
tree | b4467b2d08a139961e709cfb41bd1f9280249155 /arch/ia64/ia32 | |
parent | [PATCH] x86_64: fix new out of line put_user() (diff) | |
download | linux-7130667107cd3ab9d6802b69bab63c7d22f20bd4.tar.xz linux-7130667107cd3ab9d6802b69bab63c7d22f20bd4.zip |
[IA64] ia32_signal.c: erroneous use of memset/memcpy
Found by Alexander Nyberg, improved by Bjorn Helgaas.
- Fix the incorrect argument to sizeof()
- looks like memcpy() code pass was dervived from code that used
copy_from_user(). But in this case we are doing to kernel space
to kernel space copy, so memcpy is the right routine, but it
doesn't return an error code.
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/ia32')
-rw-r--r-- | arch/ia64/ia32/ia32_signal.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/ia64/ia32/ia32_signal.c b/arch/ia64/ia32/ia32_signal.c index 19b02adce68c..ebb89be2aa2d 100644 --- a/arch/ia64/ia32/ia32_signal.c +++ b/arch/ia64/ia32/ia32_signal.c @@ -460,10 +460,9 @@ __ia32_rt_sigsuspend (compat_sigset_t *sset, unsigned int sigsetsize, struct sig sigset_t oldset, set; scr->scratch_unat = 0; /* avoid leaking kernel bits to user level */ - memset(&set, 0, sizeof(&set)); + memset(&set, 0, sizeof(set)); - if (memcpy(&set.sig, &sset->sig, sigsetsize)) - return -EFAULT; + memcpy(&set.sig, &sset->sig, sigsetsize); sigdelsetmask(&set, ~_BLOCKABLE); |