[CRIU] [PATCH 4/6] sk-packet: print an error if lookup failed

Andrey Vagin avagin at openvz.org
Wed Mar 27 15:51:01 EDT 2013


Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 sk-packet.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sk-packet.c b/sk-packet.c
index dafd081..3e3c6ec 100644
--- a/sk-packet.c
+++ b/sk-packet.c
@@ -152,8 +152,10 @@ static int dump_one_packet_fd(int lfd, u32 id, const struct fd_parms *p)
 	int i, ret;
 
 	sd = (struct packet_sock_desc *)lookup_socket(p->stat.st_ino, PF_PACKET);
-	if (sd == NULL)
+	if (sd == NULL) {
+		pr_err("Can't find packet socket %lu\n", p->stat.st_ino);
 		return -1;
+	}
 
 	pr_info("Dumping packet socket fd %d id %#x\n", lfd, id);
 	BUG_ON(sd->sd.already_dumped);
-- 
1.7.11.7



More information about the CRIU mailing list