From patchwork Thu Aug 3 14:26:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitkumar Karwar X-Patchwork-Id: 9879245 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 02F1160360 for ; Thu, 3 Aug 2017 14:30:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E9A8428733 for ; Thu, 3 Aug 2017 14:30:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DE8A62891A; Thu, 3 Aug 2017 14:30:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B2F5328733 for ; Thu, 3 Aug 2017 14:30:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751183AbdHCOao (ORCPT ); Thu, 3 Aug 2017 10:30:44 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:37673 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751144AbdHCOal (ORCPT ); Thu, 3 Aug 2017 10:30:41 -0400 Received: by mail-pg0-f68.google.com with SMTP id 83so1656708pgb.4 for ; Thu, 03 Aug 2017 07:30:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=KM2vMAQP0hMkiszLv8e0r1Ej/njcoKSOOQcrt7DFOck=; b=kkQ6mvMp1RjwZdWVU8SbuwNMMLiA1yfD2FPQASxiA72NGowQL7IfygkhlwidqwODjY v1XkHihKZar61S86fotb88/rK3rmhpYVRZa0rvqewoqIWgKycb4M3fj/FHRqXMl6eU/v sMQDBb2JtCCqSdgva/wvJLt2KVc7HGqYB5UbLYqU1dm8OMHsMn3lhmHDeL+1y1Xl3uFf nuBph9Sg6oiL53IRXN7Ixz+LyJ9yElGHb2CDRvKD872freGUnOCSOpUOXUlivDQ9S1il l3XDGXVirmDstZfFB3bRYZnbuDt9K1CqsxLIRF3/QugFuHbJ9UEK7XpJNWqcH+FwiXt+ kJXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=KM2vMAQP0hMkiszLv8e0r1Ej/njcoKSOOQcrt7DFOck=; b=DKjVU0Ub2Z9R4o/hfjGPFutqabPnRV7bvp/FAFhXBdO9/Snd+NBOZQNX586r7G/Omw HbUy/+gpYRfmSxE26ZyUes48Bn+GEFupo0LlRjDb0BDCpFoGuXXdexiiuvWHT7fF/8lF kGu2f5iPbHBNMFwT8TArJ7w8AuUx4RvGw8BP/hc/0Ic8SF7Wu9RO3NlkQH3kXSTC8Y9a SksClXKZFMeS3xuLyXwvQ+xFf+W5Kql9h4kE/wIMxcchWSax+84ntb/XEJhZHjipbUAx cdEspbh3BUfJ0l3dyUVATwmhpCGBl4Y3T1OW62ryZXaNfT5VrHeyfc0zfjoBqJVvQNMS yobA== X-Gm-Message-State: AIVw111w3lBPHs9ZIixZZ2a3eMNDwmNjFTrvPKPWtRQbr65rPvfQ2St0 RgVpcHQTwODk6g== X-Received: by 10.84.130.108 with SMTP id 99mr2115546plc.76.1501770640867; Thu, 03 Aug 2017 07:30:40 -0700 (PDT) Received: from cpu185.redpinesignals.com ([203.196.161.90]) by smtp.gmail.com with ESMTPSA id h14sm66822600pgn.34.2017.08.03.07.30.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 03 Aug 2017 07:30:40 -0700 (PDT) From: Amitkumar Karwar To: Kalle Valo Cc: linux-wireless@vger.kernel.org, Amitkumar Karwar , Prameela Rani Garnepudi Subject: [PATCH] rsi: fix uninitialized descriptor pointer issue Date: Thu, 3 Aug 2017 19:56:39 +0530 Message-Id: <1501770400-6659-1-git-send-email-amitkarwar@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Prameela Rani Garnepudi This patch fixes the uninitialized descriptor pointer issue in function rsi_send_internal_mgmt_frame(). Descriptor should point to start of the skb data. Reported-by: Dan Carpenter Fixes: 9a629fafe7d8 ("rsi: immediate wakeup bit and priority for TX command packets") Signed-off-by: Prameela Rani Garnepudi Signed-off-by: Amitkumar Karwar --- drivers/net/wireless/rsi/rsi_91x_mgmt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/rsi/rsi_91x_mgmt.c b/drivers/net/wireless/rsi/rsi_91x_mgmt.c index c6e8a20..ba8a68f 100644 --- a/drivers/net/wireless/rsi/rsi_91x_mgmt.c +++ b/drivers/net/wireless/rsi/rsi_91x_mgmt.c @@ -275,6 +275,7 @@ static int rsi_send_internal_mgmt_frame(struct rsi_common *common, rsi_dbg(ERR_ZONE, "%s: Unable to allocate skb\n", __func__); return -ENOMEM; } + desc = (struct rsi_cmd_desc *)skb->data; desc->desc_dword0.len_qno |= cpu_to_le16(DESC_IMMEDIATE_WAKEUP); skb->priority = MGMT_SOFT_Q; tx_params = (struct skb_info *)&IEEE80211_SKB_CB(skb)->driver_data;