Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754872AbaDKDOH (ORCPT ); Thu, 10 Apr 2014 23:14:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61438 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751104AbaDKDOE (ORCPT ); Thu, 10 Apr 2014 23:14:04 -0400 Date: Fri, 11 Apr 2014 11:11:31 +0800 From: Baoquan He To: scameron@beardog.cce.hp.com Cc: James Bottomley , Bjorn Helgaas , Davidlohr Bueso , "linux-kernel@vger.kernel.org" , linux-scsi , "linux-pci@vger.kernel.org" , Joerg Roedel , "open list:INTEL IOMMU (VT-d)" , Jiang Liu Subject: Re: [PATCH] hpsa: fix uninitialized trans_support in hpsa_put_ctlr_into_performant_mode() Message-ID: <20140411031131.GN11839@dhcp-16-105.nay.redhat.com> References: <20140410221704.GA22465@beardog.cce.hp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140410221704.GA22465@beardog.cce.hp.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch works for me. Tested-by: Baoquan He Thanks Baoquan On 04/10/14 at 05:17pm, scameron@beardog.cce.hp.com wrote: > > Without this, you'll see a null pointer dereference in > hpsa_enter_performant_mode(). > > Signed-off-by: Stephen M. Cameron > --- > drivers/scsi/hpsa.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c > index 8cf4a0c..ef4dfdd 100644 > --- a/drivers/scsi/hpsa.c > +++ b/drivers/scsi/hpsa.c > @@ -7463,6 +7463,10 @@ static void hpsa_put_ctlr_into_performant_mode(struct ctlr_info *h) > if (hpsa_simple_mode) > return; > > + trans_support = readl(&(h->cfgtable->TransportSupport)); > + if (!(trans_support & PERFORMANT_MODE)) > + return; > + > /* Check for I/O accelerator mode support */ > if (trans_support & CFGTBL_Trans_io_accel1) { > transMethod |= CFGTBL_Trans_io_accel1 | > -- > 1.7.1 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/