Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757566AbYJMOiN (ORCPT ); Mon, 13 Oct 2008 10:38:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755465AbYJMOhz (ORCPT ); Mon, 13 Oct 2008 10:37:55 -0400 Received: from earthlight.etchedpixels.co.uk ([81.2.110.250]:52936 "EHLO lxorguk.ukuu.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755272AbYJMOhy (ORCPT ); Mon, 13 Oct 2008 10:37:54 -0400 Date: Mon, 13 Oct 2008 15:37:01 +0100 From: Alan Cox To: James Bottomley Cc: Jeff Garzik , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi Subject: Re: [PATCH] mptsas: remove pointless null check Message-ID: <20081013153701.61f22485@lxorguk.ukuu.org.uk> In-Reply-To: <1223907778.5566.3.camel@localhost.localdomain> References: <20081006172653.GA26427@oksana.dev.rtsoft.ru> <48F2F138.6020103@kernel.org> <48F34CB9.3020000@pobox.com> <20081013150529.75f22702@lxorguk.ukuu.org.uk> <1223907778.5566.3.camel@localhost.localdomain> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.12; x86_64-redhat-linux-gnu) Organization: Red Hat UK Cyf., Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, Y Deyrnas Gyfunol. Cofrestrwyd yng Nghymru a Lloegr o'r rhif cofrestru 3798903 Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 848 Lines: 19 > If I remember rightly this check is necessary because phy_info can be > NULL in certain situations. Your patch will trip this to oops. What In which case it will already have crashed > your description needs to say is that we no longer need to check this > pointer for NULL because it was checked somewhere else in the stack ... > but I can't see where that is, where is it? We don't check: but if it was NULL we then fall straight through and dereference it unconditionally... so either its a wrong NULL check and the old code oopses (which a trawl says it doesn't) or the check is bogus. Alan -- 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/