This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.17-528-g4779250
- From: roland at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 12 Apr 2013 20:11:34 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.17-528-g4779250
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 477925062fd2fb720c54a17d15f512247860e34a (commit)
from 8fc1bee546c01b2b6975e4cb07be70cc531aa754 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=477925062fd2fb720c54a17d15f512247860e34a
commit 477925062fd2fb720c54a17d15f512247860e34a
Author: Roland McGrath <roland@hack.frob.com>
Date: Fri Apr 12 13:11:20 2013 -0700
BZ#15361: Make aio_fsync not check open modes.
diff --git a/ChangeLog b/ChangeLog
index 9757623..96be3ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2013-04-12 Roland McGrath <roland@hack.frob.com>
+ Xavier Roche <roche+kml2@exalead.com>
+
+ [BZ #15361]
+ * sysdeps/pthread/aio_fsync.c (aio_fsync): Don't check open modes,
+ just that it's a file descriptor.
+ * manual/llio.texi (Synchronizing AIO Operations): Update description
+ for EBADF error from aio_fsync.
+
2013-04-12 Siddhesh Poyarekar <siddhesh@redhat.com>
* Rules (bench): Move target definition...
diff --git a/NEWS b/NEWS
index 66efb82..e2d71be 100644
--- a/NEWS
+++ b/NEWS
@@ -14,7 +14,7 @@ Version 2.18
14920, 14964, 14981, 14982, 14985, 14994, 14996, 15003, 15006, 15020,
15023, 15036, 15054, 15055, 15062, 15078, 15160, 15214, 15232, 15234,
15283, 15285, 15287, 15304, 15305, 15307, 15309, 15327, 15330, 15335,
- 15336, 15337, 15342, 15346.
+ 15336, 15337, 15342, 15346, 15361.
* CVE-2013-0242 Buffer overrun in regexp matcher has been fixed (Bugzilla
#15078).
diff --git a/manual/llio.texi b/manual/llio.texi
index 90bd2d7..b129cf4 100644
--- a/manual/llio.texi
+++ b/manual/llio.texi
@@ -2320,8 +2320,7 @@ successfully enqueued. Otherwise the return value is @math{-1} and
@item EAGAIN
The request could not be enqueued due to temporary lack of resources.
@item EBADF
-The file descriptor @code{aiocbp->aio_fildes} is not valid or not open
-for writing.
+The file descriptor @code{@var{aiocbp}->aio_fildes} is not valid.
@item EINVAL
The implementation does not support I/O synchronization or the @var{op}
parameter is other than @code{O_DSYNC} and @code{O_SYNC}.
diff --git a/sysdeps/pthread/aio_fsync.c b/sysdeps/pthread/aio_fsync.c
index 79b3583..1e5a258 100644
--- a/sysdeps/pthread/aio_fsync.c
+++ b/sysdeps/pthread/aio_fsync.c
@@ -36,17 +36,14 @@
int
aio_fsync (int op, struct aiocb *aiocbp)
{
- int flags;
-
if (op != O_DSYNC && __builtin_expect (op != O_SYNC, 0))
{
__set_errno (EINVAL);
return -1;
}
- flags = fcntl (aiocbp->aio_fildes, F_GETFL);
- if (__builtin_expect (flags == -1, 0)
- || __builtin_expect ((flags & O_ACCMODE) == O_RDONLY, 0))
+ /* Verify that this is an open file descriptor. */
+ if (__glibc_unlikely (fcntl (aiocbp->aio_fildes, F_GETFL) == -1))
{
__set_errno (EBADF);
return -1;
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 9 +++++++++
NEWS | 2 +-
manual/llio.texi | 3 +--
sysdeps/pthread/aio_fsync.c | 7 ++-----
4 files changed, 13 insertions(+), 8 deletions(-)
hooks/post-receive
--
GNU C Library master sources