diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-10-14 10:02:15 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-10-15 05:35:54 -0400 |
commit | ac536a848a1643e4b87e8fbd376a63091afc2ccc (patch) | |
tree | c21e0eaf6bb39452a1f0ec27186288dca582e72c | |
parent | ccb041571b73888785ef7828a276e380125891a4 (diff) |
ALSA: us122l: Fix pcm_usb_stream mmapping regression
The pcm_usb_stream plugin requires the mremap explicitly for the read
buffer, as it expands itself once after reading the required size.
But the commit [314e51b9: mm: kill vma flag VM_RESERVED and
mm->reserved_vm counter] converted blindly to a combination of
VM_DONTEXPAND | VM_DONTDUMP like other normal drivers, and this
resulted in the failure of mremap().
For fixing this regression, we need to remove VM_DONTEXPAND for the
read-buffer mmap.
Reported-and-tested-by: James Miller <jamesstewartmiller@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/usb/usx2y/us122l.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/usb/usx2y/us122l.c b/sound/usb/usx2y/us122l.c index d0323a693ba2..999550bbad40 100644 --- a/sound/usb/usx2y/us122l.c +++ b/sound/usb/usx2y/us122l.c | |||
@@ -262,7 +262,9 @@ static int usb_stream_hwdep_mmap(struct snd_hwdep *hw, | |||
262 | } | 262 | } |
263 | 263 | ||
264 | area->vm_ops = &usb_stream_hwdep_vm_ops; | 264 | area->vm_ops = &usb_stream_hwdep_vm_ops; |
265 | area->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; | 265 | area->vm_flags |= VM_DONTDUMP; |
266 | if (!read) | ||
267 | area->vm_flags |= VM_DONTEXPAND; | ||
266 | area->vm_private_data = us122l; | 268 | area->vm_private_data = us122l; |
267 | atomic_inc(&us122l->mmap_count); | 269 | atomic_inc(&us122l->mmap_count); |
268 | out: | 270 | out: |