summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesper Juhl <juhl-lkml@dif.dk>2005-03-13 00:28:42 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-03-13 00:28:42 -0800
commit54cd92aaa2f88a2e8e46f76480c4b2fcad55f2f3 (patch)
treedd1d73eba09fc4a0bd7d59ae19cf9dd17716fb1d
parent7e39b725a97a7935f2d74a25e8c4b4668650fa1d (diff)
[PATCH] verify_area cleanup : sound
This patch converts verify_area to access_ok in sound/ Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--sound/core/hwdep.c2
-rw-r--r--sound/core/seq/seq_clientmgr.c2
-rw-r--r--sound/isa/sb/emu8000_patch.c4
-rw-r--r--sound/oss/btaudio.c6
-rw-r--r--sound/oss/soundcard.c8
-rw-r--r--sound/pci/trident/trident_synth.c4
6 files changed, 13 insertions, 13 deletions
diff --git a/sound/core/hwdep.c b/sound/core/hwdep.c
index cb19695c2062..997dd41c584e 100644
--- a/sound/core/hwdep.c
+++ b/sound/core/hwdep.c
@@ -223,7 +223,7 @@ static int snd_hwdep_dsp_load(snd_hwdep_t *hw, snd_hwdep_dsp_image_t __user *_in
/* check whether the dsp was already loaded */
if (hw->dsp_loaded & (1 << info.index))
return -EBUSY;
- if (verify_area(VERIFY_READ, info.image, info.length))
+ if (!access_ok(VERIFY_READ, info.image, info.length))
return -EFAULT;
err = hw->ops.dsp_load(hw, &info);
if (err < 0)
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index 41fb913a5fe4..d8f76afd284b 100644
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -375,7 +375,7 @@ static ssize_t snd_seq_read(struct file *file, char __user *buf, size_t count, l
if (!(snd_seq_file_flags(file) & SNDRV_SEQ_LFLG_INPUT))
return -ENXIO;
- if (verify_area(VERIFY_WRITE, buf, count))
+ if (!access_ok(VERIFY_WRITE, buf, count))
return -EFAULT;
/* check client structures are in place */
diff --git a/sound/isa/sb/emu8000_patch.c b/sound/isa/sb/emu8000_patch.c
index cea56e016708..4afc4a1bc140 100644
--- a/sound/isa/sb/emu8000_patch.c
+++ b/sound/isa/sb/emu8000_patch.c
@@ -183,10 +183,10 @@ snd_emu8000_sample_new(snd_emux_t *rec, snd_sf_sample_t *sp,
}
if (sp->v.mode_flags & SNDRV_SFNT_SAMPLE_8BITS) {
- if (verify_area(VERIFY_READ, data, sp->v.size))
+ if (!access_ok(VERIFY_READ, data, sp->v.size))
return -EFAULT;
} else {
- if (verify_area(VERIFY_READ, data, sp->v.size * 2))
+ if (!access_ok(VERIFY_READ, data, sp->v.size * 2))
return -EFAULT;
}
diff --git a/sound/oss/btaudio.c b/sound/oss/btaudio.c
index 7f9a30a9e8d4..a85093fec7be 100644
--- a/sound/oss/btaudio.c
+++ b/sound/oss/btaudio.c
@@ -558,7 +558,7 @@ static ssize_t btaudio_dsp_read(struct file *file, char __user *buffer,
__s16 __user *dst = (__s16 __user *)(buffer + ret);
__s16 avg;
int n = ndst>>1;
- if (0 != verify_area(VERIFY_WRITE,dst,ndst)) {
+ if (!access_ok(VERIFY_WRITE, dst, ndst)) {
if (0 == ret)
ret = -EFAULT;
break;
@@ -574,7 +574,7 @@ static ssize_t btaudio_dsp_read(struct file *file, char __user *buffer,
__u8 *src = bta->buf_cpu + bta->read_offset;
__u8 __user *dst = buffer + ret;
int n = ndst;
- if (0 != verify_area(VERIFY_WRITE,dst,ndst)) {
+ if (!access_ok(VERIFY_WRITE, dst, ndst)) {
if (0 == ret)
ret = -EFAULT;
break;
@@ -587,7 +587,7 @@ static ssize_t btaudio_dsp_read(struct file *file, char __user *buffer,
__u16 *src = (__u16*)(bta->buf_cpu + bta->read_offset);
__u16 __user *dst = (__u16 __user *)(buffer + ret);
int n = ndst>>1;
- if (0 != verify_area(VERIFY_WRITE,dst,ndst)) {
+ if (!access_ok(VERIFY_WRITE,dst,ndst)) {
if (0 == ret)
ret = -EFAULT;
break;
diff --git a/sound/oss/soundcard.c b/sound/oss/soundcard.c
index e878a971251b..ea32ccb265c8 100644
--- a/sound/oss/soundcard.c
+++ b/sound/oss/soundcard.c
@@ -341,11 +341,11 @@ static int sound_ioctl(struct inode *inode, struct file *file,
if (len < 1 || len > 65536 || !p)
return -EFAULT;
if (_SIOC_DIR(cmd) & _SIOC_WRITE)
- if ((err = verify_area(VERIFY_READ, p, len)) < 0)
- return err;
+ if (!access_ok(VERIFY_READ, p, len))
+ return -EFAULT;
if (_SIOC_DIR(cmd) & _SIOC_READ)
- if ((err = verify_area(VERIFY_WRITE, p, len)) < 0)
- return err;
+ if (!access_ok(VERIFY_WRITE, p, len))
+ return -EFAULT;
}
DEB(printk("sound_ioctl(dev=%d, cmd=0x%x, arg=0x%x)\n", dev, cmd, arg));
if (cmd == OSS_GETVERSION)
diff --git a/sound/pci/trident/trident_synth.c b/sound/pci/trident/trident_synth.c
index 64aab2346b46..5d5a719b0585 100644
--- a/sound/pci/trident/trident_synth.c
+++ b/sound/pci/trident/trident_synth.c
@@ -525,7 +525,7 @@ static int snd_trident_simple_put_sample(void *private_data, simple_instrument_t
if (trident->synth.current_size + size > trident->synth.max_size)
return -ENOMEM;
- if (verify_area(VERIFY_READ, data, size))
+ if (!access_ok(VERIFY_READ, data, size))
return -EFAULT;
if (trident->tlb.entries) {
@@ -570,7 +570,7 @@ static int snd_trident_simple_get_sample(void *private_data, simple_instrument_t
shift++;
size <<= shift;
- if (verify_area(VERIFY_WRITE, data, size))
+ if (!access_ok(VERIFY_WRITE, data, size))
return -EFAULT;
/* FIXME: not implemented yet */