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:11 +0000 (12:26 -0500)
commitb1fdcb19f150295c9db01ac6a52b95e627cb8903
tree16c615c97c6ee9c66aaf2a431669e1c358156e8a
parentcc584d6692836e86ca05df7cf58a1873b11fca56
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
include/instrumentation/events/writeback.h
This page took 0.026528 seconds and 4 git commands to generate.