summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorDiego Sueiro <diego.sueiro@gmail.com>2014-02-14 10:40:58 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-14 12:30:30 +0000
commitf0b1753b90ea6e2f34228d092fcef682d94dd1a0 (patch)
tree4163b68c7a4947f6e1e9becc9482d1b9d276b947 /meta
parent97c9163d97911dad0afcd0dae39e5c426e27e921 (diff)
downloadpoky-f0b1753b90ea6e2f34228d092fcef682d94dd1a0.tar.gz
systemd: journald fix ignored disk space restrictions
The upstream bug report can be seen at: [Systemd #68161] -- https://bugs.freedesktop.org/show_bug.cgi?id=68161 This backports patches come from 207 and need to address this in the 206 version for dora branch. (From OE-Core rev: 07df3db5dd62e793770af6e47ea2f830272e8afc) Signed-off-by: Diego Sueiro <diego.sueiro@gmail.com> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/systemd/systemd/journald-fix-fd-leak-in-journal_file_empty.patch27
-rw-r--r--meta/recipes-core/systemd/systemd/journald-fix-vacuuming-of-archived-journals.patch37
-rw-r--r--meta/recipes-core/systemd/systemd_206.bb2
3 files changed, 66 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/journald-fix-fd-leak-in-journal_file_empty.patch b/meta/recipes-core/systemd/systemd/journald-fix-fd-leak-in-journal_file_empty.patch
new file mode 100644
index 0000000000..a83c858b2a
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/journald-fix-fd-leak-in-journal_file_empty.patch
@@ -0,0 +1,27 @@
1journald: fix fd leak in journal_file_empty
2Before my previous patch, journal_file_empty wasn't be called with the
3correct filename. Now that it's being called with the correct filename
4it leaks file descriptors. This patch closes the file descriptors before
5returning.
6
7Signed-off-by: George McCollister <george.mccollister@gmail.com>
8
9
10Index: systemd-206/src/journal/journal-vacuum.c
11===================================================================
12--- systemd-206.orig/src/journal/journal-vacuum.c 2013-07-21 19:43:28.146183128 -0300
13+++ systemd-206/src/journal/journal-vacuum.c 2014-01-29 20:43:27.492343295 -0200
14@@ -129,9 +129,9 @@
15 }
16
17 static int journal_file_empty(int dir_fd, const char *name) {
18- int fd, r;
19+ int r;
20 le64_t n_entries;
21-
22+ _cleanup_close_ int fd;
23 fd = openat(dir_fd, name, O_RDONLY|O_CLOEXEC|O_NOFOLLOW|O_NONBLOCK);
24 if (fd < 0)
25 return -errno;
26
27Upstream-Status: Backport [207]
diff --git a/meta/recipes-core/systemd/systemd/journald-fix-vacuuming-of-archived-journals.patch b/meta/recipes-core/systemd/systemd/journald-fix-vacuuming-of-archived-journals.patch
new file mode 100644
index 0000000000..7c59200999
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/journald-fix-vacuuming-of-archived-journals.patch
@@ -0,0 +1,37 @@
1journald: fix vacuuming of archived journals
2d_name is modified on line 227 so if the entire journal name is needed
3again p must be used. Before this change when journal_file_empty was called
4on archived journals it would always return with -2.
5
6Signed-off-by: George McCollister <george.mccollister@gmail.com>
7
8Index: systemd-206/src/journal/journal-vacuum.c
9===================================================================
10--- systemd-206.orig/src/journal/journal-vacuum.c 2014-01-29 20:43:27.492343295 -0200
11+++ systemd-206/src/journal/journal-vacuum.c 2014-01-29 20:48:55.076356876 -0200
12@@ -265,18 +265,18 @@
13 /* We do not vacuum active files or unknown files! */
14 continue;
15
16- if (journal_file_empty(dirfd(d), de->d_name)) {
17+ if (journal_file_empty(dirfd(d), p)) {
18
19 /* Always vacuum empty non-online files. */
20
21- if (unlinkat(dirfd(d), de->d_name, 0) >= 0)
22- log_debug("Deleted empty journal %s/%s.", directory, de->d_name);
23+ if (unlinkat(dirfd(d), p, 0) >= 0)
24+ log_debug("Deleted empty journal %s/%s.", directory, p);
25 else if (errno != ENOENT)
26- log_warning("Failed to delete %s/%s: %m", directory, de->d_name);
27+ log_warning("Failed to delete %s/%s: %m", directory, p);
28 continue;
29 }
30
31- patch_realtime(directory, de->d_name, &st, &realtime);
32+ patch_realtime(directory, p, &st, &realtime);
33
34 GREEDY_REALLOC(list, n_allocated, n_list + 1);
35
36
37Upstream-Status: Backport [207]
diff --git a/meta/recipes-core/systemd/systemd_206.bb b/meta/recipes-core/systemd/systemd_206.bb
index a1a8bd7ceb..e7d0f1f05e 100644
--- a/meta/recipes-core/systemd/systemd_206.bb
+++ b/meta/recipes-core/systemd/systemd_206.bb
@@ -21,6 +21,8 @@ SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \
21 file://0001-use-CAP_MKNOD-ConditionCapability.patch \ 21 file://0001-use-CAP_MKNOD-ConditionCapability.patch \
22 file://0001-Use-bin-mkdir-instead-of-host-mkdir-path.patch \ 22 file://0001-Use-bin-mkdir-instead-of-host-mkdir-path.patch \
23 file://binfmt-install.patch \ 23 file://binfmt-install.patch \
24 file://journald-fix-fd-leak-in-journal_file_empty.patch \
25 file://journald-fix-vacuuming-of-archived-journals.patch \
24 file://touchscreen.rules \ 26 file://touchscreen.rules \
25 ${UCLIBCPATCHES} \ 27 ${UCLIBCPATCHES} \
26 file://00-create-volatile.conf \ 28 file://00-create-volatile.conf \