Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4758380ybp; Mon, 7 Oct 2019 13:31:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrsY7aFsOJkjB4GluMfYltFhd77NWynYEferxnDTk/g5dVAJYs6TkfXEobdcVxfz1uAFAX X-Received: by 2002:a17:906:4d08:: with SMTP id r8mr11793095eju.283.1570480295550; Mon, 07 Oct 2019 13:31:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570480295; cv=none; d=google.com; s=arc-20160816; b=LPaLjp808nlu5MSILK16uMt89Y6isY6p4GNPoXorWlOhglPjvISqGsgbpbdtDmDzwR 9l7mnmhRRY9O9qvGNVOvX6KP0b/IvyeUXxp4JqsYPOt1FaOFKzVbMS60fMNpLghAG4DQ C7717gHSpMGmZVv9y92nq1FF2sMpVXK/VHMlnFYAhEjlmbFmA6kV86YIhiphH/4UR8g+ MWR6bANsHz7s+EkZ56mZ0oVSYksIsijmsOho304LAvUyut0lWmN8mLVZjb0ltQuOrUMr ZExmL5E8UFgXrfTxKUyNEPaYavOibuIzK9ZqMFk7SpisTximSYUZ6Zjz7Ekh/G9PeyN8 BXJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:subject:message-id:date:from :mime-version:ironport-phdr:ironport-sdr:dkim-signature; bh=55dhnuYmVazkQySeH4LJMqj3qTpKbtoaQ6fsEhqhvMQ=; b=D3fgNy2tgRtAXLlUV7iU9DWhaf7SRmYkqeDVGt0OOPSi+00gkvlFCweLFgUbhm4AlN 9AJ56qLtABdfOFdNC45NihOLTxL43r6UaG8GOtfdKXKYoG8MvtC5fn8cpGw2qaa4pzfK vdlDhF07BRXswedW+Mlhzh3+O6Cm+Gaay+mKVKI2Gv2xKsm1I3EyKsj7BP1jDI9w28HV qwTk9yrriT0lkr2ciNUbeBfM6UlfwvEtyvY9PLjTiGlp7k0Cn2G8LXyz+4txoulapIxm xAqzEjnt/w240/mYc621VWgEQRoDwZLgiNGSqXn/9Nov370ZG+b7+f3bXTslXUB8i8RT 9Fow== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@ucr.edu header.s=selector3 header.b=AhGntN+i; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ucr.edu Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j24si8374966edt.259.2019.10.07.13.31.12; Mon, 07 Oct 2019 13:31:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@ucr.edu header.s=selector3 header.b=AhGntN+i; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ucr.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728992AbfJGUaU (ORCPT + 99 others); Mon, 7 Oct 2019 16:30:20 -0400 Received: from mx6.ucr.edu ([138.23.62.71]:30153 "EHLO mx6.ucr.edu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728187AbfJGUaT (ORCPT ); Mon, 7 Oct 2019 16:30:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ucr.edu; i=@ucr.edu; q=dns/txt; s=selector3; t=1570480221; x=1602016221; h=mime-version:from:date:message-id:subject:to; bh=WZdJ9Jb3KxHxJBtuOx83LGJHR6vLyDJ32s1vBewrsBg=; b=AhGntN+ifOjhcgNpLNBKv/p5SX07l4mSh1WkJGF8XctDyOLpXckH/K8e PreMGSEVX7AEVloLXyTHxLe8rJtbN0R13Tkb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Zcd8DWG?= =?us-ascii?q?ZNQtpdWylHD4ihbYUAEvABMP5XoIf9qVUArgawCxewC+701j9EmmX70bEm3+?= =?us-ascii?q?g9EwzL2hErEdIUsHTTqdX4LKUdUeG0zanI0DXDaO5d1jT96IfScxAqvPaBXL?= =?us-ascii?q?JxcMrR00YvFh/JgkmepIH+IjOayv4Nv3KF4OV9SOKikmgqoBxyrDi33soglJ?= =?us-ascii?q?XFi4YPxl3H9Sh12ps5KNy6RUJhYNOpFJ1dvDyAOYRsWMMtWWRotT4/yr0BpJ?= =?us-ascii?q?G0YjAHyI8ixx7Dc/yHdJWI4g77WOaRPzh4gHVldaq6hxmo8EigzvTwVs260F?= =?us-ascii?q?pXtyZFnNjBu3QX2xzc7ciHTfR9/kO/1jqVyw/T7eRELVg1lardNZEh3qY9mo?= =?us-ascii?q?QPvUnHBCP7m0X7gLWLekgl+OWk8eXqb7H+qp+ZLYB0iwX+Mqo0msy4BOQ1Kg?= =?us-ascii?q?gPXmmb+eum1b3v4VH1TbtRg/0rjqbZqorWKtoGqa6kGwNVyJos6w6jDze619?= =?us-ascii?q?QVhX0HLFNDeBKagInlIlLOL+7iDfe5nVuslCxmx+7JPrL/GJXBNHvDn6n7fb?= =?us-ascii?q?Z79UFczBA/zddF55JbWfk9J6e5eEb0uceQI1kbdUSexPr7D9B525JUETaND6?= =?us-ascii?q?2TGKfTt0KYoOMlJq+HY4pD/H63DvE/+//oxVx/0WcQYaSzxpYRIjjsG/18P0?= =?us-ascii?q?SfJ2LhntobCmoMlg0kRefuhRuJVjsFIz62XqQh9nQgA5mnJZnMS5rrg7Gb2i?= =?us-ascii?q?q/WJpMaSQODlGKDGetdIieXfoIQDydL9UnkTEeU7WlDYg72lXmnw/3zbV2M6?= =?us-ascii?q?Lv/SsX/cboz99z6MXYjlcv/iYyAsiAhSXFfWF1j34ODwY31aY39V59y0ae17?= =?us-ascii?q?FQiOceCNdJof5FT1FpG4TbyrlLCsLyRwWJTNeASR7yU8emCDBpFokZ3tQUJU?= =?us-ascii?q?txBoPx3Vj4wyO2DupNxPSwD5su//eZhiCpKg=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2EVAwDznptdh0WnVdFmDoYghE2OYIU?= =?us-ascii?q?XAYZ3hVmBGIMRhyMBCAEBAQ4vAQGHHyM4EwIDCQEBBQEBAQEBBQQBAQIQAQE?= =?us-ascii?q?BCA0JCCmFQII6KQGDVRF8DwImAiQSAQUBIgE0gwCCCwWiaIEDPIsmgTKIYAE?= =?us-ascii?q?JDYFIEnoojA6CF4ERg1CHUYJYBIE4AQEBlSyWVAEGAoIQFIxUiEQbgioBlxQ?= =?us-ascii?q?tjX+ZSw8jgUaBezMaJX8GZ4FPTxAUgWmNcVskkhwBAQ?= X-IPAS-Result: =?us-ascii?q?A2EVAwDznptdh0WnVdFmDoYghE2OYIUXAYZ3hVmBGIMRh?= =?us-ascii?q?yMBCAEBAQ4vAQGHHyM4EwIDCQEBBQEBAQEBBQQBAQIQAQEBCA0JCCmFQII6K?= =?us-ascii?q?QGDVRF8DwImAiQSAQUBIgE0gwCCCwWiaIEDPIsmgTKIYAEJDYFIEnoojA6CF?= =?us-ascii?q?4ERg1CHUYJYBIE4AQEBlSyWVAEGAoIQFIxUiEQbgioBlxQtjX+ZSw8jgUaBe?= =?us-ascii?q?zMaJX8GZ4FPTxAUgWmNcVskkhwBAQ?= X-IronPort-AV: E=Sophos;i="5.67,269,1566889200"; d="scan'208";a="80773091" Received: from mail-lf1-f69.google.com ([209.85.167.69]) by smtpmx6.ucr.edu with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 07 Oct 2019 13:30:20 -0700 Received: by mail-lf1-f69.google.com with SMTP id c83so1685779lfg.8 for ; Mon, 07 Oct 2019 13:30:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=55dhnuYmVazkQySeH4LJMqj3qTpKbtoaQ6fsEhqhvMQ=; b=RhAcvBX5enRU0OoUoT7dPWjSdMCaqOz6Kng83T3Zj+DOXIYpyfto87Wm3fCOdMhA3d Aty2adDat/yMgUn5fwtd0h0oBPwZNIYOBTCEDaYit2j7PLPn034VUpQJJYON0Og8mcS4 hWE+HBuUsBnZ2GTdf33uUQjBPRCd47d56QGSGt9P0cIkC0SBMOzk0XhlFaJiWMjlbNN3 Tg8r3x9eagt14dKHAI12LimpqwXn02S8CAKdGB4VbTj/ZlKPBv9HYbGpCiLVj8M9EyPu y0Jp3Cbx0U8BkJsI9rqpIMq2q2KdzUSV22pD0SHUT0x2qga18ULfyPdxaWjHfcp/WXkZ 9wKQ== X-Gm-Message-State: APjAAAWXCsYHssMJvhc1Zpn/CAuo3/xQ8vEcqP55GYQTs8kyvAmEIggg S1uIFxd0+pMESsWYRkmn1rSrF3VZR+WjiC3Zfh/yUayYfBTg1DilIDAaYMwbxYlYTLJyTnXFXwg A9uU+yhIeqjqsYu5NYWHb0f3VmE78Zkl/phU10rOMIQ== X-Received: by 2002:a05:651c:283:: with SMTP id b3mr20056078ljo.25.1570480216576; Mon, 07 Oct 2019 13:30:16 -0700 (PDT) X-Received: by 2002:a05:651c:283:: with SMTP id b3mr20056069ljo.25.1570480216371; Mon, 07 Oct 2019 13:30:16 -0700 (PDT) MIME-Version: 1.0 From: Yizhuo Zhai Date: Mon, 7 Oct 2019 13:30:59 -0700 Message-ID: Subject: Potential NULL pointer deference in scsi: scsi_transport_spi To: "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Chengyu Song , Zhiyun Qian Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi All: drivers/scsi/scsi_transport_spi.c: Inside function store_spi_transport_period(), dev_to_shost() could return NULL, however, the return value shost is not checked and get used. This could potentially be unsafe. -- Kind Regards, Yizhuo Zhai Computer Science, Graduate Student University of California, Riverside