]> git.ipfire.org Git - people/ms/linux.git/blobdiff - sound/core/oss/pcm_oss.c
Importing "grsecurity-3.1-3.19.2-201503201903.patch"
[people/ms/linux.git] / sound / core / oss / pcm_oss.c
index ada69d7a8d70a077c18abfa2aa7bf26ee8125b27..5f653863c7bd3e455eb668c76e2e12d630f79532 100644 (file)
@@ -1190,10 +1190,10 @@ snd_pcm_sframes_t snd_pcm_oss_write3(struct snd_pcm_substream *substream, const
                if (in_kernel) {
                        mm_segment_t fs;
                        fs = snd_enter_user();
-                       ret = snd_pcm_lib_write(substream, (void __force __user *)ptr, frames);
+                       ret = snd_pcm_lib_write(substream, (void __force_user *)ptr, frames);
                        snd_leave_user(fs);
                } else {
-                       ret = snd_pcm_lib_write(substream, (void __force __user *)ptr, frames);
+                       ret = snd_pcm_lib_write(substream, (void __force_user *)ptr, frames);
                }
                if (ret != -EPIPE && ret != -ESTRPIPE)
                        break;
@@ -1233,10 +1233,10 @@ snd_pcm_sframes_t snd_pcm_oss_read3(struct snd_pcm_substream *substream, char *p
                if (in_kernel) {
                        mm_segment_t fs;
                        fs = snd_enter_user();
-                       ret = snd_pcm_lib_read(substream, (void __force __user *)ptr, frames);
+                       ret = snd_pcm_lib_read(substream, (void __force_user *)ptr, frames);
                        snd_leave_user(fs);
                } else {
-                       ret = snd_pcm_lib_read(substream, (void __force __user *)ptr, frames);
+                       ret = snd_pcm_lib_read(substream, (void __force_user *)ptr, frames);
                }
                if (ret == -EPIPE) {
                        if (runtime->status->state == SNDRV_PCM_STATE_DRAINING) {
@@ -1332,7 +1332,7 @@ static ssize_t snd_pcm_oss_write2(struct snd_pcm_substream *substream, const cha
                struct snd_pcm_plugin_channel *channels;
                size_t oss_frame_bytes = (runtime->oss.plugin_first->src_width * runtime->oss.plugin_first->src_format.channels) / 8;
                if (!in_kernel) {
-                       if (copy_from_user(runtime->oss.buffer, (const char __force __user *)buf, bytes))
+                       if (copy_from_user(runtime->oss.buffer, (const char __force_user *)buf, bytes))
                                return -EFAULT;
                        buf = runtime->oss.buffer;
                }
@@ -1402,7 +1402,7 @@ static ssize_t snd_pcm_oss_write1(struct snd_pcm_substream *substream, const cha
                        }
                } else {
                        tmp = snd_pcm_oss_write2(substream,
-                                                (const char __force *)buf,
+                                                (const char __force_kernel *)buf,
                                                 runtime->oss.period_bytes, 0);
                        if (tmp <= 0)
                                goto err;
@@ -1428,7 +1428,7 @@ static ssize_t snd_pcm_oss_read2(struct snd_pcm_substream *substream, char *buf,
        struct snd_pcm_runtime *runtime = substream->runtime;
        snd_pcm_sframes_t frames, frames1;
 #ifdef CONFIG_SND_PCM_OSS_PLUGINS
-       char __user *final_dst = (char __force __user *)buf;
+       char __user *final_dst = (char __force_user *)buf;
        if (runtime->oss.plugin_first) {
                struct snd_pcm_plugin_channel *channels;
                size_t oss_frame_bytes = (runtime->oss.plugin_last->dst_width * runtime->oss.plugin_last->dst_format.channels) / 8;
@@ -1490,7 +1490,7 @@ static ssize_t snd_pcm_oss_read1(struct snd_pcm_substream *substream, char __use
                        xfer += tmp;
                        runtime->oss.buffer_used -= tmp;
                } else {
-                       tmp = snd_pcm_oss_read2(substream, (char __force *)buf,
+                       tmp = snd_pcm_oss_read2(substream, (char __force_kernel *)buf,
                                                runtime->oss.period_bytes, 0);
                        if (tmp <= 0)
                                goto err;
@@ -1659,7 +1659,7 @@ static int snd_pcm_oss_sync(struct snd_pcm_oss_file *pcm_oss_file)
                                                                   size1);
                                        size1 /= runtime->channels; /* frames */
                                        fs = snd_enter_user();
-                                       snd_pcm_lib_write(substream, (void __force __user *)runtime->oss.buffer, size1);
+                                       snd_pcm_lib_write(substream, (void __force_user *)runtime->oss.buffer, size1);
                                        snd_leave_user(fs);
                                }
                        } else if (runtime->access == SNDRV_PCM_ACCESS_RW_NONINTERLEAVED) {