fix: memcg: fix a crash in wb_workfn when a device disappears (5.6)
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 10 Feb 2021 16:45:42 +0000 (11:45 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 10 Feb 2021 17:26:35 +0000 (12:26 -0500)
commit43b2b999b5f184f3b42c8c9c790f46ee794a894c
treeba2e9d3779fcdde21d38608b88c89df9f3c21efe
parent8422e3c708da197948ecff9f0e13173b1fa09053
fix: memcg: fix a crash in wb_workfn when a device disappears (5.6)

See upstream commit:

commit 68f23b89067fdf187763e75a56087550624fdbee
("memcg: fix a crash in wb_workfn when a device disappears")

It is currently backported into stable branches 5.4 and 5.5, but appears
to be missing from the 4.4, 4.9, 4.14, 4.19 LTS branches.

Implement our own lttng_bdi_dev_name wrapper to provide this fix on
builds against stable kernels which do not have this fix.

There is one user-visible change with this commit: for builds against
kernels < 4.4.0, the writeback_work_class events did use the
default_backing_dev_info to handle cases where the device is NULL,
writing "default" into the trace. This behavior is now aligned to
match what is done in kernels >= 4.4.0, which is to write "(unknown)"
into the name field.

Link: https://lore.kernel.org/r/537870616.15400.1612973059419.JavaMail.zimbra@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I0823643aa2f9d4c2b9f2005748a2adfd4457979a
instrumentation/events/lttng-module/writeback.h
This page took 0.026238 seconds and 4 git commands to generate.