This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch glibc-2.27
in repository glibc.

commit 927a0666efe37d87dba236f971111546c117b77a
Author: Samuel Thibault <samuel.thiba...@ens-lyon.org>
Date:   Sun Jan 7 12:35:22 2018 +0000

    hurd-i386/git-pwritev.diff: Fix pwritev regression
---
 debian/changelog                          |  1 +
 debian/patches/hurd-i386/git-pwritev.diff | 26 ++++++++++++++++++++++++++
 debian/patches/series                     |  1 +
 3 files changed, 28 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 5f4f74e..906458d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -20,6 +20,7 @@ glibc (2.26.9000+20180105.a6d0afb5-0experimental1) 
UNRELEASED; urgency=medium
   * debian/patches/hurd-i386/git-glob-PATH_MAX.diff: Fix posix glob test hurd
   build.
   * debian/testsuite-xfail-debian.mk: Update for hurd-i386.
+  * debian/patches/hurd-i386/git-pwritev.diff: Fix pwritev regression.
 
   [ Aurelien Jarno ]
   * debian/control.in/main: Update Vcs-Git to point to the 2.27 branch.
diff --git a/debian/patches/hurd-i386/git-pwritev.diff 
b/debian/patches/hurd-i386/git-pwritev.diff
new file mode 100644
index 0000000..a082127
--- /dev/null
+++ b/debian/patches/hurd-i386/git-pwritev.diff
@@ -0,0 +1,26 @@
+commit 200fc24b9dd2360bc850fe71ed22410051426d96
+Author: Samuel Thibault <samuel.thiba...@ens-lyon.org>
+Date:   Sun Jan 7 13:31:36 2018 +0100
+
+    hurd: Fix pwritev*
+    
+    This follows c45d78aac ('posix: Fix generic p{read,write}v buffer 
allocation
+    (BZ#22457)'), which made pwritev to use __mmap instead of __posix_memalign,
+    but didn't pass PROT_READ to it, while the pwrite() call does need to
+    read the data we have just copied over.
+    
+            * sysdeps/posix/pwritev_common.c: Add PROT_READ to __mmap prot.
+
+diff --git a/sysdeps/posix/pwritev_common.c b/sysdeps/posix/pwritev_common.c
+index bd0f5c5257..344ab4d61b 100644
+--- a/sysdeps/posix/pwritev_common.c
++++ b/sysdeps/posix/pwritev_common.c
+@@ -55,7 +55,7 @@ PWRITEV (int fd, const struct iovec *vector, int count, 
OFF_T offset)
+      but 1. it is system specific (not meant in generic implementation), and
+      2. it would make the implementation more complex, and 3. it will require
+      another syscall (fcntl).  */
+-  void *buffer = __mmap (NULL, bytes, PROT_WRITE,
++  void *buffer = __mmap (NULL, bytes, PROT_READ | PROT_WRITE,
+                        MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+   if (__glibc_unlikely (buffer == MAP_FAILED))
+     return -1;
diff --git a/debian/patches/series b/debian/patches/series
index c43494e..2638396 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -126,6 +126,7 @@ hurd-i386/git-glob64.diff
 hurd-i386/git-hidden-def.diff
 hurd-i386/git-math-ulps-i386-update.diff
 hurd-i386/git-glob-PATH_MAX.diff
+hurd-i386/git-pwritev.diff
 
 i386/local-biarch.diff
 i386/unsubmitted-quiet-ldconfig.diff

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-glibc/glibc.git

Reply via email to