Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S976045AbdDXTvu (ORCPT ); Mon, 24 Apr 2017 15:51:50 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:56826 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1765919AbdDXTvm (ORCPT ); Mon, 24 Apr 2017 15:51:42 -0400 Date: Mon, 24 Apr 2017 15:51:40 -0400 (EDT) Message-Id: <20170424.155140.436046246227486722.davem@davemloft.net> To: bianpan2016@163.com Cc: dsa@cumulusnetworks.com, roopa@cumulusnetworks.com, ast@kernel.org, david.lebrun@uclouvain.be, tom@herbertland.com, rshearma@brocade.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] lwtunnel: check return value of nla_nest_start From: David Miller In-Reply-To: <1492928917-25628-1-git-send-email-bianpan2016@163.com> References: <1492928917-25628-1-git-send-email-bianpan2016@163.com> X-Mailer: Mew version 6.7 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, 24 Apr 2017 12:10:18 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 393 Lines: 11 From: Pan Bian Date: Sun, 23 Apr 2017 14:28:37 +0800 > Function nla_nest_start() may return a NULL pointer on error. However, > in function lwtunnel_fill_encap(), the return value of nla_nest_start() > is not validated before it is used. This patch checks the return value > of nla_nest_start() against NULL. > > Signed-off-by: Pan Bian Applied.