From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1947702AbcBRUAL (ORCPT ); Thu, 18 Feb 2016 15:00:11 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:46366 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1426952AbcBRUAG (ORCPT ); Thu, 18 Feb 2016 15:00:06 -0500 Date: Thu, 18 Feb 2016 15:00:04 -0500 (EST) Message-Id: <20160218.150004.624016127272800990.davem@davemloft.net> To: a.s.protopopov@gmail.com Cc: isdn@linux-pingi.de, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mISDN: prevent possible NULL pointer dereference From: David Miller In-Reply-To: <1455725996-10538-1-git-send-email-a.s.protopopov@gmail.com> References: <1455725996-10538-1-git-send-email-a.s.protopopov@gmail.com> X-Mailer: Mew version 6.6 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 18 Feb 2016 12:00:05 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Anton Protopopov Date: Wed, 17 Feb 2016 11:19:56 -0500 > A return value of the bchannel_get_rxbuf() function is compared with the > positive ENOMEM value instead of the negative -ENOMEM value to detect a > memory allocation problem. Thus, after a possible memory allocation > failure the bc->bch.rx_skb will be NULL which will lead to a NULL > pointer dereference. > > Signed-off-by: Anton Protopopov Applied.