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 6B5B8C433F5 for ; Wed, 24 Nov 2021 13:47:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351675AbhKXNuH (ORCPT ); Wed, 24 Nov 2021 08:50:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:37522 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351228AbhKXNpK (ORCPT ); Wed, 24 Nov 2021 08:45:10 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id BD661611ED; Wed, 24 Nov 2021 13:00:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1637758828; bh=ZBIK6J5npJcrFTkgN975QVvI6xgANw5+dvbOmoJvGJw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0uuPGzSZrM3rU6Zaa1Wi67AJa6Tt9s73k+XKvYz2ZZ7EliLxBV5J6W8m47s2tdJnx k5Mhi5J10WmAsPQ0BKaEtD6/WRmxnead3UyZBwI+B79EtbKbSgrB4RuW+jYTSbRIjd 0ldyaw9IecjIJiUC8XWdR4fjgOkJq+bUuB2hC+Hw= 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 5.15 042/279] scsi: advansys: Fix kernel pointer leak Date: Wed, 24 Nov 2021 12:55:29 +0100 Message-Id: <20211124115720.185368503@linuxfoundation.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211124115718.776172708@linuxfoundation.org> References: <20211124115718.776172708@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 ffb3919675734..97be0765cb9bd 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c @@ -3308,8 +3308,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