From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:50821 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756308AbcEFRdH (ORCPT ); Fri, 6 May 2016 13:33:07 -0400 Subject: Patch "ata: ahci_xgene: dereferencing uninitialized pointer in probe" has been added to the 4.4-stable tree To: dan.carpenter@oracle.com, gregkh@linuxfoundation.org, tj@kernel.org Cc: , From: Date: Fri, 06 May 2016 12:32:46 -0400 Message-ID: <146255236622897@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled ata: ahci_xgene: dereferencing uninitialized pointer in probe to the 4.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ata-ahci_xgene-dereferencing-uninitialized-pointer-in-probe.patch and it can be found in the queue-4.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 8134233e8d346aaa1c929dc510e75482ae318bce Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 10 Mar 2016 10:45:32 +0300 Subject: ata: ahci_xgene: dereferencing uninitialized pointer in probe From: Dan Carpenter commit 8134233e8d346aaa1c929dc510e75482ae318bce upstream. If the call to acpi_get_object_info() fails then "info" hasn't been initialized. In that situation, we already know that "version" should be XGENE_AHCI_V1 so we don't actually need to dereference "info". Fixes: c9802a4be661 ('ata: ahci_xgene: Add AHCI Support for 2nd HW version of APM X-Gene SoC AHCI SATA Host controller.') Signed-off-by: Dan Carpenter Signed-off-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman --- drivers/ata/ahci_xgene.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/ata/ahci_xgene.c +++ b/drivers/ata/ahci_xgene.c @@ -739,9 +739,9 @@ static int xgene_ahci_probe(struct platf dev_warn(&pdev->dev, "%s: Error reading device info. Assume version1\n", __func__); version = XGENE_AHCI_V1; - } - if (info->valid & ACPI_VALID_CID) + } else if (info->valid & ACPI_VALID_CID) { version = XGENE_AHCI_V2; + } } } #endif Patches currently in stable-queue which might be from dan.carpenter@oracle.com are queue-4.4/ata-ahci_xgene-dereferencing-uninitialized-pointer-in-probe.patch