dovecot-2.2: lib: Fix hang in safe_sendfile on SmartOS
dovecot at dovecot.org
dovecot at dovecot.org
Mon Sep 7 19:23:21 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/c6554cb1961d
changeset: 19114:c6554cb1961d
user: Sebastian Wiedenroth <sebastian.wiedenroth at skylime.net>
date: Thu Jul 16 14:41:24 2015 +0200
description:
lib: Fix hang in safe_sendfile on SmartOS
The call to sendfile on SmartOS can fail with EOPNOTSUPP. This is a valid
error code and documented in the man page. This error code needs to be
handled or else dovecot will retry the sendfile call endlessly and hang.
diffstat:
src/lib/sendfile-util.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r fae5feef70af -r c6554cb1961d src/lib/sendfile-util.c
--- a/src/lib/sendfile-util.c Mon Sep 07 22:14:18 2015 +0300
+++ b/src/lib/sendfile-util.c Thu Jul 16 14:41:24 2015 +0200
@@ -116,7 +116,7 @@
if (errno == EINVAL) {
/* most likely trying to read past EOF */
ret = 0;
- } else if (errno == EAFNOSUPPORT) {
+ } else if (errno == EAFNOSUPPORT || errno == EOPNOTSUPP) {
/* not supported, return Linux-like EINVAL so caller
sees only consistent errnos. */
errno = EINVAL;
More information about the dovecot-cvs
mailing list