Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1716749ybz; Thu, 23 Apr 2020 04:31:28 -0700 (PDT) X-Google-Smtp-Source: APiQypJccnztVkN+1GW171nOBhJXJWRdyKcpE1mQIDScG4qZ+/agV5fgd+aGwneRvNUOErnhOIXO X-Received: by 2002:aa7:d513:: with SMTP id y19mr2353933edq.367.1587641488523; Thu, 23 Apr 2020 04:31:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587641488; cv=none; d=google.com; s=arc-20160816; b=h+o7AB0BFdDR5mamtXh1zTxFfYG2ArWMOBRk7ntdZ1y3QBZqgdiz8IetgJwIn28Evh qBSc9Po7oPtwj9UHDSYAuqS195B4Jre4P0tM8u03nQ15hn2d22mKR+rx1jH3RrC8MKuM y4k7AHAy8P1yX9mLOgneiQCMpE8H+KKaGg6Xh2+oehiNpAl6PC3ZbCJ7kC7HTndyQOID V7KgAHlG+rz9W8XSdKZPaBcuK2gj75c/UgmSSM501QHP9obCH6GJs+50iGDq8AWEBOjv uobHCXTWncXjebXYBY1ibrRTmfMNWUwjJIZJOboSHcff8aK/OCdlYQJhYy5R7+BpFe1K /ynA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=aQkhpwIZSEKGyVHbDCTAvM9dYdM0zchsXhATiQ7eYwg=; b=NJqsD04Zap6PYVbKfJMCoYvCJBQne3Lq0L9axDsE9TggtNN3NVc8dI4vyKsODQFAv1 zix5mLGCju0ToG+qvzjZeA4aek5+KSOZDRdAz2SPwcWVqGnATVBFuxnFgz0HWYGUK6Oz 8s8m5EgYZBc09DKKb8OCfJDBsZSty0AlkMzGEzdfdtEyrqOjS5cxnvj5oSJ1H3A/dnip iyqvnUiUDtyq8Y6HWI2k/lnvQ0U/DKW9KoZ2JQZAJjERu0YNDTEpa5PeWPW4MZpKOWrT x+sjk3G66xF2gF4tYfbxR/8r870yLdJCpuGyoEt+l+5iXw8M9tV3WefmL2HkazA7v7OG F5jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2UfGZuQC; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id aq26si1103748ejc.26.2020.04.23.04.31.05; Thu, 23 Apr 2020 04:31:28 -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=@kernel.org header.s=default header.b=2UfGZuQC; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728118AbgDWL3O (ORCPT + 99 others); Thu, 23 Apr 2020 07:29:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:47132 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728092AbgDWL3N (ORCPT ); Thu, 23 Apr 2020 07:29:13 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7120820736; Thu, 23 Apr 2020 11:29:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587641352; bh=GLlc36Uzd9tq03rZItAwzH28jaEo5ZcpHGyvduOR2A0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=2UfGZuQCnr47rkAUJssPrBDRMExOsOBUUr0CuLJo6mJx9nyJv6MMYUvhnKJoL+Vua 9Wh/S1YtwuHrLDjruOSyXA344ONMBut+uKlZLIF2zhiFvO8wnKdR1hE82NG7KEuMOt GnbEpGteOvxHw9Aka5yptbzP0plKT0e1K0kHzKZw= Date: Thu, 23 Apr 2020 13:29:10 +0200 From: Greg Kroah-Hartman To: Ivan Safonov Cc: Larry Finger , devel@driverdev.osuosl.org, Puranjay Mohan , linux-kernel@vger.kernel.org, Saurav Girepunje Subject: Re: [PATCH] staging:r8188eu: avoid skb_clone for amsdu to msdu conversion Message-ID: <20200423112910.GA3768232@kroah.com> References: <20200418084112.3723-1-insafonov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200418084112.3723-1-insafonov@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 :( > > 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? thanks, greg k-h