4 Feb
2019
4 Feb
'19
11:48 a.m.
On Mon, 04 Feb 2019 10:39:10 +0100, Jaroslav Kysela wrote:
@@ -3295,6 +3311,9 @@ static int snd_pcm_mmap_status(struct snd_pcm_substream *substream, struct file struct vm_area_struct *area) { long size;
- struct snd_pcm_file *pcm_file = file->private_data;
- if (pcm_file->perm != SNDRV_PCM_PERM_MODE_FULL)
return -EPERM;
This check can be better put to pcm_status_mmap_allowed().
@@ -3331,6 +3350,9 @@ static int snd_pcm_mmap_control(struct snd_pcm_substream *substream, struct file struct vm_area_struct *area) { long size;
- struct snd_pcm_file *pcm_file = file->private_data;
- if (pcm_file->perm != SNDRV_PCM_PERM_MODE_FULL)
return -EPERM;
Ditto, put to pcm_control_mmap_allowed().
Other than that, looks good to me: Reviewed-by: Takashi Iwai tiwai@suse.de
thanks,
Takashi