Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1786899ybz; Thu, 23 Apr 2020 06:00:32 -0700 (PDT) X-Google-Smtp-Source: APiQypIEUOeMYgP6BNhJpzgtCHBPB2If+ddptii8DnClXU0W9T/9qxkFqTRcFjSsOHxEKLH4Z5D8 X-Received: by 2002:a17:906:2988:: with SMTP id x8mr2421525eje.16.1587646831942; Thu, 23 Apr 2020 06:00:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587646831; cv=none; d=google.com; s=arc-20160816; b=DI9V6qoj7En4eafZDLmqCJfbf7c2fj5kQy+CGdgidRfJ1+hRK7lhCq5ws0JVexTgyr SLTZ5aXF6TthBPdWGBgCq3rQgaGETF1YMVPz3yllMboWWdFVJ6z2ElQ5L6DnKyAAnwie w4biVDWCEUYnT+Qrq6bIyLxjMku41OewJL4TiS2P8tDUgm4YrLR/c1ak4o2pXKEW5I5d gvRH2ylX/UrCQqkUSPze+CnIBzYG1ufRGqOyHLQGUT66tDXQHYp4yvkYvLINmD6Ep6om jNam4bm80u3NmkAKt+xDEq9qNptmWlXtBddrAAKF2Jm8DYQjLr7rpgvMzJ/Ym3c3l6Ch up1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=4IzPwc1p9rewfVDR02gT5iXJHo6WGDgE1h5tGgQZ7mU=; b=l03b037S1HuSbD3M8/SxE7MqNGmKezqVT554mPDRfBh9+/fZW9OjBGrbIwtRmo81Tl XuvjEuBG2C806Rdh1Mu0813xv7T4vbnQYodWXjOLhYtpa/Uqrdcu7WAHIzaDdw4A4ZU0 LNsQBAsPLIMZade+iHTer87mHUNo2SIuVtI3XnoC1UAWPJimPX8uYyjyCCRgL7u8Uigg GUutFiu3mINqlQU/hY6KJcC1hsqN3u1aojeM79wU6cUbVPvbJjJYQYm+8Natwlbh3Y0d /WrJlGfp31MYWdzfy7Y5Ld+Kq1HZyLXZ5MU0q8Y0CP52FSTmuvyJK2EDMK30F9DRX08M FnIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=COuoas++; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id f26si1041574edm.141.2020.04.23.05.59.52; Thu, 23 Apr 2020 06:00:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=COuoas++; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728483AbgDWM5k (ORCPT + 99 others); Thu, 23 Apr 2020 08:57:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1728286AbgDWM5j (ORCPT ); Thu, 23 Apr 2020 08:57:39 -0400 Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CD8BC08E934 for ; Thu, 23 Apr 2020 05:57:39 -0700 (PDT) Received: by mail-lf1-x142.google.com with SMTP id 198so4665464lfo.7 for ; Thu, 23 Apr 2020 05:57:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=4IzPwc1p9rewfVDR02gT5iXJHo6WGDgE1h5tGgQZ7mU=; b=COuoas++m8kh9KGRXhiHJqYkkHYcP2R0N9n5x/wRuy2uQAOiKMUli60CJGPV8ZscFZ 2UX2tqj9zWW4Y/0dTcTe9p757t/rMDVRNrurrUWydEh1XnEE9ot/ompCf8RWgCa5aGfN YamULePVFJRNtd3QFOqj3bGv726bt3Iz2EG+1lN2JL6trl3YggjbqDDuq2xlaeRrNn9r JTR27Whjw9ywKLa2pWK+CXNY+iVGP+b+p9BMwEpI2wT/3AZoVlKlola/yMOW1wxee7XT ADuxv8fMWvZHbcZMC2QPrK6FBFchlTHP6JCeeoj05kbeq7uppxFHQwltie7WwMKoeHmG 6hVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=4IzPwc1p9rewfVDR02gT5iXJHo6WGDgE1h5tGgQZ7mU=; b=qtWtEnkV4dbrQvyV3VYDA32gAPzpuzwWANmVzCstYYmqDZjNqxsn2vei1HYa+Ap+wV P5UvV9RTW0pCqZaGBmqO+lK9IUqSvYIsoWAgYIKHsdP8Lr0rQj5WYEv+Q4sIuumcVagU xpZ7wHmWMdXHMuYX/u/KAJc/0PD6ryiLryco5S5PMca40rPUjHg6TYWdQhJz33UOCw3n 2/snNbaQf1H1ZEqrjvCziWOOkZzo9QU8a75dX2ljFfj+MhfeTgjxT2XCOuEMHfKo3Yay nLRpyi8HyRdiX/sbE0vZkQ1XEhYgzERWm2nfiX0iG1qFApz8Y2p46ZaQMy6nGSTdYkXu Ffag== X-Gm-Message-State: AGi0PuYjkLtih9+nf0tTUrnlOEMlGGZJ+6+HFH6bmfgUIrb0ne7eqQA2 zQG1PLasaJNBohEV9TQg69c= X-Received: by 2002:ac2:4c9a:: with SMTP id d26mr2340685lfl.112.1587646657974; Thu, 23 Apr 2020 05:57:37 -0700 (PDT) Received: from [192.168.0.160] (84.188.smarthome.spb.ru. [80.249.188.84]) by smtp.gmail.com with ESMTPSA id s7sm1807991lfb.40.2020.04.23.05.57.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Apr 2020 05:57:36 -0700 (PDT) Subject: Re: [PATCH] staging:r8188eu: avoid skb_clone for amsdu to msdu conversion To: Greg Kroah-Hartman Cc: Larry Finger , devel@driverdev.osuosl.org, Puranjay Mohan , linux-kernel@vger.kernel.org, Saurav Girepunje References: <20200418084112.3723-1-insafonov@gmail.com> <20200423112910.GA3768232@kroah.com> From: Ivan Safonov Message-ID: Date: Thu, 23 Apr 2020 16:02:10 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200423112910.GA3768232@kroah.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/23/20 2:29 PM, Greg Kroah-Hartman wrote: > On Sat, Apr 18, 2020 at 11:41:12AM +0300, Ivan Safonov wrote: >> skb clones use same data buffer, so tail of one skb is corrupted by beginning of next skb. > > Please properly wrap your changelog text at the correct column (72). > > Also, your subject: line does not have the correct driver name :( Correct driver name is 'r8188eu': 1. http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2016-June/090556.html : > One other point, it is customary to start the patch subject with "staging: > rtl8188eu: ..." for drivers in staging. I also prefer using r8188eu rather than > rtl8188eu as the former is the actual name of the driver, but either will work. 2. ./drivers/staging/rtl8188eu/os_dep/usb_intf.c lines 483-522/522 (END): > static struct usb_driver rtl8188e_usb_drv = { > .name = "r8188eu", > .probe = rtw_drv_init, > .disconnect = rtw_dev_remove, > .id_table = rtw_usb_id_tbl, > .suspend = rtw_suspend, > .resume = rtw_resume, > .reset_resume = rtw_resume, > }; > > module_usb_driver(rtl8188e_usb_drv) Subject contain this name. >> >> Signed-off-by: Ivan Safonov >> --- >> drivers/staging/rtl8188eu/core/rtw_recv.c | 19 ++++++------------- >> 1 file changed, 6 insertions(+), 13 deletions(-) >> >> diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c >> index d4278361e002..a036ef104198 100644 >> --- a/drivers/staging/rtl8188eu/core/rtw_recv.c >> +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c >> @@ -1525,21 +1525,14 @@ static int amsdu_to_msdu(struct adapter *padapter, struct recv_frame *prframe) >> >> /* Allocate new skb for releasing to upper layer */ >> sub_skb = dev_alloc_skb(nSubframe_Length + 12); >> - if (sub_skb) { >> - skb_reserve(sub_skb, 12); >> - skb_put_data(sub_skb, pdata, nSubframe_Length); >> - } else { >> - sub_skb = skb_clone(prframe->pkt, GFP_ATOMIC); >> - if (sub_skb) { >> - sub_skb->data = pdata; >> - sub_skb->len = nSubframe_Length; >> - skb_set_tail_pointer(sub_skb, nSubframe_Length); >> - } else { >> - DBG_88E("skb_clone() Fail!!! , nr_subframes=%d\n", nr_subframes); >> - break; >> - } >> + if (!sub_skb) { >> + DBG_88E("dev_alloc_skb() Fail!!! , nr_subframes=%d\n", nr_subframes); >> + break; >> } >> >> + skb_reserve(sub_skb, 12); >> + skb_put_data(sub_skb, pdata, nSubframe_Length); >> + > > Have you tested this? I have not test this change. Ivan Safonov.