aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
authorHugh Dickins <hugh@veritas.com>2005-11-22 00:32:13 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-22 12:13:42 -0500
commit1cdca61bf8537043edde8ef784ce1a1351361dac (patch)
treedb9d45f8616240758cea40f5f657879f47f058fe /sound/usb
parent83e9b7e929d1323b9a155d186f77aa8c06155cc3 (diff)
[PATCH] unpaged: sound nopage get_page
Something noticed when studying use of VM_RESERVED in different drivers: snd_usX2Y_hwdep_pcm_vm_nopage omitted to get_page: fixed. And how did this work before? Aargh! That nopage is returning a page from within a buffer allocated by snd_malloc_pages, which allocates a high-order page, then does SetPageReserved on each 0-order page within. That would have worked in 2.6.14, because when the area was unmapped, PageReserved inhibited put_page. 2.6.15-rc1 removed that inhibition (while leaving ineffective PageReserveds around for now), but it hasn't caused trouble because.. we've not been freeing from VM_RESERVED at all. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/usx2y/usx2yhwdeppcm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/usb/usx2y/usx2yhwdeppcm.c b/sound/usb/usx2y/usx2yhwdeppcm.c
index 0dc828ff9e94..c9136a98755f 100644
--- a/sound/usb/usx2y/usx2yhwdeppcm.c
+++ b/sound/usb/usx2y/usx2yhwdeppcm.c
@@ -691,6 +691,7 @@ static struct page * snd_usX2Y_hwdep_pcm_vm_nopage(struct vm_area_struct *area,
691 snd_assert((offset % PAGE_SIZE) == 0, return NOPAGE_OOM); 691 snd_assert((offset % PAGE_SIZE) == 0, return NOPAGE_OOM);
692 vaddr = (char*)((usX2Ydev_t*)area->vm_private_data)->hwdep_pcm_shm + offset; 692 vaddr = (char*)((usX2Ydev_t*)area->vm_private_data)->hwdep_pcm_shm + offset;
693 page = virt_to_page(vaddr); 693 page = virt_to_page(vaddr);
694 get_page(page);
694 695
695 if (type) 696 if (type)
696 *type = VM_FAULT_MINOR; 697 *type = VM_FAULT_MINOR;