Return-Path: Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: [PATCH] Bluetooth: Fix potential NULL dereference From: Marcel Holtmann In-Reply-To: <1422950473-11562-1-git-send-email-johan.hedberg@gmail.com> Date: Tue, 3 Feb 2015 00:03:43 -0800 Cc: linux-bluetooth@vger.kernel.org Message-Id: References: <1422950473-11562-1-git-send-email-johan.hedberg@gmail.com> To: Johan Hedberg Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Hi Johan, > The bnep_get_device function may be triggered by an ioctl just after a > connection has gone down. In such a case the respective L2CAP chan->conn > pointer will get set to NULL (by l2cap_chan_del). This patch adds a > missing NULL check for this case in the bnep_get_device() function. > > Reported-by: Patrik Flykt > Signed-off-by: Johan Hedberg > --- > net/bluetooth/bnep/core.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) patch has been applied to bluetooth-next tree. Regards Marcel