Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1427733AbdDWHR3 (ORCPT ); Sun, 23 Apr 2017 03:17:29 -0400 Received: from smtprelay0217.hostedemail.com ([216.40.44.217]:36090 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1427665AbdDWHRX (ORCPT ); Sun, 23 Apr 2017 03:17:23 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::,RULES_HIT:41:355:379:541:599:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1538:1593:1594:1711:1714:1730:1747:1777:1792:2393:2559:2562:2693:2828:3138:3139:3140:3141:3142:3151:3350:3622:3865:3866:3868:3870:3871:3872:3873:4250:4321:4362:5007:10004:10400:10848:11026:11232:11658:11914:12048:12438:12740:12760:12895:13069:13071:13311:13357:13439:14180:14659:14721:21080:21212:21324:21600:30054:30069:30070:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: mark12_79e9d7492ff00 X-Filterd-Recvd-Size: 1401 Message-ID: <1492931836.30293.43.camel@perches.com> Subject: Re: [PATCH 1/1] tipc: check return value of nlmsg_new From: Joe Perches To: Pan Bian , Jon Maloy , Ying Xue , "David S. Miller" Cc: netdev@vger.kernel.org, tipc-discussion@lists.sourceforge.net, linux-kernel@vger.kernel.org Date: Sun, 23 Apr 2017 00:17:16 -0700 In-Reply-To: <1492931359-25004-1-git-send-email-bianpan2016@163.com> References: <1492931359-25004-1-git-send-email-bianpan2016@163.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 480 Lines: 14 On Sun, 2017-04-23 at 15:09 +0800, Pan Bian wrote: > Function nlmsg_new() will return a NULL pointer if there is no enough > memory, and its return value should be checked before it is used. > However, in function tipc_nl_node_get_monitor(), the validation of the > return value of function nlmsg_new() is missed. This patch fixes the > bug. Hello. Thanks for the patches. Are you finding these via a tool or inspection? If a tool is being used, could you please describe it?