Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp567044pxb; Wed, 29 Sep 2021 05:21:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXglG3HNi/nQMTvqg8kJFuOvGsCcCfkq4odILUc8pzX34Y6nbxLCUYO8vDUDpl4q38bwNw X-Received: by 2002:a17:907:d87:: with SMTP id go7mr13193785ejc.46.1632918076760; Wed, 29 Sep 2021 05:21:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632918076; cv=none; d=google.com; s=arc-20160816; b=CatssB48GVULTwcs/2Cg6HcsUH2uzT6uaaRWuSYQD0LRuQmu9FX94G+TqgpdOFOiMe MImSNiLoVxtLkzRhQxLQwj+nVIoiAY33pfsDPgqDxj82ZLlCiHHAtidw6EMO60kWK+Uo +i8WJsJ5rX8ErCE2p0t0HAsc5htapXPjhBJhfOwNUIXAReZrMuyMmTFXXJSj4dPIk+SM 3BaaeN68g99fLkp3pdGbR9zmuMd8xXu7XBQL04BTLC7z2Sm7jmuCb3vDset2U4+QKvf8 XtowMA5t68Vj0/Q5dilYDAzhzygR5VRG9l6s3bpBsZTBzVGIfpU7Bk/NzKQmhqBddBcR bIVg== 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; bh=qLfOo+BkbLuZxe8y0vOPk9w+tCeo7i332ErsPpF8b1w=; b=WzW/QgVooK36icY/sxZQOP3hb3o8r4Rlg+64Y7sH15IOIJzVGxT6yyOppmNuNFtx5s An/oH+bplZzLnRWEvV8uDRofOMKpot/acm0eIFDXmbq3o97zFTyKnzO0pX/JR+T63BBl +xBvkFxekV98Or8zP6lneYVYD0K8bfKTCGDSzMGKE4vury9Q8+CbtHZOQXFof+sFzfMS 5KmG4qy9TBJPN7RG3/J/QDPu7gTCiQHbKbs+2d+zzTDb/+3imWGhLy0IQsAQcJK1EuEo /cDQKVmmFN/2ZBGlxLlkakQWqlpnxnYQ/VQUkpweMEVLeutYl1suUVkw3HU0mjnxI/LU BdCA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o1si4749118ejy.319.2021.09.29.05.20.51; Wed, 29 Sep 2021 05:21:16 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343745AbhI2MSo (ORCPT + 99 others); Wed, 29 Sep 2021 08:18:44 -0400 Received: from smtp181.sjtu.edu.cn ([202.120.2.181]:44758 "EHLO smtp181.sjtu.edu.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343797AbhI2MSP (ORCPT ); Wed, 29 Sep 2021 08:18:15 -0400 Received: from proxy02.sjtu.edu.cn (smtp188.sjtu.edu.cn [202.120.2.188]) by smtp181.sjtu.edu.cn (Postfix) with ESMTPS id 1BD701008CBC1; Wed, 29 Sep 2021 20:16:32 +0800 (CST) Received: from localhost (localhost.localdomain [127.0.0.1]) by proxy02.sjtu.edu.cn (Postfix) with ESMTP id 03F25200B5751; Wed, 29 Sep 2021 20:16:32 +0800 (CST) X-Virus-Scanned: amavisd-new at Received: from proxy02.sjtu.edu.cn ([127.0.0.1]) by localhost (proxy02.sjtu.edu.cn [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id cjxdomTFHRWG; Wed, 29 Sep 2021 20:16:31 +0800 (CST) Received: from guozhi-ipads.ipads-lab.se.sjtu.edu.cn (unknown [202.120.40.82]) (Authenticated sender: qtxuning1999@sjtu.edu.cn) by proxy02.sjtu.edu.cn (Postfix) with ESMTPSA id 17801200B574E; Wed, 29 Sep 2021 20:16:25 +0800 (CST) From: Guo Zhi To: Damien Le Moal Cc: Guo Zhi , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] drivers/ata: Fix kernel pointer leak Date: Wed, 29 Sep 2021 20:16:17 +0800 Message-Id: <20210929121618.1157415-1-qtxuning1999@sjtu.edu.cn> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Pointers should be printed with %p or %px rather than cast to 'unsigned long' and pinted with %lx Change %lx to %p to print the secured pointer. Signed-off-by: Guo Zhi --- drivers/ata/pata_atp867x.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/ata/pata_atp867x.c b/drivers/ata/pata_atp867x.c index 2bc5fc81efe3..c32b95f48e50 100644 --- a/drivers/ata/pata_atp867x.c +++ b/drivers/ata/pata_atp867x.c @@ -447,11 +447,11 @@ static int atp867x_ata_pci_sff_init_host(struct ata_host *host) #ifdef ATP867X_DEBUG atp867x_check_ports(ap, i); #endif - ata_port_desc(ap, "cmd 0x%lx ctl 0x%lx", - (unsigned long)ioaddr->cmd_addr, - (unsigned long)ioaddr->ctl_addr); - ata_port_desc(ap, "bmdma 0x%lx", - (unsigned long)ioaddr->bmdma_addr); + ata_port_desc(ap, "cmd 0x%p ctl 0x%p", + ioaddr->cmd_addr, + ioaddr->ctl_addr); + ata_port_desc(ap, "bmdma 0x%p", + ioaddr->bmdma_addr); mask |= 1 << i; } -- 2.33.0