]> git.hungrycats.org Git - linux/commitdiff
[PATCH] sparse: sound/core/timer.c fix
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>
Thu, 3 Jun 2004 09:47:39 +0000 (02:47 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 3 Jun 2004 09:47:39 +0000 (02:47 -0700)
copy_from_user() where copy_to_user() should've been.  Unfortunately, on
x86 they are almost identical, so it went unnoticed for quite a while.

sound/core/timer.c

index 956ea2a16edbd17ab28e142c37517268342df19e..1f23781d2bdcdac71e40b18f54d7a4abfc07ca21 100644 (file)
@@ -1437,7 +1437,7 @@ static int snd_timer_user_gstatus(struct file *file, snd_timer_gstatus_t *_gstat
                err = -ENODEV;
        }
        up(&register_mutex);
-       if (err >= 0 && copy_from_user(_gstatus, &gstatus, sizeof(gstatus)))
+       if (err >= 0 && copy_to_user(_gstatus, &gstatus, sizeof(gstatus)))
                err = -EFAULT;
        return err;
 }