Bug 497429
Summary: | pwritev writes ramdom junk | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Gerd Hoffmann <kraxel> | ||||||
Component: | glibc | Assignee: | Jakub Jelinek <jakub> | ||||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | urgent | Docs Contact: | |||||||
Priority: | high | ||||||||
Version: | rawhide | CC: | jakub, markmc, virt-maint | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2009-04-27 20:13:27 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 446452 | ||||||||
Attachments: |
|
Just look at the source code, it is obvious. pwritev was copyed from preadv with a simple s/read/write/. That isn't correct though, the buffer copying must be adjusted. preadv has to do (and does that correctly): * alloc buffer * pread() * copy data to iovec * free buffer pwritev has to do: * alloc buffer * copy data from iovec * pwrite() * free buffer. pwritev actually does: * alloc buffer * pwritev() <= writes random data * copy data to iovec <= fills iovec with random data * free buffer. Created attachment 341021 [details]
glibc-pwritev.patch
Patch I'm about to test.
Patch looks good to me. Nice catch Adding to F11Blocker - it doesn't affect F11 qemu, but we still shouldn't ship with a completely broken pwritev() Fix is in rpms/glibc/F-11 but not yet dist-f11: * Fri Apr 24 2009 Jakub Jelinek <jakub> 2.9.90-20 - update from trunk - fix p{read,write}v{,64} (#497429, #497434) - fix strfmon (#496386) Should be fixed in glibc-2.9.90-22. |
Created attachment 341009 [details] /usr/src/debug/glibc-20090416T1610/sysdeps/posix/pwritev.c Description of problem: __atomic_pwritev_replacement is broken. Version-Release number of selected component (if applicable): glibc-2.9.90-19 How reproducible: Grab a qemu git checkout, build it, try to use it. Don't use a valuable guest image. Actual results: pwritev writes random data. Expected results: pwritev acts as documented.