diff options
| author | Khem Raj <raj.khem@gmail.com> | 2020-01-15 20:28:13 -0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2020-01-15 23:17:45 -0800 |
| commit | c1c52cc582edc48fe9b38b9c7b72642b88f035bd (patch) | |
| tree | 2f263de95c90d95a2e310336dda89cf0d0a325b0 | |
| parent | 739bcd18df045406ded3150ee0518c91332c9e47 (diff) | |
| download | meta-openembedded-c1c52cc582edc48fe9b38b9c7b72642b88f035bd.tar.gz | |
libhugetlbfs: Fix missing file mode in create() API
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-benchmark/libhugetlbfs/files/0001-tests-add-explicit-permissions-to-open-call.patch | 41 | ||||
| -rw-r--r-- | meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb | 1 |
2 files changed, 42 insertions, 0 deletions
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-tests-add-explicit-permissions-to-open-call.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-tests-add-explicit-permissions-to-open-call.patch new file mode 100644 index 0000000000..9d52b908e9 --- /dev/null +++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-tests-add-explicit-permissions-to-open-call.patch | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | From d07d2f9601b49bb72cd4b36838f0c238bd1b0fc1 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Wed, 15 Jan 2020 18:45:09 -0800 | ||
| 4 | Subject: [PATCH] tests: add explicit permissions to open() call | ||
| 5 | |||
| 6 | Fixes | ||
| 7 | gethugepagesizes.c:227:35: error: open with O_CREAT in second argument needs 3 arguments | ||
| 8 | | fd = open(fname, O_WRONLY|O_CREAT); | ||
| 9 | | ^ | ||
| 10 | |||
| 11 | Upstream-Status: Submitted [https://groups.google.com/forum/#!topic/libhugetlbfs/anNtDXbQKro] | ||
| 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 13 | --- | ||
| 14 | tests/gethugepagesizes.c | 4 ++-- | ||
| 15 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/tests/gethugepagesizes.c b/tests/gethugepagesizes.c | ||
| 18 | index 9551b38..5777265 100644 | ||
| 19 | --- a/tests/gethugepagesizes.c | ||
| 20 | +++ b/tests/gethugepagesizes.c | ||
| 21 | @@ -223,7 +223,7 @@ void setup_fake_data(long sizes[], int n_elem) | ||
| 22 | FAIL("mkdtemp: %s", strerror(errno)); | ||
| 23 | |||
| 24 | sprintf(fname, "%s/meminfo-none", fake_meminfo); | ||
| 25 | - fd = open(fname, O_WRONLY|O_CREAT); | ||
| 26 | + fd = open(fname, O_WRONLY|O_CREAT, 0600); | ||
| 27 | if (fd < 0) | ||
| 28 | FAIL("open: %s", strerror(errno)); | ||
| 29 | if (write(fd, meminfo_base, | ||
| 30 | @@ -233,7 +233,7 @@ void setup_fake_data(long sizes[], int n_elem) | ||
| 31 | FAIL("close: %s", strerror(errno)); | ||
| 32 | |||
| 33 | sprintf(fname, "%s/meminfo-hugepages", fake_meminfo); | ||
| 34 | - fd = open(fname, O_WRONLY|O_CREAT); | ||
| 35 | + fd = open(fname, O_WRONLY|O_CREAT, 0600); | ||
| 36 | if (fd < 0) | ||
| 37 | FAIL("open: %s", strerror(errno)); | ||
| 38 | if (write(fd, meminfo_base, | ||
| 39 | -- | ||
| 40 | 2.25.0 | ||
| 41 | |||
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb index f258122790..e66db1a090 100644 --- a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb +++ b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb | |||
| @@ -24,6 +24,7 @@ SRC_URI = " \ | |||
| 24 | file://0004-shm.c-Mark-glibc-specific-changes-so.patch \ | 24 | file://0004-shm.c-Mark-glibc-specific-changes-so.patch \ |
| 25 | file://0005-Include-dirent.h-for-ino_t.patch \ | 25 | file://0005-Include-dirent.h-for-ino_t.patch \ |
| 26 | file://0006-include-limits.h-for-PATH_MAX.patch \ | 26 | file://0006-include-limits.h-for-PATH_MAX.patch \ |
| 27 | file://0001-tests-add-explicit-permissions-to-open-call.patch \ | ||
| 27 | " | 28 | " |
| 28 | 29 | ||
| 29 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)" | 30 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)" |
