From 2efc9e205e0a97e042ffe01af18d86d82e4919d2 Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Thu, 30 Nov 2023 09:48:56 +0100 Subject: [PATCH] chore(pkg/driver): do not fail if /sys/kernel/debug fails to be mounted. Signed-off-by: Federico Di Pierro --- pkg/driver/type/bpf.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/driver/type/bpf.go b/pkg/driver/type/bpf.go index 11845bba6..de2e22eef 100644 --- a/pkg/driver/type/bpf.go +++ b/pkg/driver/type/bpf.go @@ -47,7 +47,9 @@ func (b *bpf) Cleanup(printer *output.Printer, _ string) error { // https://github.com/torvalds/linux/commit/c4f6699dfcb8558d138fe838f741b2c10f416cf9 printer.Logger.Info("Mounting debugfs for bpf driver.") mounter := mount.New("/bin/mount") - return mounter.Mount("debugfs", "/sys/kernel/debug", "debugfs", []string{"nodev"}) + // We don't fail if this fails; let's try to build a probe anyway. + _ = mounter.Mount("debugfs", "/sys/kernel/debug", "debugfs", []string{"nodev"}) + return nil } func (b *bpf) Load(_ *output.Printer, _ string, _ bool) error {