Received: by 2002:a19:651b:0:0:0:0:0 with SMTP id z27csp3659044lfb; Mon, 9 May 2022 01:02:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqct1URDlOlkauLNtvTQJrlL3X0WDui9hWXJHUoLpdNfdA8nUJG4aYMOuo3VSKyvN+g89x X-Received: by 2002:a17:90a:8d82:b0:1d2:cd8c:ed6 with SMTP id d2-20020a17090a8d8200b001d2cd8c0ed6mr16919532pjo.63.1652083336417; Mon, 09 May 2022 01:02:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652083336; cv=none; d=google.com; s=arc-20160816; b=ypDbrH0YivGH5m2x4dsbYNlrWBWGsjr6jtA0C9/J59LMqdDRqlInESBMPKFECc6Znt couC7sIzEMokYLBPbfrihsxNk0qPb1DgqPuF76m84Avsc1E77tjQ2lmlh5aRG4VSu2wF Y0XJCTI9zX8EQFvcAfxPImbkqOxJyYUnM88r0ite+QnWnd+l0E8KYL8O3mb07AruL/d3 4PAxSKggedmWeRKeOZhC8i9AAEdaR9DOAf/LBfUu13gUSyrWnT5Ze0NOi+WTFKQPD24U 6oKcnlU1XSnaKdiF9W8QInzYGsk1PQW68iy2TA9QFKn+J+4ehz+lJc3YgKhru8wFy0PP aMtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ygWgolZv0vpFbsXb9qRTpWXxJ3LS36RLc/Ro0DAsCd8=; b=AnBU8/9dn7X5zIdb8PIB/HQiJxLIvjEnzvPhIEZBPW5X4ivchDw5c4xdSS9/1MLT+9 JqpCfV98EzHB67szHDhynNyiVz5WrPo5p3O48PWhxDuIi3GroSPXv5vkNSKT5v4cyW1q o1aVZGf4QMlgLdMQ8dTg2sk3uHie7g0yPlENBUlhaR5OeAFqz02oQornLY0mZwg4QfVA nJDf+ozPVrhOQsxh5zo0Ign6M4+pqG0hJw1QzgUDjcOWkYbiEmWjgN6HQ01e4cvb1sxy uNxLtJGSdtzgiqu0DX6NBloQHkUDJek/IucQ0Z+2Q9XhhQbZ1+rg+xt+XW9psml7ZlYb nyFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YUGiQ+r1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id n1-20020a170902f60100b00153b2d16657si11053810plg.607.2022.05.09.01.02.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 01:02:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YUGiQ+r1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4C1951D3D0E; Mon, 9 May 2022 00:52:24 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352137AbiEENMY (ORCPT + 99 others); Thu, 5 May 2022 09:12:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230308AbiEENMX (ORCPT ); Thu, 5 May 2022 09:12:23 -0400 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BD3D5643F; Thu, 5 May 2022 06:08:43 -0700 (PDT) Received: by mail-pf1-x42d.google.com with SMTP id x52so3592445pfu.11; Thu, 05 May 2022 06:08:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ygWgolZv0vpFbsXb9qRTpWXxJ3LS36RLc/Ro0DAsCd8=; b=YUGiQ+r1PwViVgJIpKNS9sjK5Sl5tGqSNWQ3nBGzVihmoy8DVQnZDQnr/+R1ye3f1t nUrdHk7eZnC2r+o+sV1pgnDNZJK1qdT4GBD7L6CJJtpaLz6LfRpSdYvsjTwjIJo51+Oy +Cn6Ef3aeVPzbqo8R1sSl3U9LihbWk/z0fNnneGybSMDMU5svtlMTaQG0C40d8Hg4haN 7oH9y+yZdSVTrcews7k97lQLb4fcDhMxNIII5OjQPxjQ7SW8FDTOB60v5fQCv3AJgrDO X6LsJI54hJ0NBLbv2Jl/82ItOtGmurheT3RNv63ldTkrvf7mG85Zh5JL/ubob/e7zUDP X+Pw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ygWgolZv0vpFbsXb9qRTpWXxJ3LS36RLc/Ro0DAsCd8=; b=Q2Y7rXrFHYfWfgZ2ajZZOLfakNqLewygMwifn3kQ6h1NcPmhuWfWLrGzJhMsxyaZmt 0lPb/w2o4HMDjle/TzZyTFSm3NAYHl+zEbFl3/GXUFjteHiQ8CJERjC4gXJQT3XV1jui qvO6C5Dywsd3Af/xqi8GYk3Xqzkpf8azJzmNZyI11u8vs7fnlcs+9qnOWmKOF5X0S/a7 cZFS/LBqJCCdQBYeexI6ES4vmdnZLQ79kkXbmSNS0EpGExidEFkrEgBELI4pbmXSkVtd 1qFwGMZ15ZDvvtN4XDWScVmzOfSrPx99LPJWaxHR2a6L7JDgNYO3VpF9EmsA9R1CuWF4 Q3lQ== X-Gm-Message-State: AOAM533AGHaCrhkhXt1jqWp/CKcXyyOCX9bUP6S5LKziiswljfNnkrr+ /D3YXwNQv9H1jOYstZk279Jy6NpEEBaOPjBW X-Received: by 2002:a63:89c3:0:b0:3ab:238f:134d with SMTP id v186-20020a6389c3000000b003ab238f134dmr22473029pgd.387.1651756122725; Thu, 05 May 2022 06:08:42 -0700 (PDT) Received: from localhost.localdomain ([61.16.102.75]) by smtp.gmail.com with ESMTPSA id p2-20020a1709027ec200b0015e8d4eb2d9sm1431824plb.291.2022.05.05.06.08.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 May 2022 06:08:42 -0700 (PDT) From: kerneljasonxing@gmail.com To: davem@davemloft.net, yoshfuji@linux-ipv6.org, dsahern@kernel.org, kuba@kernel.org, pabeni@redhat.com, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, kerneljasonxing@gmail.com, Jason Xing Subject: [PATCH net-next] net: use the %px format to display sock Date: Thu, 5 May 2022 21:08:26 +0800 Message-Id: <20220505130826.40914-1-kerneljasonxing@gmail.com> X-Mailer: git-send-email 2.30.1 (Apple Git-130) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jason Xing I found that the current socket address, say 000000009842d952, cannot be searched in messages because %p format function hashes and converts it into an unique identifier which is currently useless for debugging. Signed-off-by: Jason Xing --- net/ipv4/af_inet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 72fde28..b17a4d4 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -139,12 +139,12 @@ void inet_sock_destruct(struct sock *sk) sk_mem_reclaim_final(sk); if (sk->sk_type == SOCK_STREAM && sk->sk_state != TCP_CLOSE) { - pr_err("Attempt to release TCP socket in state %d %p\n", + pr_err("Attempt to release TCP socket in state %d %px\n", sk->sk_state, sk); return; } if (!sock_flag(sk, SOCK_DEAD)) { - pr_err("Attempt to release alive inet socket %p\n", sk); + pr_err("Attempt to release alive inet socket %px\n", sk); return; } -- 1.8.3.1