Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3180067ybi; Mon, 17 Jun 2019 18:29:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqyZyiz7efBNYyY43fU7gwxjhAgCmJ9nkgsSPCkqjJ0wi8CYy+EYucnV5SlyEV4JJNWo7KDc X-Received: by 2002:a17:902:16f:: with SMTP id 102mr66717675plb.94.1560821364321; Mon, 17 Jun 2019 18:29:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560821364; cv=none; d=google.com; s=arc-20160816; b=eYaPO8IibjhCeViY7usgTD4VPKSUnWl2hVTS4eFX+pQ0vzkA5YdFfbAE78tuJednLK wHIiwO7uNE8KhVaGFj0KTg/o5A/eHtj9euZ3dT5Fe/Z04OhjPqc2UWS2iNA2/CHROHsD +ZC1zAOgDpk/xcFJDSynEVQSSmNk3JxAdVpfHAReyXZXVG0+WUWxLjbwA4Y6ZO4N3ONj xC1IYAoIDXV3A54mTsGF+wdh94ur/oPjB2o/tppDmm3h4O5am50W0OBOViIsMKYIsqzs ff0XLc5TnZLyMX2KiXe3dB4JlF+2im0eBzi5W5qQ1EbAbzPSksIOqB84GjWW9oqf54lB 8UGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :from:date:dkim-signature; bh=EhVn2VpMWMF3z6W4xlxwl8wypc2+4cPuZsN0Q8XyuuU=; b=zE4yrwtKTKCzDOcpbYo8xotPQoQE0SXnHDKeZOaGXuqhgRVugX48qk1DVEMAKJLG5o RCqM0CZO6exLMHr0tWBieLdsCuyidtm2rzv09IzXTiXSRpwWZOaNI9qECpcAAyguP8K4 I6O98Y3/ZRkkeQ93BpF3NPAzVN/gH0xMd0k6TDVfz7xuSAL7LI1yjWBPzOzlyNcIjb+H sCvwBEXLS9yM8TavPH+oWrvE2fpt7Ktvt8EaB89RbJMhF6GvoejjLKyo4pmbTTwk3AbJ 1IJfjs1rmRGVOJYdarZ53rdpIVx5XwpwwsrTyCLKCUlNzmDzCES9pXGloRbasxB85lpu 3o9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QxQiLwoo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j71si12278414pgd.167.2019.06.17.18.29.09; Mon, 17 Jun 2019 18:29:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QxQiLwoo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726685AbfFRB20 (ORCPT + 99 others); Mon, 17 Jun 2019 21:28:26 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:42100 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726095AbfFRB20 (ORCPT ); Mon, 17 Jun 2019 21:28:26 -0400 Received: by mail-pg1-f196.google.com with SMTP id l19so6713830pgh.9 for ; Mon, 17 Jun 2019 18:28:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=EhVn2VpMWMF3z6W4xlxwl8wypc2+4cPuZsN0Q8XyuuU=; b=QxQiLwooXqMRIkh11AjjQpzoWU1haTiRRfs3v/EaP87xSPpKa5JBxenQkYqUhXEx6h kpkbHAPqme66p1Q341yD7s78oKCSHZNbtW+zdGku+s0PPSEg/N6Qm03TgetlcHx4TVbm xYbt5LQ9uNSfw7VHrymOZwu7PAirRKyhzC1CJLfiA5gaPz+PzM205K7+UjJt9CREqGLi ae96RwBqoMwWiMtBVkevOr02W/5NRlj9qAQsr2K1562c0CKuUfGB3UWJAQzknBqI/X0k O7NEMWsFgncoYbAlTl0F6/bux/7NUyVv3bT+YZkmsVAJkZdQhZA9809soAHcBiPWrxYB zUBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=EhVn2VpMWMF3z6W4xlxwl8wypc2+4cPuZsN0Q8XyuuU=; b=asKAKfxZJhdlWehpUtTRk2gn+S4F9PIenUtjc8otsNX5wUFzvlKLbpdscId9Pc0rKs dqJdvoBF6Vi5B0qkRsVc3LpF8YakMVWWIaJjXtl9x6lIJ0x4CDZyYgwpN05aLEbfy8js vgHqjdp0r74cH+167x3nKRl4VbWIOc3Uv6yQix8Re2OlGmQpH0xvFTzni3dUGZ7VHKEt +FfoQcfBdvUClN+8I0ybfIpUdB+M9gWw80WtwIHPxWccSUYayOHGNwWqBQgP/8dWquR2 v/W0bzK2a400kUdKdPUhPzmDMHM+Qy0/jflJINF+xtZQpwv58FEbq2oe9TbaBgpaSXva Ojfw== X-Gm-Message-State: APjAAAXgJD4wKUiBVezJqMz7E0C4Bq4mUFaUbHGVV0QFMxhlFk2jFxek 1ih3/BSQGvOmNoFQ2AJlZBfZUytU X-Received: by 2002:a62:2643:: with SMTP id m64mr113828678pfm.46.1560821305718; Mon, 17 Jun 2019 18:28:25 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.92.187]) by smtp.gmail.com with ESMTPSA id k4sm3153187pfk.42.2019.06.17.18.28.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jun 2019 18:28:25 -0700 (PDT) Date: Tue, 18 Jun 2019 06:58:20 +0530 From: Hariprasad Kelam To: Dan Carpenter , Greg Kroah-Hartman , Michael Straube , Nishka Dasgupta , Mamta Shukla , Emanuel Bennici , Shobhit Kukreti , Puranjay Mohan , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: rtl8723bs: os_dep: ioctl_linux: Make use rtw_zmalloc Message-ID: <20190618012819.GA7963@hari-Inspiron-1545> References: <20190616053250.GA16116@hari-Inspiron-1545> <20190616071522.GE28859@kadam> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190616071522.GE28859@kadam> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 16, 2019 at 10:15:22AM +0300, Dan Carpenter wrote: > On Sun, Jun 16, 2019 at 11:02:50AM +0530, Hariprasad Kelam wrote: > > rtw_malloc with memset can be replace with rtw_zmalloc. > > > > Signed-off-by: Hariprasad Kelam > > --- > > drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 12 +++--------- > > 1 file changed, 3 insertions(+), 9 deletions(-) > > > > diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c > > index fc3885d..c59e366 100644 > > --- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c > > +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c > > @@ -478,14 +478,12 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param, > > if (wep_key_len > 0) { > > wep_key_len = wep_key_len <= 5 ? 5 : 13; > > wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, KeyMaterial); > > - pwep = rtw_malloc(wep_total_len); > > + pwep = rtw_zmalloc(wep_total_len); > > We should not introduce new uses of rtw_malloc() or rtw_zmalloc(). They > are buggy garbage. Use normall kmalloc() and kzalloc(). Hi Dan Carpenter, Sure , will resend this patch with suggested changes. Thanks, Hariprasad k > > regards, > dan carpenter