Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2719247imj; Mon, 11 Feb 2019 07:28:12 -0800 (PST) X-Google-Smtp-Source: AHgI3IYrr8lza6L7mg4ZPnvqckCYYZUqQFYAUh3e19wuZLeOxgV/3S+RdrYptlTNtMYHpv0dgGpP X-Received: by 2002:a17:902:6b46:: with SMTP id g6mr37980624plt.21.1549898892703; Mon, 11 Feb 2019 07:28:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549898892; cv=none; d=google.com; s=arc-20160816; b=AitCd2qw7EgYYRWag/R7ZO+4j/4amrgYgs7I2PaPj1KX2J8J4Ffc5Qj4MesrngRuxz 9gZGSvfo4GrwPtggWcJbJ8aVIKi61c/gE6M1wsRy6/2Z1m9UVwpZgreIOCcYygQBrWXE hPcsUsju/GKFN4CF5oxcriOINQrBzpzi8utihl1Tpz7ZDT/kwwxxTNJY9TqCcSXhgYOa pmxfAdLdND7WHxhi5qciMvaa8KP6CAM2wVz83nuFF+sUUip/NuNzcE42c9t4VV8OLIDr 1K54l56MnZSoeVaXSnBzB5LMlh/rGnBYvkmWPNpHaEKsPZxCznMCXLF25ctpcFnDv58i kPBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xrFs7IGtMI9z/qPBRe4+GQpgbj1cK6gHUlx7Rs7Q8EU=; b=igvtPwhYSCqYb59KYWYVJ7Mr2/ShIjtY7W0PVZ4yl9k07ppnMcSXbA4qhsacmp2oJw bRSpGqEeSUZWZHtJhxvUNqFzm4QUR/k0Mnv2YrH4xns4RFpCgzaD7JfX6LPjI89C21Xo NWM2xz2h1KX+RkIQm0oWRKmG1Cm/eo8FGDjCYVb9vlB/C3FuXbJrAZwYi2d+1HexbD0k lkYqC4OK4ivb5B50Q8Omc5dgkyD1xiuYPhHJoK1ndlLx8W5n6EB2tti1sERBPLC7bMJS /u+E5FvMJy+sx4vH9aXgNihQXjZNwvyky0Jiw9SDvkRvuyBeFDVMoDgusYvQo0vOJBIt SqXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vPBKGUD8; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 4si4433362pff.161.2019.02.11.07.27.54; Mon, 11 Feb 2019 07:28:12 -0800 (PST) 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=pass header.i=@kernel.org header.s=default header.b=vPBKGUD8; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389838AbfBKO7l (ORCPT + 99 others); Mon, 11 Feb 2019 09:59:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:47366 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389338AbfBKO7f (ORCPT ); Mon, 11 Feb 2019 09:59:35 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6140E206BA; Mon, 11 Feb 2019 14:59:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549897174; bh=J/9rKtScxX5+XCwu1Xg1fbJ3WMk9Ak6PIEE9eUObTJc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vPBKGUD8m6K46VT7NiWIrG86CZZDow3TXjVqmg9ZS7K4M0hWQw+R5JSNsHZqiOgHJ dt+MUmBqsGVyMCfcUSr4nJ8L/xzTAqqyifbmF13ExYIxx8FpBgLFFJtsRjifCnXVfc qycOlM3dkmFbCnvtsq54v8UL51+WQdi2bijCym40= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Murthy Bhat , Mahesh Rajashekhara , Scott Teel , Kevin Barnett , Dave Carroll , Don Brace , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.14 114/205] scsi: smartpqi: correct volume status Date: Mon, 11 Feb 2019 15:18:32 +0100 Message-Id: <20190211141835.945067521@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141827.214852402@linuxfoundation.org> References: <20190211141827.214852402@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 7ff44499bafbd376115f0bb6b578d980f56ee13b ] - fix race condition when a unit is deleted after an RLL, and before we have gotten the LV_STATUS page of the unit. - In this case we will get a standard inquiry, rather than the desired page. This will result in a unit presented which no longer exists. - If we ask for LV_STATUS, insure we get LV_STATUS Reviewed-by: Murthy Bhat Reviewed-by: Mahesh Rajashekhara Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Dave Carroll Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/smartpqi/smartpqi_init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index cc27ae2e8a2d..5ec2898d21cd 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -1184,6 +1184,9 @@ static void pqi_get_volume_status(struct pqi_ctrl_info *ctrl_info, if (rc) goto out; + if (vpd->page_code != CISS_VPD_LV_STATUS) + goto out; + page_length = offsetof(struct ciss_vpd_logical_volume_status, volume_status) + vpd->page_length; if (page_length < sizeof(*vpd)) -- 2.19.1