harry
2005-Nov-07 11:19 UTC
[Xen-devel] [PATCH] fast_flush_area in blkback.c still broken after 55194bd55b86
I think you need this patch otherwise you will be passing uninitialised data from the stack to GNTTABOP_unmap_grant_ref in fast_flush_area. Also, I think the memset of the pending_grant_handles array should happen before you start using them so I moved it to before blkif_xenbus_init. I''m not sure if this is necessary or it might possibly have to go even earlier. Signed off by Harry Butterworth butterwo@uk.ibm.com. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2005-Nov-07 12:01 UTC
Re: [Xen-devel] [PATCH] fast_flush_area in blkback.c still broken after 55194bd55b86
On 7 Nov 2005, at 11:19, harry wrote:> I think you need this patch otherwise you will be passing uninitialised > data from the stack to GNTTABOP_unmap_grant_ref in fast_flush_area. > > Also, I think the memset of the pending_grant_handles array should > happen before you start using them so I moved it to before > blkif_xenbus_init. I''m not sure if this is necessary or it might > possibly have to go even earlier.Two good catches. In fact the initialisation of pending_grant_handles was more seriously broken -- the use of memset was bogus since the array elements are u16''s not u8''s. So only half the array was being initialised, and high byte of the initialiser value was discarded. Where do we find these programmers.... :-) -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Possibly Parallel Threads
- Bug in use of grant tables in blkback.c error path?
- [PATCH RFC 09/12] xen-blkback: move pending handles list from blkbk to pending_req
- [PATCH] blktap: ensure vma->vm_mm''s mmap_sem is being held whenever it is being modified
- [PATCH][5/17] USB virt 2.6 split driver---concrete local buffer reference types
- [PATCH][14/17] REV 2 USB virt 2.6 split driver---USB interdomain protocol