Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2242374imm; Sat, 28 Jul 2018 12:19:28 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdy/fTusmWjjO00UO8stDq1gBD3L9ue+7t85lpuEIg5IPtl3U8zIh85QMm9LOMnTv/+Y1Me X-Received: by 2002:a63:f043:: with SMTP id s3-v6mr1758975pgj.94.1532805568571; Sat, 28 Jul 2018 12:19:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532805568; cv=none; d=google.com; s=arc-20160816; b=FAymubDUjlqaHRzcKymX+nsXcFYDBAI1gPIP1+cOpG/C4Af8E18E6EE38QP4yDPvYe F9DYnPdrenB4JNrNnbJ4I44HCLarR8bN1krDDnzFaMUXJuVOta6JfValUp6fRXQ9k5+6 Txm7CgrdKz7w5H8skiMmeVjVlo/97tyGCVG23CnXSUCj/g3kJfloIv6wQZw36UbEDh60 naUUa5ZdkcDvyeAySLLYJigyRVRbMdLmls2IYEfbrKqkQKii47OdE4cD2+NSCrsZ8ljm xDxj4hMB3iZudWoTzpsjeRGK0dbR+woX8kquHw3vPwbqvJYdSLr9UhxM1WPV3W12+4fA LfUw== 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:arc-authentication-results; bh=PjOacuhotVcZjQbzOTLfYmEj+c5d9GXtCHHF/EmrKOE=; b=P6/ytNTbq6wERkORtcfICoxNWBxS71Ih607fH72z7jdHdIkbl+2fZR2vnL+YT4Uq7z WSRqgO5mfQN5EVKL58iN/y2kRrbUt+Xn5ZjkYBthKFDmJHK7bWrUSuWcEbF21DQ2uxeu RjnnIzBzQyi3YEBRaQOozAwQsDiZrMDIaWUIa+N4B6iF4l2fUuGbMUWX8SOU5SoPkyol 4dbaeWVVYMWOKHEFaQBZozW98tSRCmb2PGbC8oLksQYG1OisEjpCNR2ay/EUJct5ttpm JxXXkIokBcVXlmikvHco5/DNuqGx/YxUIxseQ6HgcOoGJieiCBeZ2QZDRYpe59mHEksZ TZWQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a7-v6si6155898plz.510.2018.07.28.12.19.03; Sat, 28 Jul 2018 12:19:28 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730412AbeG1UpG (ORCPT + 99 others); Sat, 28 Jul 2018 16:45:06 -0400 Received: from www62.your-server.de ([213.133.104.62]:40781 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729518AbeG1UpF (ORCPT ); Sat, 28 Jul 2018 16:45:05 -0400 Received: from [78.46.172.3] (helo=sslproxy06.your-server.de) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1fjUiV-0001JP-UP; Sat, 28 Jul 2018 21:17:27 +0200 Received: from [99.0.85.34] (helo=localhost.localdomain) by sslproxy06.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1fjUiV-000NE6-Gy; Sat, 28 Jul 2018 21:17:27 +0200 Subject: Re: [PATCH net-next] cls_bpf: Use kmemdup instead of duplicating it in cls_bpf_prog_from_ops To: YueHaibing , davem@davemloft.net, ast@kernel.org, jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org References: <20180728103515.8576-1-yuehaibing@huawei.com> From: Daniel Borkmann Message-ID: <00707743-edb9-8030-38f8-fb8cca731ec2@iogearbox.net> Date: Sat, 28 Jul 2018 21:17:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20180728103515.8576-1-yuehaibing@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.100.0/24791/Sat Jul 28 18:42:40 2018) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/28/2018 12:35 PM, YueHaibing wrote: > Replace calls to kmalloc followed by a memcpy with a direct call to > kmemdup. > > Signed-off-by: YueHaibing Acked-by: Daniel Borkmann