From 661d8af64ce99681f770deb0b3bf75e555d1acc0 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Wed, 14 Apr 2010 08:32:22 +0000 Subject: [PATCH] The cloned area to access the userspace buffer in the case of fragmented transfers was created with wrong permissions leading to a read-protected area. Since we actually support read-protection in Haiku this caused a crash for all fragmented transfers (transfers > 384K) leading to #5538. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36245 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/bus_managers/usb/Transfer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/add-ons/kernel/bus_managers/usb/Transfer.cpp b/src/add-ons/kernel/bus_managers/usb/Transfer.cpp index fd9d013e03..c6ad201ea0 100644 --- a/src/add-ons/kernel/bus_managers/usb/Transfer.cpp +++ b/src/add-ons/kernel/bus_managers/usb/Transfer.cpp @@ -180,7 +180,7 @@ Transfer::PrepareKernelAccess() // we got a userspace buffer, need to clone the area for that // space first and map the iovecs to this cloned area. fClonedArea = clone_area("userspace accessor", &clonedMemory, - B_ANY_ADDRESS, B_WRITE_AREA | B_KERNEL_WRITE_AREA, fUserArea); + B_ANY_ADDRESS, B_KERNEL_READ_AREA | B_KERNEL_WRITE_AREA, fUserArea); if (fClonedArea < B_OK) return fClonedArea;