Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F725C433F5 for ; Wed, 24 Nov 2021 13:11:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345616AbhKXNPF (ORCPT ); Wed, 24 Nov 2021 08:15:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:53882 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348004AbhKXNMY (ORCPT ); Wed, 24 Nov 2021 08:12:24 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6A0C46140D; Wed, 24 Nov 2021 12:42:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1637757757; bh=K/XMC/1eGJD8Ny3WM6Yf8Gse2GhSI96Vpk6Ju+DMte8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=spLFCU97B68A6yRPQjzF4GCYG3/YC4i4sYTjwuEqoFJVzRRYqoVVSW0160pkm89xG dpz7O5/XtDv2EX2nJd7TYPoRWfQk0k327nE18h5a6KQrT5q6Np3AAyHCfha/UKtrcG UN5UFwXrwHOkQi/AbTab7TvFPmYBPpy9Bu/qX7XA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guo Zhi , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.19 267/323] scsi: advansys: Fix kernel pointer leak Date: Wed, 24 Nov 2021 12:57:37 +0100 Message-Id: <20211124115727.891635360@linuxfoundation.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211124115718.822024889@linuxfoundation.org> References: <20211124115718.822024889@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 d4996c6eac4c81b8872043e9391563f67f13e406 ] Pointers should be printed with %p or %px rather than cast to 'unsigned long' and printed with %lx. Change %lx to %p to print the hashed pointer. Link: https://lore.kernel.org/r/20210929122538.1158235-1-qtxuning1999@sjtu.edu.cn Signed-off-by: Guo Zhi Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/advansys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index 713f69033f201..2856b0ce7ab9a 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c @@ -3370,8 +3370,8 @@ static void asc_prt_adv_board_info(struct seq_file *m, struct Scsi_Host *shost) shost->host_no); seq_printf(m, - " iop_base 0x%lx, cable_detect: %X, err_code %u\n", - (unsigned long)v->iop_base, + " iop_base 0x%p, cable_detect: %X, err_code %u\n", + v->iop_base, AdvReadWordRegister(iop_base,IOPW_SCSI_CFG1) & CABLE_DETECT, v->err_code); -- 2.33.0