From 43c7f68f5e130a0b2fa76c8862c9f7290e065324 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Sat, 6 Sep 2003 00:36:40 -0700 Subject: [PATCH] [PATCH] janitor: oss/forte copy*user fixes This patch catches insures proper return values from copy_to/from_user calls. From: Ron Gage --- sound/oss/forte.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/oss/forte.c b/sound/oss/forte.c index 840bf227b282..606da5613e6f 100644 --- a/sound/oss/forte.c +++ b/sound/oss/forte.c @@ -1066,7 +1066,7 @@ forte_dsp_ioctl (struct inode *inode, struct file *file, unsigned int cmd, spin_unlock_irq (&chip->lock); - return copy_to_user ((void *) arg, &abi, sizeof (abi)); + return copy_to_user ((void *) arg, &abi, sizeof (abi)) ? -EFAULT : 0; case SNDCTL_DSP_GETIPTR: DPRINTK ("%s: GETIPTR\n", __FUNCTION__); @@ -1087,7 +1087,7 @@ forte_dsp_ioctl (struct inode *inode, struct file *file, unsigned int cmd, spin_unlock_irq (&chip->lock); - return copy_to_user ((void *) arg, &cinfo, sizeof (cinfo)); + return copy_to_user ((void *) arg, &cinfo, sizeof (cinfo)) ? -EFAULT : 0; case SNDCTL_DSP_GETOSPACE: if (!wr) @@ -1115,7 +1115,7 @@ forte_dsp_ioctl (struct inode *inode, struct file *file, unsigned int cmd, spin_unlock_irq (&chip->lock); - return copy_to_user ((void *) arg, &abi, sizeof (abi)); + return copy_to_user ((void *) arg, &abi, sizeof (abi)) ? -EFAULT : 0; case SNDCTL_DSP_GETOPTR: if (!wr) @@ -1134,7 +1134,7 @@ forte_dsp_ioctl (struct inode *inode, struct file *file, unsigned int cmd, spin_unlock_irq (&chip->lock); - return copy_to_user ((void *) arg, &cinfo, sizeof (cinfo)); + return copy_to_user ((void *) arg, &cinfo, sizeof (cinfo)) ? -EFAULT : 0; case SNDCTL_DSP_GETODELAY: if (!wr) -- 2.39.5