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
This commit is contained in:
Michael Lotz 2010-04-14 08:32:22 +00:00
parent c9abe8265d
commit 661d8af64c

View File

@ -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;