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 "".
The branch, master has been updated via bbabb79cfaf5e28ec9e804b95a23605038b39d39 (commit) from c14ec3dc896e0dd14d0491f09f81ce09e9d53bc2 (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 ----------------------------------------------------------------- commit bbabb79cfaf5e28ec9e804b95a23605038b39d39 Author: Christophe Milard christophe.milard@linaro.org Date: Mon Jan 23 09:25:23 2017 +0100
linux-gen: _ishm: checking fstat return value.
Hence fixing CID 174663 (Fixes https://bugs.linaro.org/show_bug.cgi?id=2827)
Signed-off-by: Christophe Milard christophe.milard@linaro.org Reviewed-by: Bill Fischofer bill.fischofer@linaro.org Signed-off-by: Maxim Uvarov maxim.uvarov@linaro.org
diff --git a/platform/linux-generic/_ishm.c b/platform/linux-generic/_ishm.c index 3797f20..c1efd7d 100644 --- a/platform/linux-generic/_ishm.c +++ b/platform/linux-generic/_ishm.c @@ -818,7 +818,14 @@ int _odp_ishm_reserve(const char *name, uint64_t size, int fd,
/* If a file descriptor is provided, get the real size and map: */ if (fd >= 0) { - fstat(fd, &statbuf); + if (fstat(fd, &statbuf) < 0) { + close(fd); + odp_spinlock_unlock(&ishm_tbl->lock); + ODP_ERR("_ishm_reserve failed (fstat failed: %s).\n", + strerror(errno)); + __odp_errno = errno; + return -1; + } len = statbuf.st_size; /* note that the huge page flag is meningless here as huge * page is determined by the provided file descriptor: */
-----------------------------------------------------------------------
Summary of changes: platform/linux-generic/_ishm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
hooks/post-receive