Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F166537088
D26783.id78235.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D26783.id78235.diff
View Options
Index: sys/kern/kern_physio.c
===================================================================
--- sys/kern/kern_physio.c
+++ sys/kern/kern_physio.c
@@ -45,7 +45,7 @@
struct buf *pbuf;
struct bio *bp;
struct vm_page **pages;
- caddr_t sa;
+ char *base, *sa;
u_int iolen, poff;
int error, i, npages, maxpages;
vm_prot_t prot;
@@ -140,7 +140,7 @@
curthread->td_ru.ru_oublock++;
}
bp->bio_offset = uio->uio_offset;
- bp->bio_data = uio->uio_iov[i].iov_base;
+ base = uio->uio_iov[i].iov_base;
bp->bio_length = uio->uio_iov[i].iov_len;
if (bp->bio_length > dev->si_iosize_max)
bp->bio_length = dev->si_iosize_max;
@@ -153,13 +153,13 @@
* larger than MAXPHYS - PAGE_SIZE must be
* page aligned or it will be fragmented.
*/
- poff = (vm_offset_t)bp->bio_data & PAGE_MASK;
+ poff = (vm_offset_t)base & PAGE_MASK;
if (pbuf && bp->bio_length + poff > pbuf->b_kvasize) {
if (dev->si_flags & SI_NOSPLIT) {
uprintf("%s: request ptr %p is not "
"on a page boundary; cannot split "
"request\n", devtoname(dev),
- bp->bio_data);
+ base);
error = EFBIG;
goto doerror;
}
@@ -174,7 +174,7 @@
if (pages) {
if ((npages = vm_fault_quick_hold_pages(
&curproc->p_vmspace->vm_map,
- (vm_offset_t)bp->bio_data, bp->bio_length,
+ (vm_offset_t)base, bp->bio_length,
prot, pages, maxpages)) < 0) {
error = EFAULT;
goto doerror;
@@ -190,7 +190,8 @@
bp->bio_data = unmapped_buf;
bp->bio_flags |= BIO_UNMAPPED;
}
- }
+ } else
+ bp->bio_data = base;
csw->d_strategy(bp);
if (uio->uio_rw == UIO_READ)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Aug 15, 4:24 AM (9 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36774981
Default Alt Text
D26783.id78235.diff (1 KB)
Attached To
Mode
D26783: physio: Don't store user addresses in bio_data
Attached
Detach File
Event Timeline
Log In to Comment