From patchwork Wed Mar 18 14:42:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avinash Patil X-Patchwork-Id: 6037281 X-Patchwork-Delegate: kvalo@adurom.com 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7499E9F314 for ; Wed, 18 Mar 2015 09:13:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A0768203F7 for ; Wed, 18 Mar 2015 09:13:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A8DEC2039C for ; Wed, 18 Mar 2015 09:13:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755741AbbCRJN2 (ORCPT ); Wed, 18 Mar 2015 05:13:28 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:37143 "EHLO mx0a-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754355AbbCRJNY (ORCPT ); Wed, 18 Mar 2015 05:13:24 -0400 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.14.5/8.14.5) with SMTP id t2I99lCj009594 for ; Wed, 18 Mar 2015 02:13:24 -0700 Received: from sc-owa03.marvell.com ([199.233.58.149]) by mx0a-0016f401.pphosted.com with ESMTP id 1t6thu9qbd-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Wed, 18 Mar 2015 02:13:24 -0700 Received: from maili.marvell.com (10.93.76.83) by SC-OWA03.marvell.com (10.93.76.24) with Microsoft SMTP Server id 8.3.327.1; Wed, 18 Mar 2015 02:13:23 -0700 Received: from pe-lt950 (unknown [10.31.130.218]) by maili.marvell.com (Postfix) with ESMTP id 460473F703F; Wed, 18 Mar 2015 02:13:22 -0700 (PDT) Received: from pe-lt950.marvell.com (localhost [127.0.0.1]) by pe-lt950 (8.14.7/8.14.7) with ESMTP id t2IEh6St024337; Wed, 18 Mar 2015 20:13:06 +0530 Received: (from root@localhost) by pe-lt950.marvell.com (8.14.7/8.14.7/Submit) id t2IEgveV024335; Wed, 18 Mar 2015 20:12:58 +0530 From: Avinash Patil To: CC: , , , Avinash Patil Subject: [PATCH] mwifiex: fix crash in SDIO RX path Date: Wed, 18 Mar 2015 20:12:52 +0530 Message-ID: <1426689772-24302-1-git-send-email-patila@marvell.com> X-Mailer: git-send-email 1.8.1.4 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68, 1.0.33, 0.0.0000 definitions=2015-03-18_03:2015-03-17, 2015-03-18, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1503180087 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, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, 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 With patch '960d6d08e39 "mwifiex: delay skb allocation for RX until cmd53 over"' we no more pass skb parameter to MP aggregation setup helper function. We instead pass length to be aggregated. This patch fixes an issue where we were passing length parameter of NULL skb to aggregation routine resulting into crash. We should instead pass rx_len received from mp_regs. Signed-off-by: Avinash Patil Signed-off-by: Amitkumar Karwar --- drivers/net/wireless/mwifiex/sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c index 330e9d0..4f08c58 100644 --- a/drivers/net/wireless/mwifiex/sdio.c +++ b/drivers/net/wireless/mwifiex/sdio.c @@ -1375,7 +1375,7 @@ rx_curr_single: if (f_post_aggr_cur) { dev_dbg(adapter->dev, "info: current packet aggregation\n"); /* Curr pkt can be aggregated */ - mp_rx_aggr_setup(card, skb->len, port); + mp_rx_aggr_setup(card, rx_len, port); } return 0;