Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754215AbaD0WGE (ORCPT ); Sun, 27 Apr 2014 18:06:04 -0400 Received: from lxorguk.ukuu.org.uk ([81.2.110.251]:32845 "EHLO lxorguk.ukuu.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751495AbaD0WGB (ORCPT ); Sun, 27 Apr 2014 18:06:01 -0400 Date: Sun, 27 Apr 2014 23:05:48 +0100 From: One Thousand Gnomes To: Oleg Drokin Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, Dmitry Eremin , Oleg Drokin Subject: Re: [PATCH 1/5] staging/lustre/lnet: fix potential null pointer dereference Message-ID: <20140427230548.347fbb21@alan.etchedpixels.co.uk> In-Reply-To: <1398633446-16719-2-git-send-email-green@linuxhacker.ru> References: <1398633446-16719-1-git-send-email-green@linuxhacker.ru> <1398633446-16719-2-git-send-email-green@linuxhacker.ru> Organization: Intel Corporation X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.20; x86_64-pc-linux-gnu) 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 > Reviewed-by: John L. Hammond > Reviewed-by: Isaac Huang > Signed-off-by: Oleg Drokin > --- > drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c > index 21d36ee..516f623 100644 > --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c > +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c > @@ -829,14 +829,14 @@ ksocknal_select_ips(ksock_peer_t *peer, __u32 *peerips, int n_peerips) > best_npeers = iface->ksni_npeers; > } > > + LASSERT(best_iface != NULL); > + And this solves the problem how ??? These dont' appear that helpful. If we dereference a NULL point we'll already get a suitably spectacular oops and call trace dump. 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/