Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2455307imd; Fri, 2 Nov 2018 11:41:52 -0700 (PDT) X-Google-Smtp-Source: AJdET5cDF5nJrbvq/2rJVOHOi0S01XUqeiNgoXP9GcfNt5n4ePQZvJSfYSzrcu93MOWQCCXsGkK2 X-Received: by 2002:a17:902:70c4:: with SMTP id l4-v6mr12610301plt.194.1541184112487; Fri, 02 Nov 2018 11:41:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541184112; cv=none; d=google.com; s=arc-20160816; b=R3bYnrlc9sAfE10i82DXfW/Qn+gGY9C7ngrnECNazqRXvTdSq8I4TOJPd5IzQX3ENf PjHt1xDwtingoNjxbOeTkqllzPJzi6dF8gmhhurhToGT3qG097yYlbiQz0ylK8TiPsIR 3DLlp5DOoeMFHJVPTqQJAgxvkkaJK/hypjKAku40qtNJscs6YhN6LkR7GWo+vqAEIW7c S4eGaX23a85jwH1j1MLe/6VtovUSpIEN+w6A5CVWGb0RZtSO/vkh2Gg18Z3pxoCXwTia sGEn1KO3P2yM4R7hoWr1WiI1ekTsOgcdeWILmj9yEfzHWvnKNrc6aoh40iU2jLUFoOCa zf3w== 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=aaQzUiSxtQyooLHfEwjuFHaJSOzEqV9XgF7bSy3n7t0=; b=ZRgMFBF+l79N5+Vacw0MAR0BiXJnxBDSHbrXBWHWRzAZVkKy+pIw0PfL7Vk9goGbpF 9hMwYZ7P60LU1k4HWUZJ8BVbqkTqEwmO5v4xg3eajNChUYq8tv21OAjX34X5MBLymSIF u0s+uciTYRdEnFn0GUT4jR4Jd0O8hHjr74dJPGv1ZbXF4LhS8Ne3h5dC3U0vWlf3SMNB TxQYUf6l1qH9zb5EsVm/Twoem1S4eSJ/DRYLZjFzAeYBjjCPhfw0O0hHtKNhGQIIcPVt 4I0W0QcTjbe7LBXl92CJjgVwQeljdW02FyGd0CtVT6Ey0jjfAK3bH9eaMEhjbvGHlrS2 NLug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TRHzJWom; 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 d17si533651pgl.484.2018.11.02.11.41.37; Fri, 02 Nov 2018 11:41:52 -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=pass header.i=@kernel.org header.s=default header.b=TRHzJWom; 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 S1729112AbeKCDrc (ORCPT + 99 others); Fri, 2 Nov 2018 23:47:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:41606 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728102AbeKCDrb (ORCPT ); Fri, 2 Nov 2018 23:47:31 -0400 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 D73302082E; Fri, 2 Nov 2018 18:39:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541183960; bh=f5pfC0kt7Y5cOgYYPOYX5XKbMoOtvFr2qmX4iB/rYfU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TRHzJWomsQgWbe+smXCea6NwrfZelPTmUXEA4ufBoKqMgLdEIv9Wr38MFzElr3aD7 rS6Xur6FeaBe9ECcVSzG0CVnVGM7fWKuddP/TX187j8E6YFSLf3j7YC+kfgqBKEf/m bICGoECv5Y03gBQjfbveUYc1R2XOuR1ghqeweBMA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nilesh Javali , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.18 035/150] scsi: qedi: Initialize the stats mutex lock Date: Fri, 2 Nov 2018 19:33:17 +0100 Message-Id: <20181102182905.765343894@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181102182902.250560510@linuxfoundation.org> References: <20181102182902.250560510@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review 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.18-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 3cc5746e5ad7688e274e193fa71278d98aa52759 ] Fix kernel NULL pointer dereference, Call Trace: [] __mutex_lock_slowpath+0xa6/0x1d0 [] mutex_lock+0x1f/0x2f [] qedi_get_protocol_tlv_data+0x61/0x450 [qedi] [] ? map_vm_area+0x2e/0x40 [] ? __vmalloc_node_range+0x170/0x280 [] ? qed_mfw_process_tlv_req+0x27d/0xbd0 [qed] [] qed_mfw_fill_tlv_data+0x4b/0xb0 [qed] [] qed_mfw_process_tlv_req+0x299/0xbd0 [qed] [] ? __switch_to+0xce/0x580 [] qed_slowpath_task+0x5b/0x80 [qed] Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/qedi/qedi_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index 3e18a68c2b03..054e66d93ed6 100644 --- a/drivers/scsi/qedi/qedi_main.c +++ b/drivers/scsi/qedi/qedi_main.c @@ -2472,6 +2472,7 @@ static int __qedi_probe(struct pci_dev *pdev, int mode) /* start qedi context */ spin_lock_init(&qedi->hba_lock); spin_lock_init(&qedi->task_idx_lock); + mutex_init(&qedi->stats_lock); } qedi_ops->ll2->register_cb_ops(qedi->cdev, &qedi_ll2_cb_ops, qedi); qedi_ops->ll2->start(qedi->cdev, ¶ms); -- 2.17.1