Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754829AbcC1PjK (ORCPT ); Mon, 28 Mar 2016 11:39:10 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:44573 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752665AbcC1PjI (ORCPT ); Mon, 28 Mar 2016 11:39:08 -0400 Date: Mon, 28 Mar 2016 11:39:05 -0400 (EDT) Message-Id: <20160328.113905.1872357343182915465.davem@davemloft.net> To: yanhaishuang@cmss.chinamobile.com Cc: pshelar@nicira.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, dev@openvswitch.org Subject: Re: [PATCH] openvswitch: Use proper buffer size in nla_memcpy From: David Miller In-Reply-To: <1459159739-51541-1-git-send-email-yanhaishuang@cmss.chinamobile.com> References: <1459159739-51541-1-git-send-email-yanhaishuang@cmss.chinamobile.com> X-Mailer: Mew version 6.6 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 28 Mar 2016 08:39:07 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 400 Lines: 11 From: Haishuang Yan Date: Mon, 28 Mar 2016 18:08:59 +0800 > For the input parameter count, it's better to use the size > of destination buffer size, as nla_memcpy would take into > account the length of the source netlink attribute when > a data is copied from an attribute. > > Signed-off-by: Haishuang Yan Applied, thanks.