Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2753876imj; Mon, 11 Feb 2019 08:00:31 -0800 (PST) X-Google-Smtp-Source: AHgI3Ibm/YDJ/o8v3uVMBV8ppLB0EcTA8J3aUn/HlCr1lO9LBdOovLcDneykVxS/c9NohW90dMx8 X-Received: by 2002:a17:902:6948:: with SMTP id k8mr37749110plt.2.1549900831420; Mon, 11 Feb 2019 08:00:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549900831; cv=none; d=google.com; s=arc-20160816; b=U6/EyMZ3nQdHhQoykZLkhancyEwwGGWW+2j/PM4qhWVgC+BNACefSUAHvBGnWHWjZY B0Y2emW0z/hOz3bVSiaaPC6kueq+dlehqLPyGTyM6+4Haxv+gykBScw6kp8gvxsU8ADN Ucq9n3wcXd4dXZqgxs+OuEMP/M9kMjSDsEEtMPtrhfjcczomA3QBBrMawdztkK+GT1Ab +6DC9bRPgVO+oy7/euLH56zAsWYYqRorGVowSp6Dc14eh3ZXPbCwSRmn9SLTPnfWd12Q 9IY+iOToQDola13l3AhvQECU7vCi/nToLZQ2P9PPengUkz+M3cJu/CpDnGYarmYJfL3u CrKQ== 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=D3D0FUpPFH4VQBW/itiM/1EHbfzyR8LvCc6xBJXQYzU=; b=0HnxDHvKrdcmSP2ffpIp3v4qSBa/3ZEbZ9oR2dLnkxSQWyaq7NjBWWlbq9dbR4PB4g oKOwVochSWGfqQ05YDUVtour5ctItFfSZaO0cwbl/3rYuol5qN/n4rjTNhzQ9Z6v4adq WID51ZmcCE0XyT3/ENmF3MQT8p1vek9ICa8YMukGIMwODIOoj7cW3+yCuB8dAtNqydAx 8mTB7kWwmYSM8OGyJHU5UCgqahfs+cehG87ejBdKrPz3tYM0VJPmHtReWmF2ZzBlVFTJ SOKb8E5wR+Eoz8Eqsw7Q423Cye0vblT0NsN5ZoPpnVXWOm2+VGxN8I7x0LQQ+jJPw3yE 0jRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qyQ4dRfL; 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 a13si4805685pgj.133.2019.02.11.08.00.13; Mon, 11 Feb 2019 08:00:31 -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=qyQ4dRfL; 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 S1733297AbfBKP6t (ORCPT + 99 others); Mon, 11 Feb 2019 10:58:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:40120 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729901AbfBKOci (ORCPT ); Mon, 11 Feb 2019 09:32:38 -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 88DB8214DA; Mon, 11 Feb 2019 14:32:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895558; bh=qrRKHz8Jw4WKYbhyRChcspY9tiasDNFFKiCc7+GpKtE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qyQ4dRfLZC7qkZCPek/bDT6MBhsCo2Ol4sDBP1r5QtRdQNrHsC/CNK87r7nZb81Ia SnhV7efxvT1CviiLA4BSECwM4hBf3BXdLpMH6IdtKzMxvt5MXDSaj4/VDTHXcsAiMn hOPJe/VmYwPrUW/gcMiI9LFq1vkvnAOiyYK+81SA= 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.20 215/352] scsi: smartpqi: correct volume status Date: Mon, 11 Feb 2019 15:17:22 +0100 Message-Id: <20190211141900.885081142@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@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.20-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 5a86dddbd8ba..489e5cbbcbba 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -1168,6 +1168,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