X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Fcore%2Fpcm.c;h=7f1bf94e0e4cd1ceb91d1a7bc9bf59d819fe5807;hb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;hp=4f879747d1db930523ba50a4574e218a2d1470ab;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/sound/core/pcm.c b/sound/core/pcm.c index 4f879747d..7f1bf94e0 100644 --- a/sound/core/pcm.c +++ b/sound/core/pcm.c @@ -55,7 +55,7 @@ static int snd_pcm_control_ioctl(snd_card_t * card, { int device; - if (get_user(device, (int *)arg)) + if (get_user(device, (int __user *)arg)) return -EFAULT; device = device < 0 ? 0 : device + 1; while (device < SNDRV_PCM_DEVICES) { @@ -65,18 +65,19 @@ static int snd_pcm_control_ioctl(snd_card_t * card, } if (device == SNDRV_PCM_DEVICES) device = -1; - if (put_user(device, (int *)arg)) + if (put_user(device, (int __user *)arg)) return -EFAULT; return 0; } case SNDRV_CTL_IOCTL_PCM_INFO: { - snd_pcm_info_t *info = (snd_pcm_info_t *)arg; + snd_pcm_info_t __user *info; unsigned int device, subdevice; snd_pcm_stream_t stream; snd_pcm_t *pcm; snd_pcm_str_t *pstr; snd_pcm_substream_t *substream; + info = (snd_pcm_info_t __user *)arg; if (get_user(device, &info->device)) return -EFAULT; if (device >= SNDRV_PCM_DEVICES) @@ -106,7 +107,7 @@ static int snd_pcm_control_ioctl(snd_card_t * card, { int val; - if (get_user(val, (int *)arg)) + if (get_user(val, (int __user *)arg)) return -EFAULT; control->prefer_pcm_subdevice = val; return 0;