From: Bin Meng Date: Sat, 17 Jun 2017 06:36:00 -0700 Subject: [U-Boot] [PATCH 3/3] cmd: scsi: Fix null pointer dereference in 'scsi reset' In-Reply-To: <1497706560-23385-1-git-send-email-bmeng.cn@gmail.com> References: <1497706560-23385-1-git-send-email-bmeng.cn@gmail.com> Message-ID: <1497706560-23385-3-git-send-email-bmeng.cn@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de During 'scsi reset', scsi_bus_reset() is called with udevice pointed to NULL, which causes exception. As a temporary fix, disable the call for DM SCSI for now. Signed-off-by: Bin Meng --- cmd/scsi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/scsi.c b/cmd/scsi.c index 5709718..8e36de1 100644 --- a/cmd/scsi.c +++ b/cmd/scsi.c @@ -36,7 +36,9 @@ static int do_scsi(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) case 2: if (strncmp(argv[1], "res", 3) == 0) { printf("\nReset SCSI\n"); +#ifndef CONFIG_DM_SCSI scsi_bus_reset(NULL); +#endif ret = scsi_scan(true); if (ret) return CMD_RET_FAILURE; -- 2.9.2