From 7a6e97b09634767b401a15eef5837c03a8559c1c Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Thu, 30 Jul 2015 22:53:00 +0300 Subject: [PATCH] sk-unix: Add more verbosity to error paths Signed-off-by: Cyrill Gorcunov Signed-off-by: Pavel Emelyanov --- sk-unix.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sk-unix.c b/sk-unix.c index 75513e572..ffcdda004 100644 --- a/sk-unix.c +++ b/sk-unix.c @@ -188,16 +188,22 @@ static int resolve_rel_name(struct unix_sk_desc *sk, const struct fd_parms *p) if (task->pid.real == p->pid) break; } - if (!task) + if (!task) { + pr_err("Can't find task with pid %d\n", p->pid); return -ENOENT; + } ns = lookup_ns_by_id(task->ids->mnt_ns_id, &mnt_ns_desc); - if (!ns) + if (!ns) { + pr_err("Can't resolve mount namespace for pid %d\n", p->pid); return -ENOENT; + } mntns_root = mntns_get_root_fd(ns); - if (mntns_root < 0) + if (mntns_root < 0) { + pr_err("Can't resolve fs root for pid %d\n", p->pid); return -ENOENT; + } pr_debug("Resolving relative name %s for socket %x\n", sk->name, sk->sd.ino);