Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp174868rwn; Wed, 14 Sep 2022 18:22:21 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4YlN5QVkmYW5kBoHlylqLjn9Zr5jaMjlziIBidHXCwUuCxF76KFAS4FQPDsSeXwtEqjapT X-Received: by 2002:a17:902:db12:b0:178:1f91:74e6 with SMTP id m18-20020a170902db1200b001781f9174e6mr1841774plx.100.1663204941669; Wed, 14 Sep 2022 18:22:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663204941; cv=none; d=google.com; s=arc-20160816; b=TKEcmOof8s2nJHAHyiLgc6EAePuKfWg7ItXsUgo30m+oN13/8kFcbjI7S+tEv/E9IK /B2A8SBYjfUaD5UBVPX0PgvU4h5BvXXK2sAQMAu/naGbGf2yDiiMbfF2SEcV3qP1KJU8 2OjckYd5rc7U2i0HN8Yl/X028cYIE6UPL6wzsgXC8y3qkAoMk9jM+cGum9B7G7CDde8c TDT+EHqci5gMJy6bhBneqj3Z8M19gRSWCcysHtLamJOrfKbRC6avAeSgsFcUvqsaX7kG Mnrb0K054uQzaOaLTyrEf9oahakSkYvYAkjQlx7+ZSlpUNozwaWVQiO8jsvnBAEK36Od YWQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:mime-version :content-transfer-encoding:references:in-reply-to:subject:cc:to:from :date:dkim-signature; bh=p8HnYYwrAuHe32woRZ0C/F3BS+DSC4atRj0A1gzoEwM=; b=j6N2qSvWvxa1znZ1DoZNYZncFIUqLGprlZvaiZPelEuqDAcz1eF0KhlsRhxJbfHenY es9GE+bwuB1FsMt94njlCK7LS25ix6UEucfCFQu8IBOoJl3BhAnzu17sjHxS6vW+wQNo eB3n65RUYhicOqF8VAzrXdXvps5ROJnj9HtIJgkR39I0/ZTVfoO+BwoZ8oJykMt/Cy8W vaFjpyCyq9fI9jplOMBJ9Ib5x8Bcmro206g6OwKv5KHHyKd3bDjzjzZQKUTlGhm+zGXD uMcVsuNC5CydCuBs2BJJsga2VLjgCBty6bNcAh9CmEH3qNSsmaISiIuJMyiKaM/zszEi potQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@163.com header.s=s110527 header.b=erOcHMWt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b4-20020a63d304000000b003fea0415b5asi15586907pgg.834.2022.09.14.18.22.09; Wed, 14 Sep 2022 18:22:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@163.com header.s=s110527 header.b=erOcHMWt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229873AbiIOA5T (ORCPT + 99 others); Wed, 14 Sep 2022 20:57:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229487AbiIOA5R (ORCPT ); Wed, 14 Sep 2022 20:57:17 -0400 Received: from m1383.mail.163.com (m1383.mail.163.com [220.181.13.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C3DA17C773; Wed, 14 Sep 2022 17:57:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Date:From:Subject:MIME-Version:Message-ID; bh=SkIS1 Oz89ZrQgYsvTqea/Y/rETUbm0bJ3j0rTOEbpV8=; b=erOcHMWtRdTJ67QvBvLir 3pAzaMVo/2Nt5PH2Ojs9h3zpq4Ba49e2jqf96ubvLxeknLjK/lN+dSch+n+fvTCw Mc14hn8/fiqgJ9xUNvx2aEdWEJVPEcz3LOuGFmu2ks+S/aO3YMjr93VclLStTUtQ 4HQCFuUxcNl7xen7q1Gz4c= Received: from 15815827059$163.com ( [223.147.18.37] ) by ajax-webmail-wmsvr83 (Coremail) ; Thu, 15 Sep 2022 08:56:30 +0800 (CST) X-Originating-IP: [223.147.18.37] Date: Thu, 15 Sep 2022 08:56:30 +0800 (CST) From: huhai <15815827059@163.com> To: jejb@linux.ibm.com, martin.petersen@oracle.com Cc: sathya.prakash@broadcom.com, sreekanth.reddy@broadcom.com, suganath-prabu.subramani@broadcom.com, MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, huhai , stable@vger.kernel.org, "Jackie Liu" Subject: Re:[PATCH v2] scsi: mpt3sas: Fix NULL pointer crash due to missing check device hostdata X-Priority: 3 X-Mailer: Coremail Webmail Server Version XT5.0.13 build 20220113(9671e152) Copyright (c) 2002-2022 www.mailtech.cn 163com In-Reply-To: <20220901063409.85272-1-15815827059@163.com> References: <20220901063409.85272-1-15815827059@163.com> Content-Transfer-Encoding: base64 Content-Type: text/plain; charset=GBK MIME-Version: 1.0 Message-ID: <6af4d139.731.1833ea5b2c9.Coremail.15815827059@163.com> X-Coremail-Locale: zh_CN X-CM-TRANSID: U8GowADncqQ+eCJjwltAAA--.1428W X-CM-SenderInfo: rprvmiivyslimvzbiqqrwthudrp/xtbB0xp2hVXlwwFJgQABsB X-Coremail-Antispam: 1U5529EdanIXcx71UUUUU7vcSsGvfC2KfnxnUU== X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,FROM_LOCAL_DIGITS, FROM_LOCAL_HEX,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org cGluZy4uLgoKCkF0IDIwMjItMDktMDEgMTQ6MzQ6MDksICJodWhhaSIgPDE1ODE1ODI3MDU5QDE2 My5jb20+IHdyb3RlOgo+RnJvbTogaHVoYWkgPGh1aGFpQGt5bGlub3MuY24+Cj4KPklmIF9zY3Np aF9pb19kb25lKCkgaXMgY2FsbGVkIHdpdGggc2NtZC0+ZGV2aWNlLT5ob3N0ZGF0YT1OVUxMLCBp dCBjYW4gbGVhZAo+dG8gdGhlIGZvbGxvd2luZyBwYW5pYzoKPgo+ICBCVUc6IHVuYWJsZSB0byBo YW5kbGUga2VybmVsIE5VTEwgcG9pbnRlciBkZXJlZmVyZW5jZSBhdCAwMDAwMDAwMDAwMDAwMDE4 Cj4gIFBHRCA0NTQ3YTQwNjcgUDREIDQ1NDdhNDA2NyBQVUQgMAo+ICBPb3BzOiAwMDAyIFsjMV0g U01QIE5PUFRJCj4gIENQVTogNjIgUElEOiAwIENvbW06IHN3YXBwZXIvNjIgS2R1bXA6IGxvYWRl ZCBOb3QgdGFpbnRlZCA0LjE5LjkwLTI0LjQudjIxMDEua3kxMC54ODZfNjQgIzEKPiAgSGFyZHdh cmUgbmFtZTogU3RvcmFnZSBTZXJ2ZXIvNjVOMzItVVMsIEJJT1MgU1FMMTA0MTIxNyAwNS8zMC8y MDIyCj4gIFJJUDogMDAxMDpfc2NzaWhfc2V0X3NhdGxfcGVuZGluZysweDJkLzB4NTAgW21wdDNz YXNdCj4gIENvZGU6IDAwIDAwIDQ4IDhiIDg3IDYwIDAxIDAwIDAwIDBmIGI2IDEwIDgwIGZhIGEx IDc0IDA5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