From patchwork Sun Dec 8 09:25:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 3305991 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 62AEC9F386 for ; Sun, 8 Dec 2013 09:29:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DA7EC20377 for ; Sun, 8 Dec 2013 09:28:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 14ABB2035D for ; Sun, 8 Dec 2013 09:28:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759315Ab3LHJ2q (ORCPT ); Sun, 8 Dec 2013 04:28:46 -0500 Received: from mail-ee0-f43.google.com ([74.125.83.43]:33684 "EHLO mail-ee0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754877Ab3LHJ1h (ORCPT ); Sun, 8 Dec 2013 04:27:37 -0500 Received: by mail-ee0-f43.google.com with SMTP id c13so1006694eek.2 for ; Sun, 08 Dec 2013 01:27:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=km7C9gNTr6fxi0+Un1urs5rro5lopWjRfzm3b9URhME=; b=b5Jqan9fHpVwAei9w9XLyT6Z/Qyop8q5ANA6ghj5IiXbT+BX9XxpDOsmyeUd8Lf4yZ bsvEpHXGiKYeVXTAKaoPUHulYnCBWPWJOfIxfojKAMlf15nbHNoGfMIfGcx48x0fnh82 jXlqcfvVn9tlR1iGqOt04+S85dYOOFVP33GNHTWsWLEvXBcxl62DHm8Gab46Zoh+Tt7j ZzFclRLL9u/JDv1xWusZ30cEQmSB6pjHvjymqy4+84qvY82Oaf0ucitMhNEBzUzUEWnL 5wuOpSC99JVwftqoAO/Ye0Wh+cR3lg/QzSkWv5uoDroSSsLNd2GDRD/vfceh7GYtebga gU1A== X-Received: by 10.15.82.8 with SMTP id z8mr8765167eey.25.1386494856511; Sun, 08 Dec 2013 01:27:36 -0800 (PST) Received: from Pali-EliteBook.kolej.mff.cuni.cz (pali.kolej.mff.cuni.cz. [78.128.193.202]) by mx.google.com with ESMTPSA id m1sm15397623eeg.0.2013.12.08.01.27.35 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 08 Dec 2013 01:27:35 -0800 (PST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Luciano Coelho , "John W. Linville" Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, freemangordon@abv.bg, aaro.koskinen@iki.fi, pavel@ucw.cz, sre@ring0.de, joni.lapilainen@gmail.com, Johannes Berg , Felipe Contreras , =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [PATCH v2 16/16] wl1251: fix NULL pointer dereference Date: Sun, 8 Dec 2013 10:25:14 +0100 Message-Id: <1386494714-21070-17-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1386494714-21070-1-git-send-email-pali.rohar@gmail.com> References: <1382819655-30430-1-git-send-email-pali.rohar@gmail.com> <1386494714-21070-1-git-send-email-pali.rohar@gmail.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Pali Rohár Reported-by: Felipe Contreras Reviewed-by: Pavel Machek --- drivers/net/wireless/ti/wl1251/event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ti/wl1251/event.c b/drivers/net/wireless/ti/wl1251/event.c index 192cebd..db01053 100644 --- a/drivers/net/wireless/ti/wl1251/event.c +++ b/drivers/net/wireless/ti/wl1251/event.c @@ -124,7 +124,7 @@ static int wl1251_event_process(struct wl1251 *wl, struct event_mailbox *mbox) return ret; } - if (vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID) { + if (wl->vif && vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID) { wl1251_debug(DEBUG_EVENT, "SYNCHRONIZATION_TIMEOUT_EVENT"); /* indicate to the stack, that beacons have been lost */