Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3795641pxb; Mon, 4 Oct 2021 09:46:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzpH+2KM7/m6Z4zCykB7Z9WdApjA6BvdEFjJ6kaz6js5JixFTXSJhnb4tQlIr4cTMVhaI/ X-Received: by 2002:a17:906:69d4:: with SMTP id g20mr15340884ejs.556.1633365963308; Mon, 04 Oct 2021 09:46:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633365963; cv=none; d=google.com; s=arc-20160816; b=ZFudEhqqE9ZhGOpF5Njf+jWWP1XE2PoJI2ELPoZ+ajL+6PV2TpG3n63cVLDYqilK71 OdovH80DU9QwXBQMxnQFh9u2kkky+XNdJxloEjHiXcKIJ0gqPy3TISyIxS7Yt55GIDzO lW6mKLDiQkBcWXpqhY8hbyyuKoTlVl0c+Gm3Vzv3BAoUYTfySPfCZ+Ab469mFWf0q/N7 lido8ZpldqQ5n4pOikJk0AyvfJJAp1qiFNz9SrK4s3K2WPO8JOOiyC7MVLKvFE831vic FJD4OYX7CuHcSokbPFVTuTP+C4DkdJPRwgb7l1sGurVd67cS6Uume9A18XrVmGw0uVa3 Iigw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=g3/rezEnhBrjQtb8tF8ctUFFtxBOtRwerPZG0QgRnog=; b=OFQ2mJkNoKDHLlXhvAjMvcKFTH3y8m7T+Yuysvm1TJ87NvyJXkkPcKyXczRQZHdXH9 R13gRSaqs903eDwAaT6/ReXoJhpMwbcQPJbK+Qqd6334nHC/gJTBqvta0vLRHa74dN+7 UUWPumIL+QwK6gnz3jbWmrCWV59Ag2i8Q7JDwAQIEhNxkorwVWgLN+4AWwE6x5aoWsge ESuvhlLOD7O/+N7dhKgQErzi+AfjG28SfGvpB7PNVRV5RqUWKMkG8hoVvjYqulkRx5VW VnVl/icFyC/4X+cRy8LNDWm8gqPdPqGncKwmYHWYk6BAaQvLT8QMa1tLMZlWSYhsw+cF +c3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wx3EdizO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 21si19698732eji.148.2021.10.04.09.45.26; Mon, 04 Oct 2021 09:46:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wx3EdizO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237668AbhJDNjB (ORCPT + 99 others); Mon, 4 Oct 2021 09:39:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:51590 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237661AbhJDNgm (ORCPT ); Mon, 4 Oct 2021 09:36:42 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EFF2D610E6; Mon, 4 Oct 2021 13:16:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1633353391; bh=ObyYr/T3LldMQWcSAsAnkg/1dktYyCdE4mCtWmOzInc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wx3EdizOTSJpyPxp53wEopIkxlTvCDX1p3t0qLNLcNmMzXnLnfkO2An/RaVxHqMay GNWZldBhJ/kY2itf5UMvvc/HHe0vFonpxYGJ5qs0ArVumfeFe/LiGYYh9ddvpdX5iw dUCv1GVr0ANOBcLWSQwOlF9eV+A91AcmDn/r7/YE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guo Zhi , Mike Marciniszyn , Jason Gunthorpe , Sasha Levin Subject: [PATCH 5.14 111/172] RDMA/hfi1: Fix kernel pointer leak Date: Mon, 4 Oct 2021 14:52:41 +0200 Message-Id: <20211004125048.569275138@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211004125044.945314266@linuxfoundation.org> References: <20211004125044.945314266@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Guo Zhi [ Upstream commit 7d5cfafe8b4006a75b55c2f1fdfdb363f9a5cc98 ] Pointers should be printed with %p or %px rather than cast to 'unsigned long long' and printed with %llx. Change %llx to %p to print the secured pointer. Fixes: 042a00f93aad ("IB/{ipoib,hfi1}: Add a timeout handler for rdma_netdev") Link: https://lore.kernel.org/r/20210922134857.619602-1-qtxuning1999@sjtu.edu.cn Signed-off-by: Guo Zhi Acked-by: Mike Marciniszyn Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/hfi1/ipoib_tx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/hw/hfi1/ipoib_tx.c b/drivers/infiniband/hw/hfi1/ipoib_tx.c index 993f9838b6c8..e1fdeadda437 100644 --- a/drivers/infiniband/hw/hfi1/ipoib_tx.c +++ b/drivers/infiniband/hw/hfi1/ipoib_tx.c @@ -873,14 +873,14 @@ void hfi1_ipoib_tx_timeout(struct net_device *dev, unsigned int q) struct hfi1_ipoib_txq *txq = &priv->txqs[q]; u64 completed = atomic64_read(&txq->complete_txreqs); - dd_dev_info(priv->dd, "timeout txq %llx q %u stopped %u stops %d no_desc %d ring_full %d\n", - (unsigned long long)txq, q, + dd_dev_info(priv->dd, "timeout txq %p q %u stopped %u stops %d no_desc %d ring_full %d\n", + txq, q, __netif_subqueue_stopped(dev, txq->q_idx), atomic_read(&txq->stops), atomic_read(&txq->no_desc), atomic_read(&txq->ring_full)); - dd_dev_info(priv->dd, "sde %llx engine %u\n", - (unsigned long long)txq->sde, + dd_dev_info(priv->dd, "sde %p engine %u\n", + txq->sde, txq->sde ? txq->sde->this_idx : 0); dd_dev_info(priv->dd, "flow %x\n", txq->flow.as_int); dd_dev_info(priv->dd, "sent %llu completed %llu used %llu\n", -- 2.33.0